Skip to content

H.264 / H.265 DECODING


FRIENDLY / UNFRIENDLY

CODECS

Video codecs conveniently fall into two categories: Edit-friendly and edit-unfriendly codecs.

Edit-friendly codecs include:
Formats like ProRes, DNxHD, DNxHR, BRAW, R3D, and ARRIRAW are typically found in professional cinema cameras manufactured by renowned brands such as ARRI, Blackmagic Design, and RED.

Edit-unfriendly codecs include:
The “Group of Pictures (GOP)” type of codecs includes formats like H.264, H.265, HEVC, AVC, and MPEG-4. They are created expressly to reduce video file size. Due of their small size, these codecs are frequently utilized for streaming services, media players, and DVDs. It’s crucial to keep in mind that they weren’t created with the intention of being extensively processed or edited.

The H.264 and H.265 codecs are widely used in various devices such as smartphones, DSLR cameras, drones, and consumer cameras. When trying to edit this type of video, software like DaVinci Resolve Studio has to decode the heavily compressed files, resulting in less than smooth playback that’s often slow and jerky, and real-time playback is rarely possible.

The Blackmagic DaVinci Resolve “Supported Formats and Codecs” Guide provides a detailed overview of all video and audio file formats and codecs that the software is compatible with. Last updated in March 2023, this document provides a comprehensive resource for users working with different file formats.


GOP STRUCTURE

GROUP OF PICTURE CODECS

The “GOP structure” can potentially cause issues with video editing software like DaVinci Resolve, leading to stuttering and decoding problems. Here’s a concise explanation:

File Access Issues: GOP structure’s frame interdependencies can cause difficulties for software trying to open the file.

Stuttering: The GOP structure’s dependence on surrounding frames can create difficulties for real-time playback in editing software. If the software struggles to decode the frames correctly or quickly enough, it may result in stuttering playback during editing.

Decoding Issues: GOP compression requires decoding multiple frames to access a single frame. If the decoding process encounters errors or inefficiencies due to the GOP structure, it can result in decoding issues, leading to playback problems or visual artifacts.


H.264 DECODING

SUPPORT IN DAVINCI RESOLVE STUDIO

DaVinci Resolve Studio is capable of hardware decoding of H.264 and H.256 media, but does not support all types of H.264 and H.265 media. In addition to the codec itself, the bit depth (8-bit, 10-bit) and chroma subsampling (4:2:0, 4:2:2, 4:4:4), as well as your computer’s GPU, are also taken into account, affects whether you can take advantage of hardware decoding or not. Here is an overview of H.264 decoding support in DaVinci Resolve Studio 17.4:

H.265 DECODING

For H.265, 8-bit 4:2:0 and 10-bit 4:2:0 seem to work well. But for 4:2:2 / 4:4:4 you have to be lucky to have the right GPU/CPU for DaVinci Resolve Studio to take advantage of hardware decoding.


PROXY WORKFLOW

MAY PRESENT ISSUES

The proxy workflow, while beneficial for smoother editing, may present issues, specifically in the rendering stage of the post-production process. The primary concern lies in the need to render using the original files, not the proxy versions. Here’s a clear explanation:

Switching Difficulties: Often, when employing a proxy workflow, editors must switch from using proxy files back to the original files when it’s time to render or export the final video. Depending on the software and the complexity of the project, this can become a cumbersome and time-consuming process, increasing the chances for errors and complications.

Time Remapping, Effects and Transitions with GOP: Effects like time remapping, which involves changing the speed of clips, and transitions, which involve seamlessly blending two or more clips together, rely heavily on precise frame access and manipulation. In a GOP structure, where certain frames (like B-frames and P-frames) are dependent on other frames for complete information, these effects become significantly more complicated.

Decoding H.264 GOP Files: When transitioning back from proxy files to the original H.264 GOP files, these original files need to be decoded for rendering. The decoding process relies on understanding and correctly interpreting the dependencies between frames in the GOP structure. However, this decoding is influenced by a multitude of factors including the capabilities of the hardware, efficiency of the software, and the complexity of the video itself.


SOLUTION

CONVERT TO DNxHR

In contrast, converting original files to a format like DNxHR that handles each frame independently, rather than in groups, could alleviate these issues. This can offer more efficient editing and smoother implementation of effects and transitions, all while preserving the high-quality visual details of the original files.

I suggest converting H.264/H.265 files into a codec that is suitable for editing, such as DNxHR. Several tools are available for transcoding your footage, and I will provide a step-by-step guide using “Shutter Encoder“, a free tool designed specifically for video conversion.

Step 1 = Browse and choose your H.264/H.265 file.
Step 2 = Choose function and select DNxHR.
Step 3 = Choose HQX for 12-bit 4:2:2 Broadcast-quality.
Step 4 = Start function.


DNxHR

CODEC

DNxHR is a lossy-compressed video data format developed by Avid. Initially designed as an “intermediate format” for video editing in post-production, DNxHR has now become widely utilized across the entire production process. Unlike DNxHD, DNxHR supports resolutions of 4k and beyond, offering increased flexibility. Below is a list of various quality settings available for transcoding your acquired media:

DNxHR LB – 8-bit 4:2:2 – Low Bandwidth
DNxHR SQ – 8-bit 4:2:2 – Standard Quality
DNxHR HQ – 8-bit 4:2:2 – High Quality
DNxHR HQX – 12-bit 4:2:2 – 4K Broadcast-quality delivery
DNxHR 444 – 12-bit 4:4:4 – Cinema-quality delivery


ADDITIONAL LINKS

FOR FURTHER EXPLORATION