TS Format: MPEG-2 Transport Stream Complete Guide
The .ts file extension stands for Transport Stream — a container format defined in the MPEG-2 standard (ISO 13818-1). It is the backbone of digital television broadcasting worldwide: every DVB-T terrestrial signal, DVB-S satellite broadcast, and ATSC over-the-air channel is transmitted as an MPEG-2 Transport Stream. TS files appear on your computer when you record digital TV, rip Blu-ray discs, or work with broadcast-grade video equipment.
What Is a TS File?
A Transport Stream is a multiplexed stream designed to carry multiple programs simultaneously over unreliable transmission channels (broadcast RF, satellite, cable). Unlike a Program Stream (.mpg), a Transport Stream:
- Uses fixed 188-byte packets — easy to resync after transmission errors
- Can carry multiple video, audio, and subtitle programs simultaneously
- Includes PCR (Program Clock Reference) for timing synchronization
- Has PAT/PMT tables that describe which PIDs (Packet Identifiers) carry which services
A TS file on your hard drive is typically a single-program recording extracted from a broadcast stream, containing:
- Video: MPEG-2, H.264, or H.265 (HEVC)
- Audio: MP2, AC3, AAC, or E-AC3 (Dolby Digital Plus)
- Subtitles: DVB subtitle streams or teletext
Technical Specifications
| Property | Details |
|---|---|
| Extension | .ts, .m2ts, .mts, .tp, .trp |
| MIME type | video/mp2t |
| Standard | ISO/IEC 13818-1 (MPEG-2 Part 1) |
| Packet size | 188 bytes (TS) or 192 bytes (M2TS with Blu-ray timestamp) |
| Video codecs | MPEG-2, H.264, H.265 (DVB-T2) |
| Audio codecs | MPEG-1/2 Audio, AC3, AAC, E-AC3 |
| Subtitles | DVB bitmap, teletext, DVB teletext |
| Streaming | HLS (Apple HTTP Live Streaming) — uses .ts segments |
TS vs M2TS vs MTS
| Extension | Used for | Timestamp |
|---|---|---|
.ts |
DVR recordings, broadcast capture | No extra timestamp |
.m2ts |
Blu-ray discs (BDAV format) | 4-byte timestamp prefix |
.mts |
Sony / Panasonic camcorders (AVCHD) | 4-byte timestamp prefix |
How TS Is Used in HLS Streaming
Interestingly, .ts files are also the segment format used by Apple's HLS (HTTP Live Streaming) protocol. When you watch a video stream on iPhone, the video server breaks it into small 2–10 second .ts segments delivered over HTTP. These are different from broadcast TS recordings — they typically contain a single H.264+AAC program.
Convert TS to MP4 with FFmpeg
# Fast re-mux (H.264 video → MP4, no re-encoding)
ffmpeg -i input.ts -c copy -movflags +faststart output.mp4
# Re-encode with deinterlacing (MPEG-2 broadcast source)
ffmpeg -i input.ts -vf yadif -c:v libx264 -crf 22 -c:a aac -b:a 192k output.mp4
# Select a specific audio track (if TS has multiple)
ffmpeg -i input.ts -map 0:v:0 -map 0:a:1 -c copy output.mp4
# Convert M2TS (Blu-ray) to MP4
ffmpeg -i input.m2ts -c:v libx264 -crf 20 -c:a aac -b:a 256k output.mp4
# Extract subtitles from TS
ffmpeg -i input.ts -map 0:s:0 output.srt
List All Streams in a TS File
ffprobe -v quiet -print_format json -show_streams input.ts
This shows every stream: video PIDs, audio language tracks, subtitle streams, and their codecs. Essential before converting a multi-program TS file.
Convert TS to MKV (Keeping All Tracks)
# Keep all streams (video + all audio + subtitles)
ffmpeg -i input.ts -c copy output.mkv
# Re-encode video, keep all audio tracks
ffmpeg -i input.ts -c:v libx264 -crf 22 -c:a copy output.mkv
Common TS Problems
| Problem | Cause | Solution |
|---|---|---|
| "No such file or directory" despite file existing | Special characters in filename | Rename file, remove spaces/brackets |
| Video plays but audio is silent | Wrong audio track selected | Use -map 0:a:0 explicitly |
| Interlacing artifacts | MPEG-2 broadcast source | Add -vf yadif to FFmpeg command |
| Timestamp discontinuities | Incomplete recording / channel switch | Add -fflags +discardcorrupt |
| Large file size | MPEG-2 at broadcast bitrate | Re-encode to H.264: 60–70% size reduction |
| M2TS files from Blu-ray | BDAV 192-byte packets | FFmpeg handles automatically |
Related conversions
Frequent conversions across the catalogue: