Skip to main content

Command Palette

Search for a command to run...

DaVinci Resolve on Linux: Solving the Codec Nightmare (With a little help from AI and Diolinux)

The Real Challenge: 500 Videos and a Deadline

Updated
3 min read
DaVinci Resolve on Linux: Solving the Codec Nightmare (With a little help from AI and Diolinux)

It all started with a very real problem right here at home. My wife, a primary school teacher locally, took on the herculean task of recording and editing a major school project. Suddenly, she found herself with around 500 raw videos and clips shot on various cell phones and digital cameras, needing to edit everything quickly and professionally from home.

The tool choice was obvious: DaVinci Resolve. It’s professional and offers the necessary organization and logging features to handle such a massive amount of footage.

The Linux "Elephant in the Room"

However, it wasn't smooth sailing. When we imported the files into the free version of DaVinci Resolve on Linux, we hit a brick wall: the software doesn't natively recognize the standard audio and video formats from most mobile phones (like H.264/H.265 codecs and AAC audio). The result? A screen full of "Media Offline" warnings for 500 files.

The industry-standard solution is transcoding to edit-friendly formats (like ProRes or DNxHR). But doing this manually, file by file, for hundreds of videos—and for new materials that kept arriving during the process—was humanly impossible. We needed a fast, automated solution.

The Inspiration: The Open Source Legacy

Remembering the culture of sharing, I turned to a classic solution from the Brazilian Linux community as a foundation: a script created years ago by Henrique from the Diolinux team and adapted by Mateus Müller. The structure was solid, but it needed an urgent update to handle the volume and variety of our modern workflow.

AI Acceleration: Pair Programming to Solve the Problem

With the school project deadline looming, there was no time to spend hours reading ffmpeg documentation or testing Bash loops. This is where the key to modern productivity stepped in: the use of AI with Gemini.

We took the original script and transformed it into a robust, hybrid tool. The process was accelerated learning focused squarely on solving the real-world problem: I defined the needs ("it needs to convert WhatsApp audio too," "it has to organize everything into subfolders so she doesn't get lost"), and the AI suggested the best technical implementations in seconds, explaining every line.

The Result: to_davinci.sh v2.0

The result was the salvation of the project. We created a script that:

  • Recursively scans the media folders she receives.

  • Automatically identifies if it's video (MP4, MOV) or audio (M4A, MP3 from WhatsApp).

  • Applies the correct "recipe" for each (Video -> MPEG4/PCM; Audio -> WAV/PCM), generating files that DaVinci loves.

  • Automatically organizes everything into "converted" subfolders.

It was a massive problem solved by uniting the legacy of open source with the speed of artificial intelligence. You can check out the full code we used, the usage manual, and drop a star on the GitHub repository below.

https://github.com/paulorabelo/to-davinci-media-converter