What Is Transcoding? Why Is Transcoding Important for Streaming?
This blog post answers these questions, along with how encoding and transmuxing play into the mix. Read on to gain full control over the whole process.
Join the DZone community and get the full member experience.Join For Free
If you are in the streaming industry or have some interest, you may have heard the word transcoding a lot. You may know a little about what transcoding is, or you may be wondering what this word you hear all the time. However, regardless of your situation, after this blog post, you will have full control of the transcoding process. Let’s not forget that the video transcoding process is very important for live broadcasts, especially if you want to use adaptive streaming in live streams to reach more audiences. We will find an answer to the question of what is transcoding.
But… To really understand what transcoding is and how it affects the success of your streams, firstly, we need to talk about encoding and need to understand what encoding is. We cannot talk about transcoding without talking about encoding.
What is Encoding?
Encoding is the process of receiving data from devices that capture video and audio data (these can be your webcam, microphone, capture card, or streaming software) and converting it to a digital format that you can send to streaming platforms. In a normal streaming setup, encoding acts as a medium, aiding in communication between input and output.
The encoder works with a codec, an encoder-decoder piece of software, to dictate how to compress and format the raw data on your camera, for example. H.264 is one of the most popular codecs for live video streaming, and it can be used to create video files in various resolutions up to 8k.
Various parameters determining video quality and size are determined in this process. These parameters can be compression, resolution, and bitrate. This data is packaged in a container that holds information about the configuration of the data and file metadata. At the end of this process, a video file emerges. Let’s dive into the question: What is transcoding?
What is Transcoding?
Now we are ready to learn the answer to what is transcoding. The definition of transcoding is the process of converting an audio or video file from one encoding format to another in order to increase the number of compatible target devices on which a media file can be played.
Transcoding term includes these two terms: Transrating and Transsizing.
Transrating specifically refers to changing bitrates, such as taking a 2k video input stream at 16 Mbps and converting it into lower-bitrate streams like 720p at 5 Mbps (the process is also called renditions).
Transsizing specifically means resizing the video frame; for example, from a resolution of 2560×1440 (2K UHD) down to 1920×1080 (1080p), 1280×720 (720p), or 720×480(480p)
What is Transmuxing?
An important point! Transcoding Is not the same as transmuxing. Transmuxing is also called recoding, repacking, packaging, or repacking. Transmuxing is a process where you take compressed audio and video and pack/repack it in different formats with keeping audio or video content original.
For example, you might have H.264/AAC content and change the container in which it is packaged so you can use it HTTP Live Streaming (HLS), Smooth Streaming, HTTP Dynamic Streaming (HDS), or Dynamic Adaptive Streaming over HTTP (DASH). The computational overhead for transmuxing is much smaller than transcoding.
Why is Transcoding Important?
The most important benefit of Video Transcoding is that it enables live broadcasts to be watched by a much wider audience regardless of connection or device.
For example, you want to live stream using a camera and encoder. Suppose you’re compressing your content with an RTMP encoder and selecting the H.264 video codec at 1080p.
You prepared the live broadcast content; you worked hard. Of course, you don’t want this effort to be wasted. But if you try to stream your perfect live stream directly, you’ll likely run into a few issues. Quick information: The world’s average fixed broadband download speed has increased by 38% in just two years and is currently around 64Mbsp. However, actual speeds vary greatly between different countries, even between different regions in the same country and different types of connections.
So First issue, viewers who do not have enough bandwidth cannot watch the stream. It will buffer the players continuously while waiting for the packets of the 1080p video to arrive. For example, it will not be possible for you to make an audience living in America and a viewer living in Nigeria happy with the same bitrate.
Second, the RTMP protocol has now lost Adobe’s support. Therefore, it will not be possible to reach large audiences with RTMP playback. Apple’s HLS is much more widely used. You exclude almost anyone with slow data speed, tablets, mobile phones, and smart TV devices without transcoding and transmuxing video.
With video transcoding software, you can stream video files that have different bitrates and frame sizes while converting the codecs and protocols to reach a wider audience. These device and status compatible streams can be packaged into several streaming formats (such as HLS, WebRTC, or CMAF). Transcoding allows us to play videos on almost any screen.
Another important area of use is Internet Protocol camera (IP camera) streaming, such as surveillance and traffic cameras. Adaptive bitrate allows these broadcasts to be watched by large masses without interruption.
We gave the answer to the question of what is transcoding, and we touched on the details. How does YouTube that we all visit a lot during the day use transcoding?
The world’s largest provider of user-generated videos, YouTube, receives over 300 hours of uploads every minute. It uses transcoding to make those videos available in 5+ different qualities and 5+ different formats. This means the original uploaded content can be transcoded into over 20 versions. YouTube kicks off the encoding and transcoding process as soon as the original upload is complete, which is why new videos are often only available in low-resolution until the higher-res videos are transcoded.
Published at DZone with permission of Hamit Demir. See the original article here.
Opinions expressed by DZone contributors are their own.