Solution for DaVinci Resolve 17 Linux/Ubuntu Video Codec Problems
Solution for DaVinci Resolve 17 Linux/Ubuntu Video Codec Problems
Despite being easy to install on Ubuntu 20.04 importing and working on majority of the video clips is failing. This is due to the lack of support of codecs in the DaVinci Resolve free version.
Therefor we need to utilize ffmpeg to convert videos before editing. It's a bit annoying but not that big of a deal.
Here is how you do it
ffprobe davinci_codecs_original.mkv
This will give us information about resolution. In this case it's 1920x1080
ffprobe version N-100080-g7a95cf86ff Copyright (c) 2007-2020 the FFmpeg developers
built with gcc 7 (Ubuntu 7.5.0-6ubuntu2)
configuration: --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --pkg-config-flags=--static --enable-nonfree --enable-gpl --enable-version3 --enable-libmp3lame --enable-libvpx --enable-libopus --enable-opencl --enable-libxcb --enable-opengl --enable-nvenc --enable-vaapi --enable-vdpau --enable-ffplay --enable-ffprobe --enable-libxvid --enable-libx264 --enable-libx265 --enable-openal --enable-openssl --enable-cuda-nvcc --enable-cuvid --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
libavutil 56. 61.100 / 56. 61.100
libavcodec 58.114.100 / 58.114.100
libavformat 58. 64.100 / 58. 64.100
libavdevice 58. 11.103 / 58. 11.103
libavfilter 7. 91.100 / 7. 91.100
libswscale 5. 8.100 / 5. 8.100
libswresample 3. 8.100 / 3. 8.100
libpostproc 55. 8.100 / 55. 8.100
Input #0, matroska,webm, from 'davinci_codecs_original.mkv':
Metadata:
ENCODER : Lavf58.29.100
Duration: 00:00:10.73, start: 0.000000, bitrate: 658 kb/s
Stream #0:0: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 60 fps, 60 tbr, 1k tbn, 120 tbc (default)
Metadata:
DURATION : 00:00:10.733000000
Stream #0:1: Audio: aac (LC), 48000 Hz, stereo, fltp (default)
Metadata:
title : simple_aac_recording
DURATION : 00:00:10.645000000
Run a second pass moving the index (moov atom) to the beginning of the file.
ffmpeg -i davinci_codecs_original.mkv -vcodec copy -acodec copy -movflags faststart davinci_codecs_mooved.mp4
Convert into MOV
format with pcm_s16le
audio codecs:
ffmpeg -i davinci_codecs_mooved.mp4 -vcodec dnxhd -acodec pcm_s16le -s 1920x1080 -r 30000/1001 -b:v 36M -pix_fmt yuv422p -f mov eligible_for_davinci_resolve_import.mov
Now eligible_for_davinci_resolve_import.mov
is ready to be imported into a DaVinci Media Pool.