Skip to content

video/mp2t MIME Type — Meaning, Usage & Examples

video/mp2t
Extensions: .ts Class: video Spec: RFC 3555 (IANA registered)
View IANA registration ↗

video/mp2t means: video/mp2t is the media type for MPEG-2 Transport Stream segments, the packetized container used by HLS and broadcast video. Transport streams are designed for reliable delivery over error-prone channels and are the traditional segment format referenced by HLS playlists. Video media types describe moving-image containers, which bundle video, audio and subtitle streams. The subtype drives player selection and streaming behavior; modern delivery often pairs a container type with adaptive streaming manifests. Declaring the correct video type is essential for inline playback, poster frames and hardware-accelerated decoding. You will encounter video/mp2t in contexts such as hls media segments (.ts files); broadcast and contribution video feeds; packetized mpeg-2 transport over networks. It is commonly associated with the file extension(s) .ts. A .ts transport stream segment is video/mp2t, not to be confused with TypeScript source files which also use .ts but are application/javascript or text/plain. Context and the declaring server determine the correct type; HLS segments are binary media.

Advertisement
Ad slot · ref-top

When you'll see video/mp2t

  • HLS media segments (.ts files)
  • Broadcast and contribution video feeds
  • Packetized MPEG-2 transport over networks

How to handle it

When delivering video, choose a container and codec combination your audience supports, enable byte-range requests for progressive playback, and use adaptive streaming manifests for varying bandwidth. Provide a poster image and captions track where relevant. Always declare the exact video type on segments and manifests; a mismatch is a common cause of players that load but never start. As a final checklist for video types: enable faststart and byte-range requests, provide adaptive streaming for variable bandwidth, include captions and a poster frame, match the declared type to the real container and codec, and test playback on the devices your audience actually uses.

Notes & gotchas

A .ts transport stream segment is video/mp2t, not to be confused with TypeScript source files which also use .ts but are application/javascript or text/plain. Context and the declaring server determine the correct type; HLS segments are binary media.

Examples

HTTP
HTTP/1.1 200 OK
Content-Type: video/mp2t
Accept-Ranges: bytes
Content-Disposition: inline; filename="sample.ts"

[binary video payload: the encoded bytes of a sample .ts]
curl
curl -i -H "Accept: video/mp2t" https://api.example.com/v1/resource   # inspect the returned Content-Type
JavaScript (fetch)
const res = await fetch("/media/sample.ts", { headers: { Accept: "video/mp2t" } });
const blob = await res.blob();            // blob.type should be "video/mp2t"
const url = URL.createObjectURL(blob);    // assign to img.src / audio.src / video.src
// revoke with URL.revokeObjectURL(url) when done to free memory
Python (requests)
import requests

res = requests.get("https://api.example.com/v1/resource",
                   headers={"Accept": "video/mp2t"}, timeout=30)
res.raise_for_status()
assert res.headers["Content-Type"].startswith("video/mp2t")
with open("sample.ts", "wb") as fh:
    fh.write(res.content)   # raw bytes; use stream=True for large files

Frequently asked questions

Why do HLS segments use .ts?

MPEG-2 Transport Stream is the traditional HLS segment container, packetized for robust streaming. Modern HLS can also use fMP4 segments, but .ts remains common.

Is a .ts file always video?

No — .ts is also the TypeScript extension. In an HLS/media context it is video/mp2t; in a code context it is JavaScript/TypeScript source. The server's Content-Type disambiguates.

Which video MIME type should I serve for the web?

video/mp4 (H.264/AAC) has the broadest support; video/webm (VP9/Opus) is efficient and open. For adaptive streaming use application/vnd.apple.mpegurl (HLS) or application/dash+xml. Match the type to the actual container.

Can I stream video with a plain video/mp4 type?

Yes for progressive download with byte-range requests (Accept-Ranges: bytes). For adaptive bitrate streaming you need a manifest type (HLS/DASH) plus segment types; the player switches quality based on bandwidth.

Why does my video download fully before playing?

The moov atom is likely at the end of the file and the server lacks byte-range support. Re-mux with faststart (moov at the front) and enable Accept-Ranges: bytes for progressive playback.

Advertisement
Ad slot · ref-in-article

Try the Base64 Encoder

Encode and decode Base64 with UTF-8 and URL-safe options.

Open tool →