Blackmagic DaVinci Resolve on Linux

21/05/2021 - 16:46
Average: 4 (2 votes)

Blackmagic Designs DaVinci Resolve is one of the most powerful video editing suites available that runs on Linux. There are some quirks with DaVinci Resolve under Linux and this guide will help you with those.

There are two versions available of Blackmagic Design DaVinci Resolve, the free version and the paid studio version:

  • Free version - Free to download and use. It has some limitations on used export resolutions, available plugins and some features (noise reduction, audio and video encoders/decoders). For many users this version does pretty much everything you might need.
  • Studio version - Relatively cheap (~300€) version that has no limitations, all features are available. This version required a license, either a registration code (allows two installations) or a USB license dongle (that must be connected at all times). Updates from major and minor versions have been free so far. Unfortunately, even with this paid version, there are encoder and decoder limitations under Linux. If you need to work with interlaced material, noise reduction and all possible video effects, then you need this paid version.

    If you get the license Dongle version you can also use Fusion, the separate Video FX suite.

The current version of DaVinci Resolve is 17.2

DaVinci Resolve is obviously not free software, open source or anything close to that, but it does use plenty of open source software internally like Qt (5.4.1 to be specific), SoX Resampler library libsoxr, OpenCV 3.4.1 and FFMPEG. (Yep, ffmpeg, the all decoding and encoding video tool. The irony...). (And yes, I've tried replacing the ffmpeg libraries with ones that support more formats, no luck there unfortunately). The Studio version also supports scripting with Python.

Hardware and software requirements

Resolve does have some hefty hardware requirements, a powerfull CPU and GPU with plenty of VRAM is required, especially if working on anything higher than Full HD or using GPU specific features like noise reduction. The open-source drivers will not work, you do need to use proprietary NVIDIA or AMD Radeon drivers.

Minimum system requirements for Resolve on Linux, according to Blackmagic, are:

  • CentOS 7.3
  • 32 GB of system memory
  • Discrete GPU with at least 2GB of VRAM
  • GPU which supports OpenCL 1.2 or CUDA 11
  • NVIDIA/AMD Driver version – As required by your GPU

You also need to have:

  • CPU with SSE4 (So you are out of luck on older CPUs even if specs would otherwise be fine)

Experience has shown that you can work with less memory if you keep to simple features, 8-16GB memory should be fine for basic cutting of Full HD fotage. NVIDIA GPU is highly recommended, AMD GPU should work too, but afaik, some effects are CUDA only.

Any decent Linux distribution should be OK, the officially supported distribution is a very old CentOS 7.3 but who uses something like that ? Experience has shown that Linux Mint for example works perfectly, so any Ubuntu derived distribution should be OK, as are other distributions too.

Make sure you have up to date GPU drivers and that your GPU is supported, minimum CUDA version is 11 or OpenCL 1.2. Also GPU with 4 GB of VRAM is higly recommended for any serious work. And for any GPU based features like noise reduction or effects, 4K resolution the more the better.

Download DaVinci Resolve

You can find downloads of Resolve to the latest versions and also old version (great if your CPU/GPU is not up for the latest and greatest!) at Blackmagics support site, in the Latest downloads section.

Be sure to pick the right version, if it has Studio in the name then you need to buy a license activation code or have the license dongle.

Decoding and encoding limitations

Both the Free and Studio versions have very limited support for both audio and video decoders and encoders, especially with Linux. The Studio version is a bit better than the free version in this regard, but it is still much worse than on Windows or OS X.

Video decoder limitations

The free versions has a very limited support for video decoders in all supported operating systems, but especially limited under Linux. The de-facto standard (consumer) video formats that are used everywhere like h264 and h265 are not supported at all. Fortunately there are workarounds, a bit time and space consuming, but still, easy.

The studio version does support h264 and h265.

Video encoder limitations

There are also limitations in the encoding part, or exporting formats. Here too h264 or h265 is not supported under Linux in the free version.

The studio version support h264 encoding.

Quality wise it is also recommended to export in DNxHR and to the final h264 encoding with ffmpeg anyway.

Audio encoder limitations

Audio encoding support is very bad in both versions, even the paid Studio version won't export anything other than uncompressed PCM. Blame idiotic software patents for this. There is no support for any standard encoding (Advanced audio coding, aac) formats under Linux. Using uncompressed PCM audio is the best (and only) option and then re-muxing with ffmpeg and compressing the audio, see below for examples.

There is nothing wrong with uncompressed audio, it is the best quality you can have after all. The issue is with playback, not all software and especially consumer hardware supports it in video containers.

Workarounds for encoder and decoder limitations

FFmpeg to the rescue! It does add an extra step, but not a big deal.

Decoding or re-muxing video

Operation FFMpeg command
Extract audio from video to raw 16-bit PCM .wav ffmpeg -i video.flv -c:a pcm_s16le audio-only.wav
Encode to DNxHR-HQ and PCM audio ffmpeg -i video.mov -c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv422p -c:a pcm_s16le video-dnxhr-gq-raw-pcm.mov
Re-mux video, decoding audio to PCM, copying video ffmpeg -i video.mov -c:v copy -c:a pcm_s16le video-encoded-audio-raw-pcm.mov
   

Encoding video and audio

Operation FFMpeg command
Encode audio to AAC, copying video ffmpeg -i video-h264-audio-raw-pcm.mov -c:v copy -c:a aac video-h264-audio-aac.mov
Encode to DNxHR-HQ and PCM audio ffmpeg -i video.mov -c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv422p -c:a pcm_s16le video-dnxhr-gq-raw-pcm.mov
Encode high quality h264 video and AAC audio ffmpeg -i video.mov -preset veryslow -crf 14 -c:a aac -b:a 256k video.mp4

Speed Editor keyboard

The Speed Editor keyboard should work fine with 17 (initial support in beta 4) using USB (Bluetooth support unknown).

You might need to fix the device access with a udev rule like:

KERNEL=="hidraw*", ATTRS{idVendor}=="1edb", ATTRS{idProduct}=="da0e", MODE="0660", TAG+="uaccess"

HiDPI issues

Under some desktop environments you might have issues with scaling when using HiDPI displays. A workaround is to set a couple Qt environment variables:

export QT_DEVICE_PIXEL_RATIO=2
export QT_AUTO_SCREEN_SCALE_FACTOR=true

Other limitations

Related resources

Color grading and color management

Keywords: 
Blackmagic, FFmpeg