Hackernoon logoWhat is Transcoding and Why is it Important for Video Streaming? by@antmedia

What is Transcoding and Why is it Important for Video Streaming?

Ant Media Server Hacker Noon profile picture

@antmediaAnt Media Server

Ant Media provides a scalable and adaptive WebRTC based Ultra Low Latency Video Streaming Platform.

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?


Encoders are devices that convert video files from one format to another. They can be either hardware or software-based. Encoders are essential for converting the RAW video files from your camera to streamable digital files.

Your encoder takes the necessary format and converts it into codecs through a compression/decompression process. The standard streaming protocol for internet sources is H.264. 

We also recommended the video compression format for HD streaming. The H.264 protocol can create what’s called “lossless compression.” For audio-only streaming, there are two popular choices: MP3 (MPEG Audio Layer III) and AAC (Advanced Audio Coding).

There are two important protocols for broadcasting to keep in mind: WebRTC and HLS streaming protocols. Both of them are HTML5 based protocols.

What Is Transcoding?


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)

Why Is Transcoding Important For Streaming?


Transcoding is critical when you want to reach more viewers. For example, let’s say you want to do a live broadcast using a camera and encoder. You might be compressing your content with a HLS encoder, and select the H.264 video codec at 1080p.

This needs to be delivered to online viewers. But if you attempt to stream it directly, you will have a few problems. First, viewers without sufficient bandwidth aren’t going to be able to view the stream. Their players will be buffering constantly as they wait for packets of that 1080p video to arrive. Without transcoding and transmuxing the video, you will exclude almost anyone with slower data speeds, tablets, mobile phones, and connected TV devices.

Using a transcoding software or service, you can simultaneously create a set of time-aligned video streams, each with a different bitrate and frame size, while converting the codecs and protocols to reach additional viewers. This set of internet-friendly streams can then be packaged into several adaptive streaming formats (e.g.,WebRTC), allowing playback on almost any screen on the planet.

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—and 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.


Join Hacker Noon

Create your free account to unlock your custom reading experience.