Video editing codecs in Ubuntu 18.04 with Davinci Resolve 15

Hi there,
I just recently switched to Linux on my main system. As I am trying to do as much as possible in Linux and not a VM, I am trying to move to Davinci Resolve 15 from Premiere Pro on Windows.
I managed to install the program and it runs fine (as far as I was able to test it). I shot on a Canon 70D at the moment, so I get .mov files. When I look at them in Resolve, I only get the audio track. I know that h.264 is not yet properly supported, but I can accept to transcoding footage and exports.

The question now is however what codecs to use and how to transcode. I am trying not to loose too much quality and would appreciate good editing performance. I have used Cineform before on Windows and read somewhere that you can use it on Linux but found no further info. When I tried various configurations in Handbrake none of them worked properly (either no audio and tiny file sizes, or they don’t show up at all).

Do any of you have experience with Resolve 15? I know it is still in beta, but it’s the only video editing program on Linux that comes close to Premiere.

first of all, the BMD only supported distro is rhel/centos – problems on other distros are par for the course as BMD doesn’t validate on them

second, resolve 15 is still in beta

third, .mov is a container, could be one of several codecs. The linux version supports RAW formats, prores, AVCHD, DNx, Quicktime HD, Mpeg 4, uncompressed image sequences, and yuv perfectly fine

The reason handbrake isn’t working for you is because it transcodes to h.264

try ffmpeg.

I am not expecting everything to work flawlessly, just trying to see if I can get it to work well enough, or if I will have to stick to a VM with Premiere for now.
I did try the ffmpeg, I am just getting really small file sizes (1/10th the h.264 size), even with the quality maxed, which smells a bit fishy as the h.264 from the camera already is a compressed format.
How the quality really is affected in the end, I would have to test more thoroughly, but 1/10 the size doesn’t sound like quality to me.

The other issue I have with the ffmpeg preset in handbrake is that the output file does have audio when you just play it, however Resolve sees the audio metadata, but doesn’t play it back (does play other audio, so it’s not the audio device).

Do you have a different encoder recommendation that also supports a few of the other codecs you mentioned, as handbrake only seems to support h.26x and ffmpeg?

ffmpeg supports all of the codecs I mentioned, handbrake does not.

use ffmpeg in the cli, NOT handbrake. try:

$ ffmpeg -i  -c:v prores_ks -profile:v 3


$ ffmpeg -i -c:v dnxhd -vf "scale=1920:1080,fps=30000/1001,format=yuv422p" -b:v 110M -c:a pcm_s16le

dnxHD and prores are both known good formats, if both fail to show video, then it’s a problem with your resolve installation

you should try resolve 14, there’s at least a body of knowledge and workarounds on other distros for it.

or, you know, use the distro that BMD and every other commercial creative software vendor validates for

… or GUI. :stuck_out_tongue: WinFF looks fine but I just mention it because I saw it. I haven’t tried it myself so far.

the one liners ensure he’s getting the exact known good spec, whereas a GUI can add doubt

otherwise, yeah.

Oh, now I understand. That makes a lot of sense.

I’ll try the cl code with different codecs to see what works best.
Thanks a lot.

hopefully one of them works for you. What is the source file you’re recording to on the canon? I use CinemaDNG Raws and Prores, both work fine without transcodes

(also, note that you have to change to your source file)

I believe it’s h.264, not 100% though. Resolve can play back the audio, but doesn’t see the video.

should tell you in the settings

oh wow. just looked it up – h.264 only

might want to magic lantern that, it’s a totally artificial limit for a 1200 dollar cam body

I used to use Magic Lantern, DNG Raw is only supported at 720p though. The 70D is more like $700 for the body. I am looking to hopefully upgrade to the BMPCC4k when it comes out though.

1 Like

sony is also a decent choice if you want to keep the ability to shoot stills

my original bmpcc is still going strong, great little camera

I would still have the 70D, and for stills it’s great. I have eyed at some of the Sonys too though.

they put avchd on everything, even entry level. It’s not raw but it’s a lot better than h.264

sony is ahead of the curve on a lot of fronts. actually.

Alright, I did quite a bit of testing today and learned a ton about how codecs work and how many different ones are out there. What ended up working for me is either dnxhd or prores, but by default it changed the audio to aac, which doesn’t work. But when I leave the audio as is (pcm_s16le) then it works.

Next I had the issue that the audio was laggy and caused video and audio to get out of sync. Using this post I was able to fix that too (and other audio issues I had):

I will go through and edit a video with transcoded footage like that and then I will post again with my findings.

While the GUI is nice, it is missing the only feature I care about, it has no GUI to change the codec, but just uses h.264 by default.

Once I am happy with my results and I actually edited a video, I’ll probably end up writing a script that just listens in a folder for new video to transcode and then transcodes it to my settings and puts it in an output folder. That should probably not be too hard.

glad I could help, raw yuv/image sequences should work too

That is definitively the smart thing to do, yeah. :+1:

Decided to write a script first as I didn’t want to convert 20 files manually. Turns out bash is really simple and powerful.

In case anyone is curious, this is the script I came up with. Keep in mind that this is my first bash script, so I probably didn’t use the optimal way to do things, but it works and that’s all that matters to me for now.

for i in ./Input/*
if test -f $i
echo $fileName
ffmpeg -i $i -c:v dnxhd -c:a pcm_s16le -profile:v 3 $outputPath
rm $i

It is so much fun when things work for once :smiley:
Let’s hope I didn’t just jinx my luck as I haven’t started editing yet.

looks fine to me, you could daemonize it and make it watch the folder but that’s a bit extra/

Yea, I want to do that, but my quick google search on how to write bash code didn’t quite go that deep :smiley:
My cli skills arent’t that great either, so I still got a lot of learning to do.