What is a TS File?

A .ts file is usually an MPEG transport stream: a video container used for broadcast TV and for the segments of HLS streams. The same extension is also used for TypeScript source code, which is unrelated.

How TS Files work

A transport stream is built for unreliable delivery such as a broadcast signal. It cuts video and audio into small fixed packets of 188 bytes, each starting with the byte 0x47, so a receiver can join mid-stream and recover after errors. The video inside is usually H.264, HEVC or MPEG-2, and the audio is usually AAC, AC-3 or MP2. Because the container only wraps those streams, moving them into an MP4 does not require re-encoding.

Key facts

  1. To tell the two kinds of .ts file apart, open it in a text editor: TypeScript is readable code, a transport stream is binary data.
  2. ffmpeg -i input.ts -c copy output.mp4 rewraps a transport stream as MP4 in seconds, without quality loss.
  3. HLS video streams are commonly split into .ts segments a few seconds long, listed in an .m3u8 playlist.

When TS Files matter

You will find .ts video files in TV recordings, camcorder footage and downloaded HLS segments. Convert them to MP4 for editing and sharing, since MP4 plays in far more places.

How Transloadit helps with TS Files

Transloadit’s /video/encode Robot accepts transport stream files and converts them to web formats such as MP4, for example with the web/mp4/1080p preset. The /video/adaptive Robot goes the other way and can produce HLS streams.

Explore Transloadit’s file formats & compression capabilities

Turn media knowledge into a working pipeline

Connect uploads, processing, AI, storage, and delivery through one declarative API — with the encoding stack, scaling, and format churn handled for you.

Try Transloadit for free