Key takeaways
- MPEG-TS is a robust container built for continuous broadcast; HLS is a delivery method that cuts streams into segments listed in playlists.
- Continuous TS over HTTP gives low latency and simple playback on set-top boxes; HLS scales through ordinary web caches and supports adaptive bitrate.
- Segment duration and keyframe interval largely define HLS latency.
- Offering both lets every device use the format that suits it best.
Inside an MPEG transport stream
The MPEG transport stream (MPEG-TS, defined in ISO/IEC 13818-1) was designed for broadcast, where data travels over imperfect links and receivers can tune in at any moment. A transport stream is a sequence of fixed-size 188-byte packets. Each packet carries a 13-bit packet identifier (PID) that tells the receiver which elementary stream it belongs to — video, an audio track, subtitles or metadata.
To make sense of the PIDs, the stream carries program-specific information tables:
- PAT (Program Association Table, always on PID 0) lists the programs in the stream and where their PMTs are.
- PMT (Program Map Table) lists the elementary streams of a program, their PIDs and codec types.
- PCR (Program Clock Reference) timestamps keep the decoder clock in sync with the encoder.
Because PAT and PMT are repeated regularly, a receiver can join a running stream, read the tables and begin decoding at the next keyframe. This "join at any time" property is exactly what live TV needs.
Continuous TS over HTTP
The simplest way to deliver a live channel over IP networks is to send the transport stream as one continuous HTTP response. The player opens a single connection and receives packets as they are produced. Advantages:
- Low latency — there is no segmenting delay; the viewer is typically only a few seconds behind the source.
- Broad device support — set-top boxes, smart TVs and dedicated player apps handle TS natively.
- Fast channel change — when the server keeps a short buffer starting at the most recent keyframe, a new viewer can see a picture almost immediately.
The trade-off is scale: each viewer holds an open connection to a streaming server, and ordinary HTTP caches cannot share one continuous response between many viewers. Capacity is therefore planned per streaming node.
How HLS works
HTTP Live Streaming (HLS) cuts the stream into short files called segments, traditionally MPEG-TS and increasingly fragmented MP4. A text playlist (.m3u8) lists the most recent segments. The player downloads the playlist, fetches the segments in order and reloads the playlist to discover new ones.
Because segments are ordinary files, they can be cached by any web cache or CDN. A thousand viewers of the same channel may result in only one request to the origin per segment. HLS is also natively supported on Apple platforms and widely supported elsewhere through players built into apps and browsers.
Each segment must begin with a keyframe so that it can be decoded independently. This is why encoder keyframe intervals are usually aligned with the segment duration.
Adaptive bitrate ladders
HLS can offer the same channel in several renditions — for example 1080p at 6 Mbps, 720p at 3.5 Mbps and 480p at 1.5 Mbps. A master playlist lists the renditions, and the player measures its throughput and switches between them at segment boundaries. Viewers on weak connections keep watching at lower quality instead of buffering.
Adaptive bitrate requires renditions with aligned keyframes and segment boundaries, and every extra rendition costs encoding capacity. Many operators delivering over managed networks with predictable bandwidth use a single rendition per channel, and add a ladder only for delivery over the open internet.
Latency and segment duration
HLS latency is dominated by segmenting: a segment can only be published once it is complete, and players usually buffer several segments before starting. With 6-second segments and a three-segment buffer, a viewer can easily be 20 seconds or more behind live. Shorter segments (2–4 seconds) reduce this considerably at the cost of more requests and slightly lower compression efficiency.
Low-Latency HLS (LL-HLS) goes further by publishing partial segments and letting players request upcoming parts in advance, bringing latency down to a few seconds — but it requires support across the encoder, packager, CDN and player.
TS or HLS: a comparison
| Aspect | Continuous MPEG-TS over HTTP | HLS |
|---|---|---|
| Typical latency | Low (a few seconds) | Higher; depends on segment length |
| Channel change | Very fast with keyframe buffer | Waits for playlist and first segment |
| Caching and CDN | Not cacheable per viewer | Segments cache efficiently |
| Adaptive bitrate | No | Yes, via renditions |
| Best suited for | Set-top boxes, managed networks | Mobile, browsers, open internet |
In practice the two are complementary. A platform that offers both lets each device and network use what it handles best — continuous TS for living-room devices on the operator's own network, HLS for phones, browsers and viewers on other networks.
How SaurusRex handles it: streaming nodes deliver both continuous MPEG-TS and HLS. For TS, a keyframe-aligned start buffer gives an instant picture on channel change, HLS segments for time-shift are kept on fast in-memory storage, and live sessions show whether each viewer is on TS or HLS. See the platform overview.