Embed HLS

Live streams have quickly taken over the internet, with services like Twitch and YouTube Live becoming massively popular over the last decade. However, getting sites to stream high-quality video hasn’t always been a simple task – that’s where HTTP Live Streaming (HLS) comes in.

What is HLS?

HLS is a video streaming protocol and was first introduced by Apple in 2009 as part of its QuickTime technology. Since then, it has gained popularity thanks to its adoption alongside HTML5 and is now the new standard for streaming video content.

HLS allows content providers such as ESPN or YouTube Red access flexibility when managing their resources because they don’t have to worry about encoding beforehand. Instead, they can simply send out one URL per video segment, which will automatically adapt based on network conditions at playback time.

How Does HLS Work?

HLS operates through a simple process, starting from the host server to the client device:

  1. The video file (or livestream) starts on the host server, where two things happen. First, the data is encoded (with H.264 or H.265 encoding). Second, it’s segmented into multiple short pieces that are duplicated at different resolutions, with an index file to help sort them.
  2. After the server has segmented the data, it’s distributed to client devices over the network or through a CDN.
  3. Finally, the client device receives the data stream and uses the index file to arrange the segments in order, and begins playback.

Embed video player

If you are currently self-hosting a video player, you can easily embed it with these instructions. If you embed the Cloudinary video player in your application, you can deliver any HLS or MPEG-DASH video. By using this capability in conjunction with Cloudinary’s automatic transcoding from standard video formats to HLS or MPEG-DASH, including generation of all related files and video representations, you can stream any video from Cloudinary to your users according to the bandwidth and CPU capacity that the video player detects in real-time.

Cloudinary supports HLS out of the box and can help you save time instead of setting up the complex process of creating index files and metadata. Our platform helps automatically generate metadata from your video and transcode it to HLS, saving you time and effort! If you want to get started with Cloudinary, sign up today!

Last updated: May 25, 2023