DEV Community

Cover image for Adaptive Video Streaming
Abhishek Raj
Abhishek Raj

Posted on

Adaptive Video Streaming

Everyone reading this post must have used video streaming websites like Youtube, Netflix. You must be wondering how we can watch a video of 200MB (approx.) with slow internet without buffering.

When you upload a video on Youtube, that video is sent to Youtube's GPU Server, then DASH Algorithm is used to seperate video and audio then breaks the video into chunks of 6-10sec and then converts the video chunks into different resolutions it also creates the video registry xml file (where name and directory of every video is written) and then the all the chunks are sent to CDN.

Now, you would be wondering what is DASH, It is video encoding algorithm. DASH (Dynamic Adaptive Streaming over HTTP ) is one of few algorithms used by major tech companies. Another popular algorithm is HLS developed by Apple.

Here is a sample of DASH XML File generated by my server using ffmpeg

Read more about DASH and HLS here.

I will post some articles on automating ffmpeg for generating video segments.

You can visit my Video Streaming Website, Firestream, which I created to learn how Youtube works.

Fun fact: While writing this article, I was experiencing heavy lag on youtube, don't know why!!. xD

Top comments (0)