Video Buffering and Streaming in Chunk Size | Nodejs
1 min readMar 6, 2023
How can you create a video streaming buffer like YouTube . In YouTube, you have noticed that the whole video is not downloaded in the browser at once. Only some seconds (10 -20 second) of the video would get downloaded in the browser and more will be downloaded as user continues to watch.
Benefits:
- It saves bandwidth. If a file is of 80 MB in size, user can download just 1 MB at start. User can start watching the 1 MB and the next MBs will automatically gets downloaded . User does not have to wait for whole 80 MBs to get downloaded.
Packages used : Fs Modules and Express
Github Code Attached Below with demo: