Back to Mediamtx

HLS

docs/4-read/06-hls.md

1.19.11.2 KB
Original Source

HLS

supported codecs
videoAV1, VP9, H265, H264
audioOpus, FLAC, MPEG-4 Audio (AAC)
otherKLV (MPEG-TS-based HLS only)

HLS is a protocol that works by splitting streams into segments, and by serving these segments and a playlist with the HTTP protocol. You can use MediaMTX to generate an HLS stream, that is accessible through a web page:

http://localhost:8888/mystream

and can also be accessed without using the browsers, by software that supports the HLS protocol (for instance VLC or MediaMTX itself) by using this URL:

http://localhost:8888/mystream/index.m3u8

Some clients that can read with HLS are FFmpeg, GStreamer, VLC and web browsers.

MediaMTX supports generating HLS in several variants (including Low-Latency mode), and provides various parameters to tune HLS generation. These are listed in the configuration file.

HLS can also be used to scale the server through a CDN.