Instagram manages to reduce the space of videos without affecting their quality


If millions of people upload videos every day to Instagram servers, the “hard disk” space needs to be constantly increased. In fact, Instagram engineers have already received a notice where it was commented that this issue was being a problem, there was not so much space for so much video.

Faced with the threat of having the servers saturated with billions of reels, they created a method to reduce the size of the files and improve the quality, without the need to update any hardware, without putting more disks.

In early 2021, Instagram gave 12 months to find a solution, and engineers invented a system where multiple scrambled versions of uploaded videos could be reused. The results were surprising:

By reusing one type of video encoding to help generate another type, computing resources were reduced on the least viewed videos by 94% and a drastically reduced amount of resources was achieved.

Thanks to the available resources, they managed to produce more advanced encodings, thus increasing the fluidity of existing videos.

Instagram uses two types of video encoding:

– Basic, compatible with all Instagram users, with lower efficiency compression, ideal for playback on older devices.
– Advanced, with newer compression technologies capable of delivering sharper details with fewer bits.

The first method consumed 80% of its resources, and the advanced ones only 15%

They focused on optimizing basic encoding, and managed to get higher overall view times on all servers.

A work of several months that is invisible to users, but that makes it clear how important it is to have engineers constantly thinking about all the details.