Livepeer Video Services
Friday, May 20, 2022
Education

What is Transcoding

By
Ivan Kreimer
Ivan Kreimer
8 min read
Computer servers connecting

What is video transcoding?

If you’re ready to add video streaming to your app, you need to understand transcoding, the technology that makes it a reality.

In this article, you will learn what transcoding is, what it means for live streaming, and how you can get started building with the decentralized video streaming tech by Livepeer.

What does transcoding mean?

Transcoding is the process of decompressing (or decoding) an encoded video file and recompressing it into a new format so that viewers who stream using lower Internet speeds, bandwidths, and smaller devices can consume a video at the highest quality possible without buffering.


Encoding and transcoding video for online streaming

To understand how transcoding works, we first need to take a step back and talk about encoding.

Encoding is the process wherein your computer turns an uncompressed audio or video file into a new compressed format so that you can watch it properly on any given device. Your computer compresses the video file with the help of an algorithm known as “codec” (a portmanteau of the words “coder/decoder”).

As the name suggests, the codec is responsible for both encoding and decoding a video file—the former to compress it, the latter to watch it. There are hundreds of video and audio codecs available. For live streaming, the popular codecs are:

  • H.264
  • VP9
  • AV1
  • HEVC
  • VP8


When encoding and decoding a video asset, a video file can lose some of its data in a process known as “lossy compression.” In most cases, the data loss is minimal and undetectable for viewers. For that reason, lossy codecs are ideal for online video and live streaming.

Codecs that lose no data use a compression method known as “lossless.” However, these codecs are often too slow and resource-intensive for the purposes of live streaming.

Encoding is the first step of a video streaming process. Once you have finished encoding your video file, you then need to make it compatible with every viewer's device and Internet speed.

That's where transcoding comes into play.

To learn more about encoding, visit our article What is encoding.

Why is transcoding necessary?

With the advent of live streaming platforms like Twitch and Facebook Live, users expect to stream video from any device, in real-time, anywhere in the world.

Streaming a video directly from a video recording device without a transcoding software or service would prevent viewers with slow Internet connections and low bandwidths from viewing the video properly.

A transcoding software will take your video and simultaneously create different renditions of it, each with a different bitrate and frame size so that any viewer can access your content regardless of their Internet connection and bandwidth.

Imagine you’re streaming a video using the MPEG2 format — common in broadcast television — with a resolution of 3840×2160 pixels (i.e., 4K UHD) at 13 Mbps. Without transcoding it, viewers with slow Internet connections and small devices wouldn't be able to load the video properly. Maybe they'd watch a few seconds uninterrupted at 4K, but soon after, they would have to wait a few seconds to load more video.

With the help of transcoding software, your stream would be compressed in different resolutions and bitrates so that every viewer would get an uninterrupted stream that best suits their Internet speed, bandwidth, and device size.

Transcoding provides a win-win situation for publishers and viewers:

  • For publishers, it reduces the costs and complexity of encoding a video for a diverse set of bitrates and frame sizes.
  • For viewers, it reduces buffering to a minimum, allowing them to enjoy a video stream, and removes any compatibility issues that may arise when using an alternative device (e.g., a tablet, Microsoft Edge browser, etc.).


Transcoding is a CPU-intensive process involving changing several aspects of a video asset’s format at once. Three similar but less resource-intensive processes to transcoding that still benefit publishers and viewers are:

  • Transrating -  which takes a video's bitrates and converts them into lower-quality bitrates without modifying their original size and format.

  • Transsizing - reduces a video’s frame without modifying its content. For example, it takes a video with a 4K Ultra-HD resolution (3840×2160 pixels) and re-packages it for 1080p (1920×1080 pixels) and 720p resolutions (1280×720 pixels).

  • Transmuxing - involves repackaging a video and audio file into a new format without changing its content, bitrate, or size. For example, you may take a video in a Flash (.flv) format that uses the H.264 video codec and AAC audio codec and repackage it into a .mov file.

Transcoding has another process, compression. There are two types of compression techniques that transcoding uses.

Lossless compression

Lossless is a compression method that reduces a video's original data without causing any loss in the original data or its quality, ensuring the highest quality after its decompression.

Lossy compression

Lossy is a compression technique that reduces large files into smaller files and saves memory space. However, some quality data from the original source is lost during this process. The benefit of this method is that it's faster and more efficient for online streaming.


How is Livepeer’s transcoding different?

The hardest problem you want to avoid when streaming content online is latency.

Put simply, latency is the delay (or “lag”) between your encoder, which collects the data from your video and audio recording devices, and the transmission the viewers receive.

A minor amount of latency should be expected in any transmission as the time it takes for data to be transmitted through the web, when aggregated, should add up to a few seconds. But when the latency is high enough that the viewer is aware of the delay between what they view and what’s happening in real life, it can ruin the streaming experience.

The goal for your video workflow is to minimize latency while keeping your reach intact. With that goal in mind, how do you actually achieve it?

Traditionally, broadcasters handled transcoding by sending their video to an onsite or centralized media server that handled the process. Each rendition would be packaged into the delivery format and sent to the CDN edge, where the viewer would load the video to watch on their device.



The problem with this process is that once the broadcaster scales the number of streams, it can quickly run into performance bottlenecks with the media server and transcoding system.

One way to overcome the scalability issue is to run multiple concurrent media servers and load the balance between them. But without proper management, one of the transcoding processes can fail in the middle of a stream.

Here’s where Livepeer’s decentralized network comes into play.

Unlike traditional streaming platforms, Livepeer ingests servers create video segments based on incoming keyframe intervals, with each segment being sent to a network of distributed transcoding clusters.



The ingest makes sure that the latency and performance of each transcoding cluster is never close to its maximum capacity so that it can switch to different clusters in the middle of a stream when performance starts to slow down.

Each transcoding cluster has layers of redundancy and failover, so if a failure happens, they quickly retry within the cluster. Most of the current transcoders in Livepeer’s network are set to run in a multi-GPU environment, balancing load across two to eight GPUs on a single machine. There are instances where a machine can transcode over 100 video streams at the same time. Consequently, the transcoding latency is reduced greatly compared to cloud networks.

Should a performance bottleneck arise — e.g. there's congestion in a region, with a specific ISP or DNS provider — a different independent transcoder cluster can continue the work instantly. All of this work happens through the decentralized network in which Livepeer operates.

Thanks to their focus on ingestion and segmentation, each ingest server can handle several streams simultaneously. Video streamers can be sure they can scale their reach without fearing any bottlenecks in the middle of a broadcast.


Learn more: Livepeer's Always-On Transcoding Network


How much does transcoding cost?

In contrast to cloud services like AWS, whose costs can go as high as $3 per hour, Livepeer offers transcoding costs at a fraction of their prices without compromising on streaming quality, scalability, and reliability.


Livepeer.com offers three pay-as-you-go plans:

  1. The Personal plan is free up to 1,000 minutes of transcoding per month
  2. The Pro plan charges $0.005 USD per minute of video ingested
  3. The Business plan offers custom pricing, ideal for Enterprise clients with large streaming operations

Livepeer can offer industry-shattering low transcoding costs by leveraging a global network of mining farms (known as “Orchestrators”) who offer their unutilized mining equipment (i.e., their GPUs, CPUs, and bandwidth) to ingest and transcode video content in exchange for tokens denominated in Livepeer Token (LPT)

By leveraging a distributed network, Livepeer can transcode video segments in just a few hundred milliseconds. Since Livepeer doesn’t use Amazon cloud services, it can offer cost-effective and flexible pricing based on transcoding usage, not reserved server space.




Articles you may be interested in

Ready to get started?

Contact us anytime about custom pricing for your business.
Join our newsletter to stay up to date on features and new releases.
Livepeer, Inc.
223 Bedford Ave PMB 530
Brooklyn, NY 11211