What Is Transcoding and Why Is It Critical for Streaming? (Update)February 9, 2023
If you’re exploring streaming media, then 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 streams and the size of your audience. In this article, we’ll explore what transcoding is, how it works, and why it’s critical for your streaming success.
- What Is Transcoding?
- What Transcoding Is Not
- Examples of Transcoding
- Types of Transcoding
- Benefits of Using a Transcoder
- Choosing A Transcoder
- How Can Wowza Help With Transcoding?
- Conclusion: Transcoding FAQ
What Is Transcoding?
Transcoding is the conversion of one type of digital media (audio or visual) to another. More specifically, 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 codec used to compress the data, such as changing from an MPEG2 source (commonly used in broadcast television) to H.264 video and ACC audio (the most popular codecs for streaming). Different streaming protocols may require the use of specific codecs. If your streaming workflow involves using one protocol for ingest and another for delivery, then you could need to alter the compression format of your data somewhere in between.
But 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 bitrate – the speed with which the data can travel across a network. For example, you can take a 4K video input stream at 13Mbps and convert it into one or more lower video 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 one thing to understand what transcoding is and quite another to understand how to make it work. Transcoding is accomplished using a 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 Is Live Transcoding?
You can transcode both live and pre-recorded videos. The process for doing so is more or less the same. However, live videos need to be transcoded in real time, a process often referred to as live transcoding. Live transcoding is as integral to a successful live stream as it is challenging. Live transcoding makes workflows involving adaptive bitrate streaming (ABR) or similar methods possible. However, it can also increase the stream’s latency. After all, it adds a significant stop in between publisher and viewer, causing live streaming delays. If you are looking to implement live transcoding, you’ll want to take extra care to choose a transcoder that can handle your quality, speed, and scaling needs.
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 and is the process for unencoding (decompressing), changing, and re-encoding that data.
Transcoding vs. Transmuxing
Another term you’ll want to watch out for is transmuxing. Transmuxing might sounds 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.
Become a Live Streaming Expert
Everything you need in your inboxSubscribe to Blog
Examples of Transcoding
Is transcoding really worth it given the extra time and infrastructure involved? While it may depend on your audience, it’s almost always better to have a more adaptable workflow that can reach a wider audience across a myriad of devices. In other words: yes.
Of course, it’s easy for us to say that. Consider the following use case examples and the essential role transcoding plays.
Transcoding 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 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.
Transcoding Example: Live Streaming for Closed Circuit Systems
Broadcasting live streams using an IP camera, as in the case of surveillance cameras and traffic cams, is another typical use case for transcoding. 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 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.
Types of Transcoding
Transcoding typically comes in three types: lossy to lossy, lossless to lossless, and lossless to lossy. “Loss” in this case refers to the integrity of the data being compressed and transferred across a network. Lossy compression achieves smaller file sizes by discarding what it identifies as excess information. However, the information is not as “excess” at it may seem. Lossy compression does effectively reduce file sizes but at the expense of quality.
- Lossy to Lossy – Data that was initially compressed using lossy compression is uncompressed and recompressed even further, resulting in even lower quality video.
- Lossless to Lossless – Data that was compressed without discarding any information is uncompressed and again compressed in the same fashion.
- Lossless to Lossy – Data that was compressed without discarding any information is uncompressed and again compressed, only this time with information loss.
There is no such thing as lossy to lossless compression as you can’t recover information that as been discarded previously.
Benefits of Using a Transcoder
The biggest benefits of transcoding are best understood through the lens of ABR. This strategy builds out a variety of media file versions for streaming to a wide range of devices across different end user 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 ABR will make it easier for all of them to access your content.
- Optimize viewer experience – Transcoding for ABR also maximizes the quality of your video according to the limitations of both the playback device for 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.
Overview of Transcoding 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.
Ultimately how beneficial transcoding is for your stream will depend on your use case and target audience. However, the adaptive and scalable benefits of transcoding typically outweigh the added steps in your workflow.
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 transcoding audio media files is similar, although 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 steaming, Wowza products also fit the bill. Wowza Video and Wowza Streaming Engine can both transcode 4K content, but you’ll want to reconsider 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 optimizing 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.
Explore Streaming Options With Wowza
Find out what makes Wowza a preferred streaming partner.Learn More
Conclusion: Transcoding FAQ
Still have some questions about transcoding? We’ve summed up some of the key points above in this FAQ.
What is Transcoding Software?
Transcoding software is software that takes compressed data; uncompresses it in order to alter the size, bitrate, etc; and recompresses it for transfer across a network.
Where is Transcoding Used?
As stated above, transcoding is the best method for transferring data across a network. It’s often used in cases where large scale audiences and audiences using a range of playback devices are being targeted.
Does Transcoding Video Reduce Quality?
That entirely depends on if you’re using lossy compression for your transcoding. Lossy compression is an effective way to reduce file sizes but can result in lower video quality. However, it is possible to transcode data losslessly.
How Long Does It Take to Transcode Video?
This depends on the software you use, whether you are transcoding with lossy or lossless compression, and the size of the video files going in. In any case, transcoding does take time, which is part of makes live transcoding so tricky.
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.