If you are experiencing poor video playback of AVC / H.264 / HEVC codecs in DaVinci Resolve, here’s what you need to know.

There is no magical way to ensure perfect real-time playback of AVC / H.264 and H.265 / HEVC encoded video natively in DaVinci Resolve. These common but complex video codecs need to be decoded before you can work with the images. Decoding AVC or HEVC in real time is dependent on your CPU performance, and if your GPU and software support hardware acceleration.

AVC / H.264 / HEVC / H.265 and DaVinci Resolve

DaVinci Resolve has a long history, with its origins dating back to the early 1980’s as da Vinci Systems, long before the technology was bought by Blackmagic Design in 2009.

DaVinci has always been a high-end color correction and finishing system. It was designed primarily for performance with uncompressed media. Of course, this has changed and the software has evolved to be far more flexible and inclusive of all kinds of common compressed media. In fact, Resolve is compatible with just about every common codec in use today.

Just because Resolve will read your AVC or HEVC encoded camera files, doesn’t mean it will play them back at full resolution in real-time. Depending on your hardware, Resolve may or may not manage to offer real-time playback when working with compressed video sources natively.

DaVinci Resolve Studio does support hardware GPU encoding and decoding if you’re using a compatible GPU. However, the free version of Resolve doesn’t, and so transcoding these files to an easier (less compressed) codec may be the best solution. For various technical reasons, transcoding your AVC / HEVC source media into an edit friendly format is a good idea even if your system does support hardware acceleration.

What is AVC / H.264 and HEVC / H.265?

Camera manufacturers have been using H.264 compression for a long time. More recently H.265 also known as HEVC (High Efficiency Video Coding) has been introduced. HEVC offers roughly twice the image quality of H.264 at the same bit rate, or the same quality at half the bit rate.

One of the most well known is Sony’s XAVC and XAVC-S. Sony XAVC is a very efficient compressed video formats, enabling high quality video encoding in low to intermediate bit-rates and small file sizes. XAVC and XAVC-S are based on the H.264 codec with uncompressed LPCM audio.

It’s not only Sony of course. All consumer video and many professional video formats employ H.264 compression. These codecs are also behind video streaming and broadcast formats.

Video Wrappers

A wrapper is the container for audio and video data. It is where your video file extension comes from… .mov, .avi, .mxf, .mp4 etc. XAVC uses the MXF wrapper, and XAVC-S uses MP4 wrapper, but the video inside is still H.264.

Video Codecs

The H.264 codec is a very flexible codec for efficient video encoding. It comes in a number of profiles which can accommodate different capabilities when it comes to color bit-depth, chroma sub-sampling, resolution, and intra or inter-frame compression. The H.265 / HEVC codec is even more efficient, at the cost of higher complexity.

CPU and GPU Decoding

Any discussion of performance in DaVinci Resolve is always spoken about in close connection with the GPU (Graphics Processing Unit). However, the decoding of source media is generally tasked to the CPU, not the GPU. As I mentioned previously, DaVinci Resolve Studio does support hardware decoding on supported GPU’s.

CPU or GPU, it is important to understand the internal processing pipeline involved. Resolve first must decompress and decode the source media into its uncompressed 32-bit floating point YRGB space regardless of source media color space, color bit-depth or chroma sub sampling scheme.

In the case of H.264 and H.265 this is a computationally intensive task. In order for Resolve to play back your XAVC or XAVC-S (or AVCHD for that matter) at full resolution in real-time, your system CPU (or GPU) must be capable of decoding and expanding the video data into 32-bit float YRGB space in memory in real-time. This is a vast amount of data to generate, from scratch, on the fly.

CPU Decode

Resolve has to decode H.264 and H.265 / HEVC encoded files using your system CPU before full raster video frames can be processed, and while this has been improved in Resolve, it’s still a problem for many on laptops and lower power systems to do this in real time. Working with these codecs natively can also result in audio drift and sync issues over the duration of long clips.

From the DaVinci Resolve 15 Hardware Selection and Configuration Guide on page 5:

However, for editing, VFX, and grading, the compressed data needs to be decompressed to the full RGB per pixel bit depth that can use four times or more processing power of a HD image for the same real time grading performance. The decompression process, like compression, uses the CPU, so the heavily compressed codecs need more powerful and a greater number of CPU cores. H.264 and H.265 are heavily compressed formats and while not idea for editing are often used by lower cost cameras. If you use these types of compressed codecs you will need a more powerful CPU or be prepared to use proxies or Resolves optimized media feature.

The fact is, these codecs have never been good for post production. The solution is to transcode your camera media to an easily decoded post-friendly codec. If you don’t want to do this as a separate step before you start editing, you can create Optimized Media within Resolve, and / or use Render Cache to transcode your clips on the timeline. Each of these has pros and cons.

GPU Decode

If you are running Resolve Studio on Windows, and have a compatible Nvidia GPU, you may be able to take advantage of hardware H.264 decoding. I’ve been told by BMD that hardware decoding is also supported on some AMD and Intel GPU’s but I don’t have a detailed breakdown of what cards support this.

Hardware decoding on Nvidia GPU’s is more clearly documented in the Nvidia Video Encode and Decode GPU Support Matrix.

Hardware decoding is not supported in the free version of DaVinci Resolve, and if your GPU supports it, it may be a good enough reason alone to buy Resolve Studio over using the free version.

How To Improve AVC / H.264 and HEVC / H.265 Performance in DaVinci Resolve

Improving playback performance of compressed media in DaVinci Resolve may require you to transcode your video files into a codec your system can more easily handle. This has the added advantage of allowing you to work with constant frame rate, edit friendly video files that will behave consistently throughout your post production workflow.

Transcoding Media

The fact of the matter is these highly compressed codecs are very efficient for encoding video data into small file sizes. It is not however easy or quick to decode for high-quality finishing and post production processing.

What you can do, is transcode your source media to a intermediate format which Resolve is able to process far more efficiently. These files then become your master media for post. Apple ProRes is a great general purpose format for this, as is Avid DNxHD or DNxHR and as long as you are transcoding at the same resolution, to a less compressed format, in the same or greater color bit-depth, you should not be losing any image quality as a result. Here’s a guide of possible transcode formats to consider.

Mac

  • Apple ProRes 422 HQ – for source media of 8 or 10-bit color depth, 4:2:0 or 4:2:2
  • Apple ProRes 4444 / 4444 XQ – for source media of 10-bit color depth or more, 4:4:4, suitable for HDR

Windows

HD

  • Avid DNxHD 220 – for source media of 8-bit color depth, 4:2:0 or 4:2:2
  • Avid DNxHD 220x – for source media of 10-bit color depth, 4:2:2
  • Avid DNxHD 444 – for source media of 10-bit color depth, 4:4:4

4K

  • Avid DNxHR HQX – for source media of 8 or 10-bit color depth, 4:2:2 or 4:2:0
  • Avid DNxHR 444 – for source media of 10-bit color depth or more, 4:4:4, suitable for HDR

The resulting transcoded media should have the same timecode as the source media as well as the same filename. Only the file extension may have changed. Transcode into a separate folder in order to avoid overwriting your camera source files if the extension is the same. The resulting files will be larger, but since all the decoding of the source files has been done, Resolve no longer has to rely on the CPU to do it in real-time.

DaVinci Resolve Optimized Media

If you don’t want to transcode all of your source media before bringing it into Resolve, you can use Resolve’s built in Optimized Media tool. DaVinci Resolve gives you the option of generating optimized media directly from clips in the media pool and it handles all the internal linking of files between your original camera files and the optimized media, allowing you to switch between camera media and optimized media in your timeline. You can set the resolution and format for the optimized media in the General panel of the Project Settings.

There are a number of formats to choose from, but keep in mind your storage configuration when you select one. Resolve stores optimized media on the same scratch disk location it stores render cache files. You’ll need to make sure you’ve specified a location on fast enough storage to read your optimized media real-time.

Resolve lets you make optimized media in any flavor of Apple ProRes from “Proxy” up to 4444 XQ as well as Avid DNxHR LB through 444. You also have the option of making Uncompressed 10-bit or Uncompressed 16-bit float media which is stored in Resolve’s own .dvcc image format.

Conclusion

Transcoding your AVC / H.264 and HEVC / H.265 encoded media before bringing it into Resolve, or generating optimized media within Resolve is your best solution to improve performance, stability and reliability throughout your post production workflow.

Further Reading

Please don’t hesitate to comment with your questions either here, on Youtube, or hit me up on twitter, I will always reply.

10 Comments

  1. Still transcoding XAVC S to ProRes before using in Resolve. Brorsoft Video Converter is the app I’m using.

  2. Do you think this is still true for Resolve 14? As far as I can tell they did a great job optimising h.264 performance.

    • Hi Robert, that’s a very good question. I haven’t used the beta 14 yet but will install once it’s in public release and test it.

  3. – and how do you do this? Thank you for all this info btw, extremely helpful!

    • Richard Lackey

      Hi Liam, thanks, and thanks for the question. You can use Resolve to transcode. It’s not complicated but involves more than I can explain in a comment reply. I’ll put it on my list to make a step by step guide.

  4. Can you toggle off the proxy(optimized media) of an individual clip in order to color grade the full resolution in the timeline? Or do you have to toggle ALL the “optimized media” clips off at the same time?

    • Richard Lackey

      Hi Liam, as far as I am aware you only have clip level control when using render cache, but not for optimized media. This would be a good feature for Blackmagic Design to add however. Resolve 14 has a lot of changes which I haven’t had time to investigate yet. I’ve been hearing the 14 beta is buggy, and I don’t want to take the risk installing it at the moment.

  5. Upgrading from 12.5 to 12.5.3 appears to put DNxHD options back into the cache/optimize listing.

  6. Unfortunately I cannot get the Avid DNxHD codec to show up in Resolve 12.5 despite having installed the Avid Codec LE pack from the September 15th 2016 knowledge base. (Even copied the qtx files to the QTSystem folder for good measure). The only format option I get for cache/optimized media is Uncompressed 10-bit and 16-bit on a Windows 10 x64 system.