With the decline of Flash and the explosive rise of mobile devices, more and more content is being delivered as HTML5 video. As of 2016, H.264 encoded video stored in an MP4 container file (which I’ll just simply call an MP4 video) has emerged as the standard format for all online HTML5 video. MP4 videos are basically HTML5 encoded videos that are saved in an MP4 container file. This has become so popular that everyone who publishes videos online wants to encode their video in MP4 format
Still, there are several issues that arise out of streaming an MP4 file like slow streaming and it becomes quite troublesome watching a video sometimes. So why do these videos play slow? Let’s have a look at some of the reasons associated to streaming of MP4 videos. And solutions to solve slow streaming of MP4 video files.
Reasons of Slow MP4 HTTP Streaming
MP4 files are constructed with small data files termed as atoms which hold all kind of audio and visual information related to the video. These bits of data are transmitted in a stream to the user while watching the video file. But there are some more special atoms that are called moov files, these moov have all the information related to the video and atoms that hold the data.
When the streaming is requested, the player or browser starts gathering the file information and looking for these moov files. The basic demerit of using this format is scattering of the atoms, this means scattered information.
When trying to stream the atoms, the player would look for moov atoms at first, to gather the information of all other atoms and start playing the video, this is the buffer time that you experience every time you stream a video. So if the moov file is easily found, it will initiate the flow of all the atoms, otherwise, the player would be continuously looking for moov files and download all the atoms meanwhile, without playing the video.
- Slow processing speed
- Less availability of memory
- Low bandwidth
- Loosely Optimized MP4 video file
- The inability of a computer to receive the file.
This reasons analysis is from the article written by Billy Hoffman posted on rigor.com. If you like, you can read the whole article.
Whatever may be the reason, there are some practices that will help you troubleshoot slow streaming of MP4 videos.
Optimizing MP4 for faster HTTP streaming
We have seen that to optimize a video for HTML5 streaming, you need to reorganize the MP4 atoms so the moov atom is at the start. So how do we do that? Most video encoding software has an“optimize for web” or“optimize for streaming” option which does this very thing. You should look at your video encoding settings when creating video to ensure it is optimized. For example, in the screenshot below, we see the open source video encoder Handbrake which has an option“Web Optimized”, which places the moov atom at the start:
More Handbrake Guides
- How to Use HandBrake to Rip/Convert DVD to MP4?
- Add Soft Hard Subitles to Movies with Handbrake
- How to Stop Handbrake 1.0.7 Cropping Videos?
- Tutorial: Rip DVDs with Handbrake 1.0.7
- Installing Handbrake 1.0.7 libdvd.css.pkg on macOS Sierra
- Encode H.265 with Handbrake 1.0.7
- Handbrake Blu-ray Encoding H.265 in 25 Hours
Handbrake Related Issues
- Handbrake crashing during encode – Fixed
- Handbrake 1.0.7 vs. PavtubeVideoConverter Ultimate
- Handbrake VS Pavtube Free Video DVD Converter Ultimate
- Best Handbrake Alternatives
- Handbrake 1.0.7 Is Not Prefect on macOS Sierra