At iPlayerHD, we are often asked by our users how best to prepare videos before they upload them to their accounts. After all, every user wants to deliver only the best quality video experience on their websites. Rendering video files correctly from the editor is the final step in a long process and is critical to the video’s success on the web. In this post, I will attempt to remove the mystery of video transcoding, leaving the reader with a better understanding of the subject.
Whether uploading to YouTube, iPlayerHD or to any other online video platform on the Web, the information presented here applies equally.
Video transcoding is the process of converting a video file from one format type to a different format type. It is also typically to convert the file from a higher bit rate to a lower bit rate. The most common reason for transcoding a video is to optimize, or prepare it, for viewing on the web. In this case, the video is compressed to comply with the limitations of data transfer speeds, also called bandwidth. It is also converted to a format that is compatible with all devices connected to the web.
There’s no mystery to transcoding
Uncompressed video files have data rates much too high for the web and are not practical. They will not play well, stopping and starting as the file buffers to allow more data to download. This results in a low quality user experience during playback. And they often have formats that are not compatible with all devices. Transcoding corrects all of these issues.
Most videos rendered from modern video editing systems have some compression built in. But unless configured properly, the data rate, typically called the bit rate, is too high to play well on the internet.
When we watch a video on the web, the entire video file does not download first and then play. If that were the case, we would have to wait several minutes before the video begins to play. Who has the patience for that? Not many of us, that’s for sure. So videos are transcoded at bit rates that work well on the web. The file is also configured to tell the player to start playing as soon as it has enough data. That attribute is called fast start and it typically gets the video playing within 2-3 seconds after hitting play.
Video formats and players and other stuff
Another important reason to transcode a video file is to make it compatible with the players used by browsers to show the video. Adobe Flash player was the first universal player that allowed us to migrate from QuickTime, Windows Media Player and RealPlayer, to a single player. Where once we needed multiple players on a web page to play the same video to satisfy the different computer systems, Flash was a single player that would work on all systems.
While Flash worked for a decade, it was a must-be-installed, must-be-constantly-updated software tool. It used lots of system resources and often caused headaches for the machine (and its owner).
Flash was replaced on most machines by 2016 with HTML5, which never requires updating because it is built into every browser including Chrome, Internet Explorer, Firefox, and Safari. Video files are now transcoded for the web to meet the requirements of HTML5. Those requirements include using H264 as the codec and MP4 as the container.
To understand the difference between H264 and MP4, think of H264 as the recipe for salsa and MP4 as the container in which you put the salsa after you make it. H264 is the recipe for transcoding video from one form to another. It could be converting a high bit rate video to a lower bit rate video for the reasons described above. That’s called compressing a video.
It can also be used to convert one codec, say wmv or avi, to the H264 codec and then placing it in an MP4 container. Once the conversion/transcoding is complete, the file is now compatible for both HTML5 and for successful delivery on the web.
Compressing video is a tricky business
Compressing a video is tricky business because there is the risk that if not done properly, the quality will suffer greatly. H264 was developed by the Motion Pictures Expert Group specifically to reduce the size of a video with the least reduction in quality. There are limitations of course. A high bitrate video of 10 mbps can be safely reduced to 3 mbps using the H264 codec but that same video reduced to 1 mbps will lose significant quality.
And it is impossible to increase the quality of a video – transcoding a video from 1 mbps to 10 mbps will result in a poor quality video. Beauty in. Beauty out. You can go down but you can’t go up.
The goal of video transcoding and reducing bit rates and file size is to balance quality with the need to deliver video on the web and to do it smoothly and without buffering. The H264 codec is the best solution to meet these needs.
Correctly rendering your videos is critical
iPlayerHD, just like YouTube and every other video hosting platform, ingests customer videos and transcodes them so that they are specifically optimized and playable on all devices connected to the web. Although every file we create has the same H264 MP4 profile, we do create files with different resolutions, frame rates and bit rates based on the source video attributes and the device (desktop or mobile) we will deliver them to.
Our customers often think that a five minute, 1 GB video file they upload will use 1 GB or more of storage. In reality, once that file is optimized, it will use no more than 200 MB of storage. The video transcoding process compresses the source file using an H264 compression formula that is extremely capable of producing a high quality video at a greatly reduced bitrate and file size. That’s what transcoding is all about.
This leads us to the question about how to render videos from an editing system so that the video will look its best once optimized by the video hosting provider. The answer is surprisingly simple and you’ll find that most hosting solutions provide a similar answer.
Render your videos at 5,000 to 10,000 kbps ( 5 to 10 mbps), using the native resolution and native frame rate. In this case, native means the resolution and frame rate in which the video was shot. In the edit process, there is rarely a reason to change the resolution or the frame rate. So don’t. Finally, render the video using the H264 codec and place it in an MP4 container.
Follow these simple instructions and you can be confident that you will deliver the best video experience possible to your web site audience.
P.S. Many of our friends and colleagues are putting video on the web these days. If you found this informative and valuable, please share it in Facebook or Twitter. It sure would mean a lot to us and perhaps you will help others who could use the information. Thanks.