From Mageia wiki
Jump to: navigation, search

How to install and use DaVinci Resolve 19.0.3 on Mageia Linux 9

I've spent the past few years using kdenlive to edit my videos and decided it was time to up my game. In comes DaVinci Resolve.

It wasn't easy to get it to work and that's why I'm writing this guide.

Installing DaVinci Resolve

Here are the steps needed to get DaVinci Resolve to run:

  1. Download DaVinci Resolve
  2. Unzip the file
    1. unzip DaVinci_Resolve_19.0.3_Linux.zip
  3. This gives us the binary installation file - DaVinci_Resolve_19.0.3_Linux.run
    1. Make it executable
    2. chmod 755 DaVinci_Resolve_19.0.3_Linux.run
  4. To install this file, we have to skip some checks.
    1. sudo SKIP_PACKAGE_CHECK=1 ./DaVinci_Resolve_19.0.3_Linux.run
  5. Follow the installation guide and click Finish when it appears.
  6. Before launching DaVinci Resolve, do the following. This way, Resolve uses the system libraries instead.
    1. Taken from this guide for Fedora:
      1. cd /opt/resolve/libs
      2. sudo mkdir disabled-libraries
      3. sudo mv libglib* disabled-libraries
      4. sudo mv libgio* disabled-libraries
      5. sudo mv libgmodule* disabled-libraries
  7. The next step is to move an internal library from the libs folder to the bin folder.
    1. sudo mv /opt/resolve/libs/libBlackmagicRawAPI.so /opt/resolve/bin/

Troubleshooting

I've experienced that DaVinci Resolve doesn't always start right after installation and that a reboot was necessary. Do not know why, but it does work if everything else fails.

Sometimes nothing works and it may be time to start fresh. You can either delete or rename the DaVinci configuration directory. This can be found in ${HOME}/.local/share/DaVinciResolve/

Converting mp4 to ProRes format

DaVinci Resolve does not support x264/x265 videos and you will have to convert these to the Apple ProRes format. The most commonly used format supported by ffmpeg is prores_ks.

Here is the script that I use to convert my mp4 files.

2prores

 if [[ ! -d Prores ]]; then
      mkdir Prores
 fi
 for i in *.$1; do ffmpeg -i "$i" -c:v prores_ks -profile:v 3 -vendor apl0 -bits_per_mb 8000 -pix_fmt yuv422p10le -c:a pcm_s16le "Prores/${i%.*}.mov"; done

Usage of the script

I named my script 2prores and placed in ~/bin/.

The command takes only one input and that is the extension of the video file you want to convert and places it in a new directory named Prores.

2prores mp4

When the script has converted all the files, you are ready to import them in to DaVinci Resolve.

The prores files are quite a bit larger than their mp4 counterparts, so make sure you have enough disk space to house them.

No native x264/x265 export in DaVinci Resolve

DaVinci Resolve doesn't support exporting to x264/x265 on Linux and you will have to convert them after you have rendered your finished video.

The rendered file is really big. For example, a 1 minute 4K YouTube Shorts video uses 12GiB of disk while the converted file, either webm or mp4, uses 50-60MiB.

I use 2 scripts to convert the exported video to 1. webm and 2. mp4.

2webm

 if [[ ! -d out ]]; then
      mkdir out
 fi
 for i in *.$1; do ffmpeg -i "$i" -c:v libvpx-vp9 -cpu-used -5 -deadline realtime -c:a libopus -b:a 384k "out/${i%.*}.webm"; done


2mp4

 if [[ ! -d out ]]; then
      mkdir out
 fi
 for i in *.$1; do ffmpeg -i "$i" -c:v libx264 -preset medium -crf 23 -c:a aac -b:a 384k "out/${i%.*}.mp4"; done

Usage of the scripts

Place the 2 scripts in ~/bin/ and make them executable.

The both take only one argument and that is the file extension of the file(s) you want to convert. The scripts will create a new folder, out, if it doesn't already exist and place the new files there.

 2webm mov
 2mp4 mov

Summary

DaVinci Resolve is a very powerful tool and is used by many professionals all over the world.

There are, however, a few limitations on Linux. These can easily be overcome by using the right set of tools available to us and I've tried to explain as best as I can in this article.

If you have anything to add, please feel free to update this article and/or let me know.