Thursday 6 April 2023

Video on Demand (VOD) and Video Streaming – How it works!

Video on demand (VOD) and video streaming are two popular methods for delivering video content over the internet. While VOD allows users to download and watch videos on their own time, video streaming enables real-time playback without the need for a download.

Technically, video streaming involves sending compressed video data in small chunks, which are decoded and played by the user’s device in real-time. The most common streaming protocol used today is HTTP Live Streaming (HLS), which segments video into small files called “chunks”.

When a user requests to watch a video, the server divides the video into chunks and sends the data to the user’s device. The device’s media player downloads each chunk and decodes it for playback, while simultaneously downloading the next chunk in the sequence.

HLS files used in video streaming typically include:

  1. Manifest file (M3U8): This is an index file that contains a list of video segments (chunks) that the player requests from the server. It tells the player how to download and play the video.
  2. Video chunks (TS files): These are small video files that contain a portion of the video content. The player downloads these files in sequential order, and decodes them to play the video.
  3. Encryption keys (key files): These are small files that contain the encryption keys used to secure the video content.
  4. Subtitle files: These are text files that contain captions or subtitles for the video.

When a user watches a video on a browser, the media player in the browser sends an HTTP request to the server for the manifest file. The server then sends the manifest file, which the media player reads to determine the location and sequence of the video chunks. The media player then requests the video chunks, which are downloaded and decoded in real-time for playback.

In summary, video streaming involves the segmentation of video into small files called “chunks”, which are sent to the user’s device for real-time playback. The HLS protocol is the most commonly used streaming protocol, and it uses files such as the manifest file, video chunks, encryption keys, and subtitle files to deliver video content over the internet.

No comments:

Post a Comment