DEV Community

Cover image for Adaptive Video Streaming
Abhishek Raj
Abhishek Raj

Posted on

4 3

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.
dash

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

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →