How YouTube handles streaming 4,000,000,000+ daily videos without a hitch.

Martin Ombura Jr.
9 min readFeb 1, 2019

YouTube is a behemoth of video playback. It is the 2nd most popular search engine, bigger than Yahoo, Bing and Ask.com combined and amasses over 4 Billion daily views. YouTube has improved quite a bit over the years, and this article looks to showcase the various components that make YouTube playback one of the smoothest and enjoyable in the market. In this article we explore a subset of technologies and design philosophies that enabled
YouTube to grow into the giant that it is.

YouTube Streaming

1. Transcoding and Streaming

Transcoding is a blanket term that involves other processes such as transcoding, transrating and trans-sizing.

  • Transcoding alters the video and audio format into one that is either more popular or can be manipulated easier e.g. mkv to flv.
  • Transrating focuses on reducing the bitrate of video and audio while maintaining the original media format e.g. 4K at 13Mbps to 4K at 6Mbps all in the same format.
  • Trans-sizing involves the reduction in video frame from 4K to 2K or 1080p, 720p, etc.

YouTube makes use of FFmpeg for performing the transcoding. The benefits of transcoding arise when it comes to streaming. For instance if you intend to directly stream a live Fortnite BR game directly to your viewers, the properties of the video and sound that you are recording on may not match that of your intended viewers. Your video recording software may produce 1080p H.264 video that can take a long time be downloaded on users machines (as its not being appropriately transrated and trans-sized). In addition if your audio format is .aac, some users may not have the ability to decode the audio. Streaming sites like Twitch/YouTube act as an intermediary that perform all the transcoding to ensure viewers can retrieve the video in their appropriate format.

YouTube have perfected the art of transcoding large video and audio files in no time, by using infrastructure that can perform the task in a highly parallelized manner. This is achieved by takingthe input video you are uploading, splitting it into several smaller segment, performing transcoding on each small…

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Martin Ombura Jr.

Rust 🦀 | Embedded | Go | Distributed Computing