Alecaddd | Designer Developer Dreamer

Web Design and Development, Digital Painting, Music and Life

  • Who
  • What
  • Uses
  • Blog
Posted in Tutorials

DaVinci Resolve FFmpeg cheatsheet for Linux

If you’re using the free version DaVinci Resolve on Linux or any other OS for that matter, you may have stumbled upon the various limitations that come with this version.

One of the biggest limitations of all is the fact that the free version doesn’t come with any sort of support for the MP4 file format.

This was a huge struggle for me since my entire workflow was based on the usage of MP4 files, from the screen-casting with OBS and file recording on my video camera, to the render and export for YouTube or Vimeo, which love a properly compressed MP4 file.

Solving the issue with OBS was quite easy, involving the changes of some settings by selecting the proper codecs for audio and video rendering.

Dealing with the files coming from my camera, a Canon Rebel T6i, was a whole other story. There’s no way to change the recording format directly within the camera, so I needed to find a solution that allowed me to convert those MP4 files into a format digestible by DaVinci Resolve, without losing too much quality.

FFmpeg to the rescue!

On the official website, FFmpeg is described as “…the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created.”

And holy cow if it isn’t true.

If you’re running any modern Linux distro, FFmpeg should already be included in your system and you should be able to run it via terminal. The hard part was to understand all the options, and those are a lot, and find the correct settings to convert files from a format to another, by keeping the quality high and the MegaByte count low.

Convert MP4 to MOV

This is the command I use to convert a MP4 file recorded from a video camera to a MOV format of the same quality that DaVinci Resolve can import and read.

ffmpeg -i input.mp4 -vcodec dnxhd -acodec pcm_s16le -s 1920x1080 -r 30000/1001 -b:v 36M -pix_fmt yuv422p -f mov output.mov

Convert MKV to MOV with Multiple Audio Tracks

This command seems a bit far-fetched, but if you’re on Linux like me, you’d know that recording multiple audio tracks from OBS is only supported with the MKV video format. Since DaVinci Resolve doesn’t support MVK, here’s the command I use to convert that file into a readable MOV while keeping the audio on their separated tracks.

ffmpeg -i input.mkv -map 0:0 -map 0:1 -map 0:2 -vcodec dnxhd -acodec:0 pcm_s16le -acodec:1 pcm_s16le -s 1920x1080 -r 30000/1001 -b:v 36M -pix_fmt yuv422p -f mov output.mov

Convert MP4 to MOV

When it comes to rendering a file from DaVinci Resolve, I was forced to stick with the MOV format with some high video/audio codec settings. The rendered file is not small, but nonetheless, FFmpeg is more than capable of handling it and converting it into a slim and crisp MP4.

The settings I’m using are those recommended by YouTube for a fast upload and a almost zero processing.

ffmpeg -i input.mov -vf yadif -codec:v libx264 -crf 1 -bf 2 -flags +cgop -pix_fmt yuv420p -codec:a aac -strict -2 -b:a 384k -r:a 48000 -movflags faststart output.mp4

While searching around, I found this super useful list of FFmpeg commands with also a short explanation. If you’re a nerd like me and love these stuff, you’ll be pleased to learn all the different options and what all those weird letters mean and how to fully control the conversion of your files.

Useful Commands

I hope this guys can be helpful to someone else other than myself.

Happy Video Editing on Linux!

Posted on October 12, 2018October 21, 2018
  • Twitter
  • Facebook
  • Reddit
  • Pinterest
How to Install DaVinci Resolve on Ubuntu and fix the audio issue
Akira UX: Building an adaptable UI Header Bar

Recent Posts

  • Thunderbird Development – Implementing Customizable Shortcuts September 4, 2024
  • Featured image of windows loval web development setupEasiest Windows Development Setup – WordPress, Laravel, NodeJS in 5 minutes May 15, 2022
  • We are the generation of forced nostalgia March 27, 2022
  • Working on Thunderbird. UX and UI challenges of an Open Source project. February 23, 2021
  • XP-Pen Artist 12 Pro Review and International Giveaway! January 14, 2020

Podcast Episodes

  • Episode 44 – The Nerds are back! May 18, 2020
  • Episode 43 – This is awkward…getting settled into your new role May 12, 2019
  • Episode 42 – We need to talk about Gutenberg Development Workflow… February 24, 2019
  • Episode 41 – You’re not a real developer, unless… February 18, 2019

Categories

  • Coding 1
  • Reviews 8
  • Tutorials 12
  • Updates 18