What Is Transcoding and Why Is It Critical for Streaming? (Update)August 31, 2022
If you’re thinking about streaming media, you probably fall into one of two camps: either you already know something about media transcoding, or you’re wondering why you keep hearing about it. In either case, you may not be aware of how transcoding media files can improve both the quality of your stream and the size of your audience. In this post, we’ll explain what transcoding is, how it works, and why it’s critical for your streaming success.
Table of contents
What Is Transcoding?
Transcoding is the process of taking an already encoded digital media file and unencoding it to change the file’s size (transize) or bitrate (transrate). This is often done to maximize the number of compatible playback devices, making the encoded data more accessible to a wider audience. In other words, this is the technology that makes it possible for you to watch your favorite Netflix show both on your television and on your smartphone.
Of course, it’s not all about size and bitrate. You might change the audio and/or video format (codec) of your data from one to another, such as changing from an MPEG2 source (commonly used in broadcast television) to H.264 video and AAC audio (the most popular codecs for streaming). You could also add watermarks, logos, and other graphics to your video.
Here’s the rub: Once your video is encoded (compressed), it can’t be changed until it’s unencoded (decompressed). That’s where transcoding comes in.
Although transcoding is an umbrella term that covers several digital media tasks, it is most often used for the following:
- Transrating – This refers specifically to changing a file’s bitrates – the speed with which the data can travel across a network. For example, you can take a 4K video input stream at 13 Mbps and convert it into one or more lower bitrate streams (a.k.a. renditions), such as HD at 6Mbps, 3Mbps, 1Mbps, 600 kbps, etc.
- Transizing – This refers specifically to resizing the video frame, say, from a resolution of 3840×2160 (4K UHD) down to 1920×1080 (1080p) or 1280×720 (720p).
What Is a Transcoder?
It’s all well and good to understand what needs to be done to make transcoding audio and visual media work, but how do you accomplish the above tasks? Transcoding is done using a live transcoder – which will likely take the form of a streaming server or cloud-based streaming platform. This video conversion process is also computationally intensive, so transcoding usually requires powerful hardware resources, including faster CPUs or graphics acceleration capabilities.
What Transcoding Is Not
While media transcoding covers many bases, it’s only one of several tools for manipulating data files. Let’s take a moment to clearly distinguish it from similar terms.
Transcoding vs. Encoding
When you encode raw media files, you compress and format those files to make them small enough for transfer over a network. Transcoding happens after data is already encoded. You can’t alter encoded data, but unencoded, or decompressed, data is another story.
Transcoding vs. Transmuxing
Another term you want to watch out for is transmuxing. Transmuxing might sound similar to transcoding both in name and goal, but it is a distinctly different process.
Transmuxing goes by many names, including transcode-multiplexing, repackaging, and packetizing. Repackaging is possibly a more apt name as this process involves repackaging data into a different file container or delivery format. For example, you could use MPEG-TS containers for an HTTP Live Streaming (HLS) stream and change them to fMP4 containers for Dynamic Adaptive Streaming over HTTP (MPEG-DASH). As different playback devices work with different streaming protocols and containers, this is an effective method for ensuring your media is more widely accessible.
But is this really all that different from transcoding? Transmuxing only alters the outside of the data package. It is not necessary to unencode the data before making these changes. Transcoding, on the other hand, changes the contents of that package. Therefore, it needs to be “opened” first.
As such, it’s important to be wary of terms like “hls transcoding” or “transcoding for hls.” If you are looking to alter your data’s packaging to stream over a different protocol, then you are looking to transmux, not transcode.
Benefits of Using a Transcoder
The biggest benefits of transcoding are best understood through the lens of adaptive bitrate streaming (ABR). This strategy builds out a variety of media file versions for streaming to a wide range of devices across different bandwidths. ABR is an excellent example of how various forms of transcoding, including transizing and transrating, work together to improve a stream.
Diversifying bitrates and resolutions makes it possible to not only reach more devices, but also stream more effectively (and at the highest possible quality) across those devices. Your stream (live or otherwise) will no longer be at the mercy of heavy buffering caused by unexpected dips in bandwidth. This is especially effective for live streaming, as an uninterrupted viewer experience is essential to its promise.
The main benefits of transcoding for adaptive bitrate streaming are three-fold:
- Device agnostic – Not all playback devices are compatible with the same protocols or file types. Transcoding allows you to cover all your bases by creating profiles that target each playback device you want to reach. And we’re not just talking about reaching Apple devices versus Microsoft ones; transcoding helps target everything from large displays to mobile phones.
- Reach a wider audience – Being able to stream to any device is not the only way you can increase your available pool of viewers. Viewers have different internet connection speeds. Some of them are on the move, while others are staying still. Whatever their needs, transcoding for the purposes of adaptive bitrate streaming will make it easier for all of them to access your content.
- Optimize viewer experience – Transcoding for adaptive bitrate streaming also maximizes the quality of your video according to the limitations of both the playback device and network connection. Basically, if you stream at a set rate and the internet bandwidth for the playback device drops, you face buffering. If the opposite occurs and the bandwidth increases, then you are watching a video at a much lower quality than you could be. Transcoding allows you to optimize the video delivery to get the highest possible quality without affecting the integrity of the stream. This is a dynamic approach that accounts for changes on the viewer’s end.
Example: Playback Device Compatibility
Let’s say you want to do a live broadcast using a camera and encoder. You might be compressing your content with a Real-Time Messaging Protocol (RTMP) encoder and therefore 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’ll run into a few problems. First, viewers without sufficient bandwidth aren’t going to be able to view the stream. Their players will constantly be buffering as they wait for packets of that 1080p video to arrive. Secondly, the RTMP protocol is no longer widely supported for playback. Apple’s HLS is much more widely used. 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., HLS), allowing playback on almost any screen on the planet.
Example: Live Streaming for Closed Circuit Systems
Another typical example is broadcasting live streams using an IP camera, as would be the case with surveillance cameras and traffic cams. Again, to reach the largest number of viewers with the best possible quality allowed by their bandwidth and devices, you’d want to support adaptive streaming. You’d deliver one HD H.264/AAC stream to your transcoder (typically located on a server image in the cloud), which in turn would create multiple H.264/AAC renditions at different bitrates and resolutions. Then you’d have your media server (which might be the same server as your transcoder) or streaming service package those renditions into one or more adaptive streaming formats before delivering them to end users.
A Closer Look at Live Streaming Benefits
Transcoding video benefits publishers and viewers by optimizing for each stage of the streaming lifecycle.
On the publishing side, using a transcoder resolves:
- High costs and complexity associated with encoding multiple resolution and bitrate options.
- Limited playback capabilities based on the codecs, protocols, and configurations available in the encoder.
- Inability to leverage next-generation technologies and hybrid workflows.
On the viewer side, using a transcoder resolves:
- Buffering due to low-bandwidth connections.
- Incompatibility due to lacking format support.
- Playback failure due to inadequate device support for the resolution streamed.
- Low-quality delivery to end-users with better connectivity and resolution capabilities than that of the stream delivered.
Choosing A Transcoder
The good news is that a transcoder will help streamline and simplify this process for you. The bad news is that not all transcoders are the same, so you’ll need to carefully consider your needs and choose one that compliments your workflow.
Cloud Transcoding vs. Software Transcoding
Although many streaming content distributors use a cloud transcoding solution to convert their live streams, others might choose to use transcoding software. Weighing the options often comes down to whether they’re deploying their streaming infrastructure on premises or in the cloud.
A cloud-based transcoder offers several benefits, including simplicity, security, reliable scaling, and a substantial reduction in management time. That said, some streaming use cases leverage a large private network to ensure security – in which case a software transcoder might be a better fit.
Audio Transcoding vs. Video Transcoding
Although we’ve spent a lot of time talking about transcoding video in this post, transcoding applies to any kind of digital media file being transferred across a network. The process for doing so is similar, although the specific file types and differentiators may differ, and the benefits are largely the same.
That said, it’s important to acknowledge the distinction between audio and video media for transcoding. Certainly, audio-only media can be transcoded. However, it’s also possible to transcode just the audio of a larger media file that contains both audio and video. When choosing a transcoder, make sure you choose one compatible with the type of media you want to stream. A versatile one will definitely give you more long-term options.
How Can Wowza Help With Transcoding?
Wowza provides robust live transcoding software capabilities to power any workflow. With Wowza Video you get a one-stop integrated solution for transcoding, content management, delivery, playback, and end-to-end analytics. We also offer Wowza Streaming Engine media server software for organizations that need to deploy a software solution on premises or offline. Either solution could be right for you, depending on your unique needs.
Wowza and 4K Transcoding
For anyone looking to support 4K streaming, Wowza products also fit the bill. Wowza Video and Wowza Streaming Engine can both transcode 4K content, but you’ll want to consider the ease of performance tuning. While Wowza Video will automatically configure to meet the demands of 4K once UHD streaming has been selected, Streaming Engine must be configured manually.
You’ll also need a camera and encoder capable of producing a source video that’s 3840×2160 pixels, as well as optimization across your entire workflow. 4K streaming is a greater resource load at every step, so there’s plenty to consider.
- Encoding: The source stream and codecs used must be optimized for 4K streaming.
- First-mile contribution: The network must bear the load of a high-bitrate stream.
- Transcoding: For the software transcoders deployed on premises, CPU/GPU optimization and adequate computing resources are required to support the large amounts of data.
- Distribution: The network will again need to bear a high-bitrate stream, and content delivery network (CDN) costs will increase with 4K distribution.
- Playback: 4K streaming requires more resources from the player client (be it a computer or mobile device) and the viewer’s network. Adaptive bitrate streaming helps alleviate some of these dynamics by only serving up a 4K stream when the end user’s device can handle it.
Transcoding media files is an essential step when streaming to a variety of end-user devices. Luckily, Wowza Streaming Engine and Wowza Video both support numerous transcoding workflows. Whether you’re in the market for a cloud transcoder, software transcoder, or 4K transcoder solution, we’ve got you covered.