What Is a TS File? MPEG Transport Stream Explained
What is a TS file? It is an MPEG transport stream: 188-byte packets from broadcast TV and HLS. Learn how to open one and convert TS to MP4 without re-encoding.
If you are asking what is a TS file, you probably found one on a hard drive, in a camcorder folder or in a pile of numbered files, and your player either opened it oddly or refused it. A .ts file is a video container called the MPEG transport stream. It was designed for broadcast, and it is still how many TV recordings and streaming segments are stored.
Key Takeaways
- A TS file is an MPEG transport stream: a container (not a codec) that carries video, audio and metadata in fixed 188-byte packets.
- You meet
.tsfiles in TV and DVR recordings and as segments of HLS streams, and some camcorders use a close variant. - To open one, use a general-purpose player such as VLC; many default players and editors do not handle it well.
- Converting TS to MP4 is usually a remux:
ffmpeg -i input.ts -c copy output.mp4changes the container and leaves the video and audio untouched. - A TS file vs MP4 comparison is mostly about purpose: TS tolerates damaged or interrupted streams, MP4 is built for storage and wide playback support.
- A folder of numbered
.tsfiles is usually a set of HLS segments and has to be joined in order before it becomes one video.
What an MPEG transport stream is
The MPEG transport stream (MPEG-TS) is a container format that originated in digital broadcasting. Instead of one long structured file, it chops everything into fixed-size packets of 188 bytes. Each packet starts with a sync byte and carries a tag saying which stream it belongs to: video, audio, subtitles or program information.
Small fixed packets matter because broadcast signals lose data in transit. If a few packets arrive damaged, a receiver can skip them, find the next sync byte and carry on. That is why a TS recording of a bad signal usually still plays, with glitches, where a damaged MP4 may not play at all.
Like every container, a TS file only wraps the real streams. The video inside might be MPEG-2 (common in broadcast recordings) or H.264, and the audio might be AAC, AC-3 or MP2. The general split between containers and codecs is a wider topic; this post stays with the .ts file itself.
Where you run into .ts files
- TV and DVR recordings. Set-top boxes, TV tuners and capture software often write the broadcast stream to disk as it arrives.
- Camcorders. Some AVCHD cameras keep their clips in a transport-stream variant, usually with an
.mtsor.m2tsextension rather than.ts. - HLS segments. HTTP Live Streaming splits a video into short pieces. Apple’s HLS authoring specification allows both MPEG-TS and fragmented MP4 segments, and a lot of streams still use TS.
The third case explains most “why do I have 400 tiny files” questions. How the playlist that lists those segments works is a separate topic and is not covered here.
How to open a TS file
Use a general-purpose player. VLC plays transport streams directly, including recordings with MPEG-2 video. Some built-in players and many video editors refuse the file or play it without seeking, because the container has no index like an MP4 does and the codec inside may not be one they ship.
If a TS file will not play anywhere, the likely causes are a badly damaged recording or encrypted content. Encrypted segments are outside the scope of this guide, and nothing here helps with removing protection.
TS file vs MP4
| TS | MP4 | |
|---|---|---|
| Built for | Broadcast and live delivery | Storage and download |
| Damaged data | Receivers resynchronize on the next packet | A broken index can make the file unplayable |
| Seeking | Limited, no central index | Fast, index at the file level |
| Compatibility | Good in VLC and TV hardware, patchy elsewhere | Almost everywhere |
Neither is “better quality”. Quality comes from the codec and bitrate inside, and the same H.264 stream can sit in either container.
Convert TS to MP4
When the TS holds H.264 video and AAC audio, which is typical for HLS segments, converting is a remux. It copies the streams into a new container with no quality loss, and it runs quickly because nothing is re-encoded:
ffmpeg -i input.ts -c copy output.mp4
The -c copy option tells FFmpeg to copy rather than re-encode; the muxers and demuxers it uses are described in the FFmpeg formats documentation.
A re-encode is needed when the streams are not MP4-friendly. The usual case is a broadcast recording with MPEG-2 video: MP4 players generally expect H.264 or similar, so you would convert the video with -c:v libx264, and copy the audio with -c:a copy if it is already AAC.
A folder of numbered .ts files
Files named like segment001.ts, segment002.ts are usually HLS pieces of one video, not separate clips. Join them in playlist order, then remux. With FFmpeg’s concat demuxer, list the files in order in a text file called list.txt:
file 'segment001.ts'
file 'segment002.ts'
file 'segment003.ts'
Then run ffmpeg -f concat -safe 0 -i list.txt -c copy output.mp4, which joins and remuxes in one step. Order is what matters: a wrong order gives a jumbled video. If the segments are encrypted, this will not produce a playable file, and this guide does not cover decryption.
Keeping converted files organized
Once TS recordings are MP4 files, they are easier to keep and replay. Links are a separate matter: VidMost’s link library keeps the video pages you save in one place, with their titles, sources and previews, and the media sidebar offers a shortcut for saving them. The library stores page links, not the video files themselves.