Video Formats Optimize and Manage Video Formats Seamlessly with Cloudinary MOV vs MP4: Which Video Format Should You Use? MP4 vs WebM: Which Format is Right for Your Videos? Is There a Best Video File Format? 10 Top Video Formats 5 Ways to Change Videos to Any Format Lossless Video Format: 7 Popular Formats and How to Choose All You Need To Know About MP4 To MOV Conversion Choosing Your Codec: AVC (H.264) vs. HEVC (H.265) Decoding the Future: x264 vs. x265 Mastering HEVC: The Future-Ready Video Compression Standard Pixel Perfect: H.264 VS H.265 Explained FFmpeg: Features, Use Cases, and Pros/Cons You Should Know VP9 vs. H.264 What Are Container File Formats (Media Containers)? VP8 vs VP9: 8 Key Differences and How to Choose What Is the M4A Format? | M4A vs. MP3 vs. WAV What Is MPEG-DASH? And MPEG-DASH vs. HLS What Are Video Subtitles? Common Formats and Best Practices H.264 Video Encoding: How It Works, Benefits, and 9 Best Practices QuickTime File Format (MOV): Apple’s MPEG-4 Predecessor MP4 Format (MPEG-4 Part 14): How It Works, Pros and Cons MKV Format: How It Works and How It Compares to MP4 AVI Format: Should You Still Use AVI? Windows Media Video (WMV) Format: What You Should Know HD Format: History of HD Video and 8 Formats You Should Know M4V Format: How It Works and MP4 vs. MPV FLV Format: Security Concerns and 5 Reasons to Switch to MP4 Top Six Web-Video Formats of 2024 What Is Video Transcoding? Video Frame Rates Explained Along With Tips for Picking the Right FPS A Primer on Video Codecs Open-Source and Royalty-Free AV1 Compresses Video Efficiently and Effectively Convert Video Formats: Six Essential Features of Video-Conversion Tools OGG Format: An In-Depth Look WebM Format: Basic Facts, Compatibility, and WebM vs. MP4

What Is Video Transcoding?

video transcoding

Video transcoding is the process of converting a video file from one format to another by changing parameters like resolution, bitrate, and encoding. This can be done to optimize the video for playback on different devices or platforms. For example, you might transcode a Windows Media file to MP4 so it can be played on a portable device, or convert a high-definition video to a lower resolution. Here are some other reasons why video transcoding might be useful:

  • Reduce file size: Transcoding can reduce the size of a video file.
  • Enable playback: Transcoding can allow videos to play on devices that don’t support certain codecs.
  • Improve streaming: Transcoding can help create optimized video streams for more widely supported streaming formats, which can ensure live streams are compatible with a variety of screens. It can also help minimize latency and buffering times for video streaming with slower data speeds.

The article delves into the technical aspects and benefits of video transcoding. It explores how transcoding enables the conversion of video files into different formats to meet various needs such as compatibility with different devices and platforms, and improved playback performance.

This is part of a series of articles about video editing effects.

In this article:

video transcoding

What is a Transcoder?

A transcoder is a system or tool used in video streaming which is responsible for transcoding processes. Transcoding essentially refers to the conversion of a video’s format, including its bitrate, codec, or resolution. This process allows the video to be accessible and playable on different devices.

Because transcoding can be a complex and computationally-intensive operation, it requires powerful hardware resources such as faster CPUs or graphics acceleration capabilities. A transcoder usually takes the form of a streaming server or a cloud-based streaming platform.

What is Live Transcoding?

Live transcoding regulates the process of transcoding live videos in real time. The process might seem similar to pre-recorded video transcoding but it’s quite different and challenging as well. Live transcoding is significant in maintaining a successful live stream since it enables adaptive bitrate streaming (ABR) methodologies.

Despite its importance, live transcoding can also lead to stream latency as it introduces a delay between the publisher and the viewer. That means while selecting a transcoder for live transcoding, you need to consider its ability to handle the quality, speed, and scaling demands.

When Should You Transcode Video?

By transcoding video, you accomplish the following:

  • Simultaneously create a set of time-aligned video streams, each with a different frame size and bitrate.
  • Convert codecs and protocols for a larger audience.
  • Package those internet-friendly streams into adaptive streaming formats, such as HLS, enabling playback on almost any screen.

Transcoding is essential for video delivery and streaming if—

  • Your software or device does not support the format of your footage. In that case, transcoding is the only solution.
  • The original footage uses up too many system resources, as in the case of a huge 3K video attempting to play on a mobile device. As a resolution, you must transcode the file for a lighter format.
  • Your video format, such as HD DVD, is out of date. Transcode the media file to a modern format and you’ll be home free.

How Do You Transcode Video?

Even though the video-transcoding process varies from case to case, a few practices are in popular use. Here is an example:

Step 1: Inputs

Two inputs are required:

  • Details of the input file or format, which you can determine by analyzing the transcoded media.
  • The complete set of parameters for the output, which you can access from the rules within the media’s supply-chain system. Alternatively, you can derive it from the metadata according to the variables in the workflow engine.

Step 2: Transcoding pipeline

The pipeline involves processing all the components, such as video, ANC, and audio, in the transcoded file. When transcoding starts, the metadata is split as needed among the components. The transcoder analyzes the file and instructions and then configures the pipe. To shorten the process, concatenate the steps involved instead of performing them sequentially.

“Video

Here is an example of how transcoding works with one component—a video:

  1. Demux the input: Extract all the compressed data from the package, the wrapper, or both.
  2. Decode the video: Decompress the file as close as possible to the original uncompressed frames.
  3. Process the video: Scale, interlace, deinterlace, or perform advanced image-processing steps that change picture elements to improve the perceived result of encoding.
  4. Encode the video: Do that with the required destination codec.
  5. Mux the video: Pack it into a wrapper or package, combining the video with other components as required.

What Are the Types of Video Transcoding?

There are three main types:

  • Standard transcoding, which involves changing the video or audio to transcode a video or stream. For example, streaming a digital conference usually requires working with IP cameras set within a conference space. If those cameras use the Real Time Streaming Protocol (RTSP) and cannot create a video stream suitable for online playback, you can convert the content into an adaptive bitrate stream by transcoding the video.
  • Transsizing (image scaling), which involves resizing a video frame. For example, you can lower a 4K resolution to 1,080 pixels.
  • Transrating, which changes the bitrate without modifying the video content, format, or codec. For example, to ensure that the video can fit into less storage space or can be broadcast over a lower bandwidth connection, reduce an 8-Mbps bitrate to 3-Mbps.

Transrating comprises three types:

  • Lossless to lossless, which maintains the quality of the video across formats, enabling you to take advantage of more effective hardware or compression algorithms.
  • Lossless to lossy, which reduces the quality of the video but yields a smaller and faster file or one that’s compatible with the requirements of a certain platform, browser, or player.
  • Lossy to lossless, which ensures that the video quality does not deteriorate further during the conversion process. Note that, by adopting this process, you cannot regain the data and quality previously lost through compression.

Video Transcoding Example Use Cases

Here are some examples of transcoding use cases:

Converting a Windows Media file to MP4 for Portable Device Playback

The ubiquity of portable devices, such as smartphones and tablets, has driven a need for universally compatible video formats. Windows Media files, while once popular on PCs, are not natively supported on many of these devices. 

By transcoding a Windows Media file to the more widely accepted MP4 format, users ensure that their videos can be played seamlessly across a broader range of devices, including iOS and Android smartphones, tablets, and many other MP4-compatible platforms. 

This conversion increases accessibility and simplifies sharing and playback without needing specialized apps or software.

Adjusting Bitrate to Make 4K Video Streamable

4K videos, known for their ultra-high-definition clarity, come with significantly large file sizes due to the extensive data required to represent their detailed imagery. Streaming such heavy files directly can cause buffering issues, leading to a subpar viewing experience, especially for viewers with limited bandwidth. 

By transcoding and adjusting the bitrate of these 4K videos, the file size can be reduced, making them more suitable for streaming without compromising excessively on visual quality. This ensures that viewers can enjoy high-quality video streams without frequent interruptions or long loading times.

Creating Lower Resolution “Proxy” Files from Camera Captures

When dealing with high-resolution footage directly from cameras, video editors often face challenges in real-time playback during the editing process due to the hefty data loads. Transcoding these high-resolution files into lower resolution, smaller “proxy” files can alleviate this problem. 

These proxy files retain the same temporal characteristics as the original footage but are much easier to handle and manipulate in editing software. Editors work with these lighter files during the editing process and, once completed, the final edit can be conformed back to the original high-resolution footage for final export.

Transcoding Apple ProRes to H.264 for Delivery

Apple ProRes is a high-quality, lossless codec primarily used in professional video editing environments for its superior color fidelity and flexibility in post-production. However, due to its large file size, it’s not optimal for wide-scale distribution or streaming on the internet. 

Before delivering the final video product to audiences or clients, it’s common practice to transcode from ProRes to a more compressed codec like H.264. H.264 retains a good balance between file size and quality, making it an excellent choice for delivery, especially for online platforms and streaming services. 

This conversion ensures that the final product is accessible and streamable to a broad audience without requiring vast amounts of bandwidth or storage.

What Are the Best Practices of Video Transcoding?

Take the steps below to produce high-quality video content through transcoding.

1. Set a two-pass variable bitrate (VBR).

Encode high-quality videos with various scene types through a two-pass VBR. Unlike the regular VBR and CBR [constant bitrate], a two-pass VBR features two encoding stages:

  • The first stage computes the ultimate bitrate required for all the keyframes in the video.
  • The second stage renders the entire video based on those bitrates.

A two-pass VBR chooses keyframes for the scene changes, with the keyframe’s encoding actions relying on the previous and subsequent keyframes. That makes for an effective bitrate for rendering top-quality, prerecorded—but not live-streaming—videos.

2. Select the right bitrate.

Be sure to pick the correct bitrate before encoding video. Such a practice is particularly ideal for CBR-encoded videos that encode at the highest bitrate. Also, keep your VBR the same as the pixel width of your video.

Additionally, the correct bitrate varies according to the kind of video you are encoding. Animated videos play well even at average-to-low bitrates, whereas action movies or videos with dynamic adjustments typically encode at higher bitrates to enhance the quality.

Blocking artifacts, also called pixelations, are formed by an encoding obstruction, which negatively impacts quality during compression. To minimize those artifacts, advance the effectiveness of High Efficiency Video Coding (HEVC) by setting the vertical and horizontal frame-size measurements as multiples of 16.

3. Develop adaptive sets.

For a smooth video playback, create adaptive sets, which are transcodes of the same video with several bitrates. To do that, use adaptive streaming tools to produce a video copy that captures the viewer’s connection speed for a sleek viewing experience.

How Do You Transcode Video With Cloudinary?

Transcode videos the smart way by having Cloudinary automatically select the best codec and the most suitable video format for you. That task, originally slated for images only, now also applies to videos as an integral part of Cloudinary’s video APIs.

Besides, Cloudinary delivers the appropriate video format and codec (H.264, HEVC, or VP9) for the viewing device and browser—a future-proofed capability that will accommodate next-generation codecs like AV1. That’s peace of mind exemplified.

To add the capability of automatic, browser-based format and codec selection, simply set the fetch_format parameter to auto (f_auto in URLs). Most Chrome users would then receive a VP9-encoded WebM file; Safari users, an HEVC-encoded MP4 file. In case those formats do not work on the requesting browser, Cloudinary delivers the video as an H-264-encoded MP4 file, which plays well in almost all browsers.

On top of all that, you can combine the automatic format-selection feature (f_auto) with Cloudinary’s automatic quality feature (q_auto) for even more impressive results. With q_auto, an intelligent quality and encoding algorithm analyzes video content to pinpoint the best quality-compression level and optimal encoding settings, ultimately delivering a premium-grade, small-sized video. A win-win, bar none!

Optimize Your Video Management with Cloudinary

Streamline your video transcoding processes and enhance your viewer’s experience with Cloudinary’s advanced video management solutions. Leveraging the latest in codec technology and automatic format selection, Cloudinary ensures that your videos not only meet but exceed the current standards for quality and performance. Whether it’s through intelligent compression algorithms or adaptive format delivery, our tools are designed to provide seamless video playback tailored to every user’s device and browser.

Take the next step towards optimizing your video content—try Cloudinary today and witness the difference in your digital media projects!

Related content: Read our guide to transparent video and video tagging.

QUICK TIPS
Kimberly Matenchuk
Cloudinary Logo Kimberly Matenchuk

In my experience, here are tips that can help you better optimize video transcoding processes:

  1. Prioritize codec selection based on audience and device support Choose codecs like H.264 or VP9 depending on the target audience and device compatibility. While H.264 offers broad compatibility, VP9 can offer better compression at similar quality levels but might not be supported on older devices.
  2. Use adaptive bitrate streaming (ABR) for varying network conditions Implement ABR to ensure smooth playback across different network conditions. This approach helps deliver the best possible video quality to viewers, reducing buffering and improving user experience, especially in fluctuating network environments.
  3. Transcode to multiple resolutions for diverse viewing experiences Generate multiple versions of your video in various resolutions (e.g., 480p, 720p, 1080p). This allows you to serve appropriate video qualities based on the viewer’s device and network conditions, optimizing both user experience and bandwidth usage.
  4. Leverage cloud-based transcoding for scalability Use cloud-based transcoding solutions to handle large volumes of video content efficiently. Cloud platforms like Cloudinary offer scalable transcoding services that can process videos quickly and handle fluctuations in demand.
  5. Regularly update your transcoding pipeline with the latest codecs Stay updated with emerging codecs like AV1, which offer better compression rates than older codecs. Regularly upgrading your transcoding pipeline ensures that you’re using the most efficient codecs available, which can lead to better video quality and smaller file sizes.
  6. Monitor video quality after transcoding with objective metrics Implement tools to measure video quality post-transcoding using objective metrics like PSNR (Peak Signal-to-Noise Ratio) or VMAF (Video Multimethod Assessment Fusion). These metrics help ensure that the transcoded video maintains high quality and meets the required standards.
  7. Optimize for specific use cases by fine-tuning bitrate and resolution Tailor your transcoding parameters to specific use cases, such as mobile streaming or large-screen displays. For mobile devices, lower resolutions and bitrates might be preferable, whereas for large screens, higher bitrates and resolutions will ensure better visual quality.
  8. Utilize two-pass encoding for complex content For videos with a lot of motion or complex scenes, consider using two-pass encoding. This method allows the transcoder to analyze the video in the first pass and apply the most efficient compression in the second pass, resulting in higher quality at lower bitrates.
  9. Automate transcoding workflows to save time and resources Set up automated workflows that handle transcoding, format conversion, and delivery without manual intervention. This can be achieved using APIs from platforms like Cloudinary, which streamline the entire process, allowing for quick scaling and consistent output.
  10. Test across multiple devices and platforms to ensure compatibility After transcoding, test your videos on a variety of devices and platforms to ensure they play correctly. This helps catch any compatibility issues early and ensures a seamless experience for all users, regardless of their device or network conditions.

By applying these tips, you can enhance the efficiency and quality of your video transcoding processes, ensuring that your content is optimized for a wide range of devices and audiences.

Last updated: Aug 31, 2024