The magic behind video upload process in social media
This is the era of social media. We see uncountable short form content these days, also known as reels or shorts or maybe stories and statuses. But have you ever wondered what happens when you press that upload or post button? It might seem just a simple upload to the database and then distribution of that to the bigger mass - NO! not just it. A bunch of logic goes behind the whole process and let's decode it ☕ The journey The user creates a content, edits it and then goes to upload. When the user uploads the reel, it goes through a pipeline which has some set of compression processes. The backend handles the video and compress it down to a desired bitrate for which the size of the reel is now reduced from the originally uploaded content. This size difference is massive! For reference let's say you upload a video of 90 MB, and it is going through the pipeline. Now after the process is finished the video is now about 25-30 MB, incredible isn't it! The average percentage compression from the above example comes down as- 90-25 % compression = ------ x 100 % = 72.222% 90 After the compression it simply follows the same method of uploading to the database and then comes to our feed. Note: This is a simple overview but the market leading social medias are designed in such a way that it stores different version on top of compression (and their compression method can differ than mine) and shows us the best version according to our internet speed! We will save that part for another blog

This is the era of social media. We see uncountable short form content these days, also known as reels or shorts or maybe stories and statuses. But have you ever wondered what happens when you press that upload or post button?
It might seem just a simple upload to the database and then distribution of that to the bigger mass - NO! not just it. A bunch of logic goes behind the whole process and let's decode it ☕
The journey
- The user creates a content, edits it and then goes to upload.
- When the user uploads the reel, it goes through a pipeline which has some set of compression processes.
- The backend handles the video and compress it down to a desired bitrate for which the size of the reel is now reduced from the originally uploaded content. This size difference is massive!
For reference let's say you upload a video of 90 MB, and it is going through the pipeline. Now after the process is finished the video is now about 25-30 MB, incredible isn't it!
The average percentage compression from the above example comes down as-
90-25
% compression = ------ x 100 % = 72.222%
90
- After the compression it simply follows the same method of uploading to the database and then comes to our feed.
Note: This is a simple overview but the market leading social medias are designed in such a way that it stores different version on top of compression (and their compression method can differ than mine) and shows us the best version according to our internet speed!
We will save that part for another blog