What Are TS Files and Why Do You Have Them?
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.

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:
ffprobe -v error -show_streams -show_entries \
stream=index,codec_type,codec_name,width,height,channels \
-of table input.ts
Typical output:
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:
- Open the MP4 converter.
- Upload your TS file.
- Adjust settings if needed, or keep the defaults.
- Click Convert and download the MP4.
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:
ffmpeg -i input.ts -c copy -movflags +faststart output.mp4
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:
ffmpeg -i input.ts -c:v copy -c:a aac -b:a 192k \
-movflags +faststart output.mp4
The video copies instantly while only the audio is re-encoded — still very fast.
Remux with Stream Selection
DVR recordings often contain multiple audio tracks (original language + dubbed) and multiple subtitle tracks. Select specific streams:
ffmpeg -i input.ts -map 0:v:0 -map 0:a:0 \
-c copy -movflags +faststart output.mp4
This takes only the first video and first audio stream.

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:
ffmpeg -i input.ts -c:v libx264 -crf 18 -preset slow \
-c:a aac -b:a 192k -movflags +faststart output.mp4
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
Then concatenate and convert:
ffmpeg -f concat -safe 0 -i segments.txt \
-c copy -movflags +faststart output.mp4
Method B: Concat Protocol (Simpler for Few Files)
For a small number of TS files:
ffmpeg -i "concat:part1.ts|part2.ts|part3.ts" \
-c copy -movflags +faststart output.mp4
Method C: Intermediate Concatenation
For hundreds of segments, first concatenate the raw TS data, then remux:
# Step 1: Concatenate TS files
cat segment_*.ts > combined.ts
# Step 2: Remux to MP4
ffmpeg -i combined.ts -c copy -movflags +faststart output.mp4
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:
ffmpeg -fflags +genpts+discardcorrupt -i input.ts \
-c copy -movflags +faststart output.mp4
The +discardcorrupt flag drops damaged packets at splice points, and +genpts regenerates timestamps for smooth playback.
TS Files with Teletext Subtitles
European broadcast recordings often include Teletext subtitles. Convert them to a compatible format:
ffmpeg -i input.ts -c:v copy -c:a copy \
-c:s mov_text -movflags +faststart output.mp4
For more subtitle handling options, see our guide on how to add subtitles to video.
IPTV Recordings with Multiple Programs
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
For more on batch processing, see our batch processing guide. You can also automate this through our file conversion API.

Fixing Common TS Conversion Issues
Issue: "Non-monotonous DTS" Warnings
This is the most common TS issue — timestamps that jump backward. Fix it by regenerating timestamps:
ffmpeg -fflags +genpts -i input.ts -c copy \
-movflags +faststart output.mp4
Issue: Audio Drift Over Long Recordings
Multi-hour TS recordings can develop audio/video drift. Use -async:
ffmpeg -i input.ts -c:v copy -c:a aac -b:a 192k \
-async 1 -movflags +faststart output.mp4
Issue: Interlaced Content
Broadcast TS is often interlaced (1080i). Deinterlace during conversion for better playback on monitors and phones:
ffmpeg -i input.ts -c:v libx264 -crf 18 \
-vf yadif=0 -c:a aac -b:a 192k output.mp4
Issue: Seeking Is Slow in the Output MP4
If seeking is sluggish after conversion, the moov atom may be at the end of the file. Always use -movflags +faststart:
ffmpeg -i input.ts -c copy -movflags +faststart output.mp4
Extracting Audio from TS Files
To pull audio from a broadcast recording, use our audio converter or FFmpeg:
# Extract as MP3
ffmpeg -i input.ts -vn -c:a libmp3lame -b:a 192k output.mp3
# Extract as AAC (if already AAC, just copy)
ffmpeg -i input.ts -vn -c:a copy output.m4a
For more audio extraction methods, read how to extract audio from video. If you are interested in audio format comparisons, our AAC vs MP3 comparison covers the tradeoffs.
Trimming TS Files During Conversion
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.



