How to Convert TS to MP4: Transport Stream Conversion Guide
Guide for converting MPEG Transport Stream (.ts) files to MP4. Learn what TS files are, why they need conversion, how to merge multiple TS segments, and the best conversion settings.
Marcus Rivera·February 19, 2026·9 min read
Try these conversions
Free, in your browser — no signup, files auto-delete in 2 hours.
MPEG Transport Stream (.ts) is a standard container format designed for broadcasting and streaming. Unlike MP4, which was built for file storage, TS was engineered for unreliable transmission — cable TV signals, satellite broadcasts, IPTV streams, and live network delivery where data packets can arrive out of order or get lost entirely.
You probably have TS files for one of these reasons:
DVR recordings from a cable box, satellite receiver, or network tuner
IPTV captures from a streaming IPTV service
HLS stream downloads — many streaming services use TS segments for HTTP Live Streaming
Broadcast recordings from software like OBS, DVBViewer, or TVHeadend
Screen recordings from tools that output MPEG-TS
Blu-ray disc rips that preserve the original broadcast transport stream
The good news: most TS files contain H.264 or H.265 video with AAC audio — codecs that are fully compatible with the MP4 container. This means you can often remux (repackage) without re-encoding, preserving 100% of the original quality in seconds.
Television broadcast setup with transport stream recording equipment
TS vs MP4: Key Differences
Feature
TS (Transport Stream)
MP4 (MPEG-4 Part 14)
Primary Purpose
Broadcast & streaming
File storage & playback
Error Resilience
Excellent (packet-based)
Poor (corrupted files may not play)
Seeking
Slow (no centralized index)
Fast (moov atom / index)
File Size Overhead
2-5% larger (packet headers)
Minimal
Subtitle Support
DVB subtitles, Teletext
SRT (mov_text), MPEG-4 Timed Text
Device Compatibility
Limited (TV tuners, VLC)
Universal
Web Browser Playback
None (except via HLS.js)
Native in all browsers
Streaming Protocols
HLS, DVB, ATSC, ISDB
Progressive download, DASH
Pro Tip: TS files are always slightly larger than the equivalent MP4 because each 188-byte TS packet includes 4 bytes of header overhead. Converting to MP4 typically reduces file size by 2-5% with no quality change whatsoever — the content is identical, just repackaged more efficiently.
Step 1: Inspect Your TS File
Before converting, check what codecs the TS file uses:
index codec_type codec_name width height channels
0 video h264 1920 1080
1 audio aac 2
2 subtitle dvb_subtitle
If the video is H.264 or H.265 and the audio is AAC, you can remux. If the audio is AC3 or MP2 (common in broadcast recordings), you may want to re-encode the audio while copying the video.
Method 1: Convert TS to MP4 Online
The easiest approach for single files. Our video converter handles all TS variants:
This method works for files up to the upload limit and requires no software installation. The converter automatically detects whether remuxing or re-encoding is needed.
Method 2: Lossless Remux with FFmpeg
When the TS file contains MP4-compatible codecs (H.264/H.265 + AAC), remuxing is instant and lossless:
This completes in seconds regardless of file size because no encoding occurs. A 10 GB TS recording will remux to a ~9.7 GB MP4 (smaller due to eliminated packet overhead).
Remux with Audio Re-encoding
Broadcast TS files often have MP2 or AC3 audio, which is technically supported in MP4 but poorly supported on many devices. Re-encode just the audio:
This takes only the first video and first audio stream.
FFmpeg command line showing TS to MP4 remuxing process
Method 3: Full Re-encode for Older TS Files
Some TS files (especially from older DVB receivers or analog capture cards) contain MPEG-2 video, which is not well-suited for MP4. Re-encode to H.264:
For MPEG-2 broadcast recordings, re-encoding to H.264 typically reduces file size by 60-70% with no perceptible quality loss. The original MPEG-2 encoding was already lossy, and H.264 is vastly more efficient. Our video codecs explained guide covers why modern codecs achieve better compression.
Merging Multiple TS Segments into One MP4
HLS (HTTP Live Streaming) downloads produce dozens or hundreds of small TS segments (e.g., segment_001.ts, segment_002.ts, ...). These need to be concatenated before or during conversion.
Method A: FFmpeg Concat Demuxer
Create a text file listing all segments:
# Generate the list file
for f in segment_*.ts; do echo "file '$f'" >> segments.txt; done
This approach works because TS is specifically designed for concatenation — each packet is self-contained.
Pro Tip: When downloading HLS streams with tools like yt-dlp, use the --merge-output-format mp4 flag to automatically download, merge, and remux TS segments into a single MP4 file. This eliminates the need for manual concatenation entirely.
Handling Common TS Conversion Scenarios
DVR Recordings with Commercial Breaks
DVR recordings often have discontinuities at commercial break points. Handle these with:
Some TS files contain multiple programs (channels). List them first:
ffprobe -show_programs input.ts
Then extract a specific program:
ffmpeg -i input.ts -map 0:p:1 -c copy output.mp4
Quality Settings Reference
Source Type
Typical TS Codecs
Recommended Conversion
Expected Size Change
HDTV DVR (1080i)
H.264 + AC3
Remux video, re-encode audio to AAC
2-5% smaller
SDTV DVR (480i)
MPEG-2 + MP2
Re-encode to H.264 + AAC
60-70% smaller
IPTV stream (1080p)
H.264 + AAC
Remux only (-c copy)
2-5% smaller
HLS download segments
H.264 + AAC
Concat + remux
2-5% smaller
Blu-ray remux
H.264/H.265 + DTS/TrueHD
Remux video, re-encode audio
Similar size
Old analog capture
MPEG-2 + MP2
Re-encode both streams
50-65% smaller
Batch Converting TS Files
If you have a collection of DVR recordings or downloaded streams:
# Batch remux (when TS files have H.264 + AAC)
for f in *.ts; do
ffmpeg -i "$f" -c copy -movflags +faststart "${f%.ts}.mp4"
done
# Batch re-encode (when TS files have MPEG-2 or other legacy codecs)
for f in *.ts; do
ffmpeg -i "$f" -c:v libx264 -crf 18 -preset medium \
-c:a aac -b:a 192k -movflags +faststart "${f%.ts}.mp4"
done
TS files from DVR recordings often have unwanted content at the beginning or end. Trim during conversion:
# Start at 5 minutes, end at 1 hour 30 minutes
ffmpeg -ss 00:05:00 -to 01:30:00 -i input.ts \
-c copy -movflags +faststart output.mp4
Our video trimmer provides a visual interface for this, so you can see exactly where to cut. You can also use the crop video tool to remove black bars from broadcast recordings.
Summary
Converting TS to MP4 is usually a simple remuxing operation that takes seconds and produces identical quality. The key is checking your TS file's codecs first with ffprobe. If it contains H.264/H.265 video and AAC audio, use -c copy for instant lossless conversion. For MPEG-2 broadcast recordings, re-encoding to H.264 will dramatically reduce file size while maintaining visual quality.
For multiple TS segments from HLS downloads, concatenate first, then remux. For DVR recordings with discontinuities, add -fflags +genpts+discardcorrupt to handle timestamp issues gracefully.
Whether you use our online video converter for a quick conversion or FFmpeg for batch processing a DVR archive, the result is the same: universally playable MP4 files ready for any device.