[Solved] Supported Linux codecs

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline

doodloo

  • Posts: 7
  • Joined: Thu Jun 07, 2018 12:58 pm
  • Real Name: Pierre Martin

[Solved] Supported Linux codecs

PostThu Jun 07, 2018 1:14 pm

Good afternoon everyone,

My name is Pierre, I'm discovering Resolve as a hobbyist and have no intent to get serious about it - that being said I want something that is accurate and has meaningful features - I tried many other Linux products and didn't get satisfied.

After tinkering a bit around, I was able to get Resolve to start on my distro (It's a Xubuntu 18.04). I would suggest to the dev team that they package either a snap or an AppImage, as both formats allow to embed dependencies and circumvent the necessity on relying on the user system's dependencies for most of them.

Now that Resolve starts properly, I've been trying to import some videos I have. They were created by some screen capture tool (nVidia Geforce Experience on Windows) and unfortunately they aren't played back by Resolve.
So I searched a little bit in the forums here, and discovered that H264 isn't supported on Linux. After checking my source clips, it appears they're in H264.

So I tried to convert them to other various formats - so far I've tried all built-in presets from VLC and a few other manuals, as well as some other using ffmpeg, but every time either the file just cannot be dragged-n-dropped to resolve, or when it is it just shows as unplayable (No preview, and play button does nothing).

At this point, I am a bit puzzled and am wondering whether or not I might have missed something else preventing me to play stuff altogether in Resolve.

I would really appreciate some help from other Linux users here, as video editing in general is really not my strong suit.

Thank you and have a good day!
Pierre.
Last edited by doodloo on Fri Jun 08, 2018 5:33 pm, edited 1 time in total.
Offline

Martin Schitter

  • Posts: 899
  • Joined: Tue Apr 28, 2015 10:41 pm

Re: Supported Linux codecs

PostThu Jun 07, 2018 3:20 pm

external transcoding of footage to DNxHR or ProRes and uncompressed PCM audio should work in resolve for linux...
Offline

doodloo

  • Posts: 7
  • Joined: Thu Jun 07, 2018 12:58 pm
  • Real Name: Pierre Martin

Re: Supported Linux codecs

PostThu Jun 07, 2018 5:53 pm

Martin Schitter wrote:external transcoding of footage to DNxHR or ProRes and uncompressed PCM audio should work in resolve for linux...

Tank you Martin. Do you know of any way to get videos transcoded to that using standard tools, like VLC or ffmpeg? Again, I'm fairly new to that whole thing.
I tried converting some of my clips ffmpeg:
Code: Select all
ffmpeg -i "Clip.mp4" -c:v dnxhd -profile:v dnxhr_hq "Clip.mov"

Now I get a slightly different result - if I drag and drop that clip to Resolve's media pool, it asks if it's OK to change the framerate to match the clip's (meaning it can probably read the headers), and then Resolve just crashes cold.
Last edited by doodloo on Thu Jun 07, 2018 6:49 pm, edited 1 time in total.
Offline

Andrew Kolakowski

  • Posts: 9206
  • Joined: Tue Sep 11, 2012 10:20 am
  • Location: Poland

Re: Supported Linux codecs

PostThu Jun 07, 2018 6:54 pm

If you have audio then you need to specify codec for it. Add:

-c:a pcm_s24le (for 24bit PCM)

otherwise you will end up with AAC audio which is default codec.
Offline

doodloo

  • Posts: 7
  • Joined: Thu Jun 07, 2018 12:58 pm
  • Real Name: Pierre Martin

Re: Supported Linux codecs

PostThu Jun 07, 2018 7:02 pm

Andrew Kolakowski wrote:If you have audio then you need to specify codec for it. Add:

-c:a pcm_s24le (for 24bit PCM)

otherwise you will end up with AAC audio which is default codec.


Thanks Andrew, but Resolve still crashes without explanation when trying to add those clips. I converted one using:
Code: Select all
ffmpeg -i "Clip1.mp4" -c:a pcm_s24le -c:v dnxhd -profile:v dnxhr_hq "Clip2.mov"

To be honest I don't think the sound codec is the issue here.
Offline

Andrew Kolakowski

  • Posts: 9206
  • Joined: Tue Sep 11, 2012 10:20 am
  • Location: Poland

Re: Supported Linux codecs

PostThu Jun 07, 2018 7:11 pm

Strange.
Try ProRes -c:v prores

Try also forcing fps by adding eg. -r 25 before -i (-r 30000/1001 for 29.97) or whatever your source is.
Can you actually import any file without crash?
Offline

doodloo

  • Posts: 7
  • Joined: Thu Jun 07, 2018 12:58 pm
  • Real Name: Pierre Martin

Re: Supported Linux codecs

PostThu Jun 07, 2018 7:55 pm

Andrew Kolakowski wrote:Strange.
Try ProRes -c:v prores

Try also forcing fps by adding eg. -r 25 before -i (-r 30000/1001 for 29.97) or whatever your source is.
Can you actually import any file without crash?


Andrew,

No, I was never able to import *any* clip into Resolve, that's what I was explaining in my original post, in spite of having tried every possible codec around. For all other codecs, Resolve doesn't crash, but doesn't show anything in the media pool other than a black preview. When looking at the information for that media item, Resolve shows the sound track info, but nothing for the video. Resolve crashes *only* when using the DNXHD codec as suggested earlier.

Now I tried using ProRes, for some reason I cannot even convert the clip to ProRes using ffmpeg, before the ffmpeg step was working:

Code: Select all
ffmpeg -i "Clip1.mp4" -c:v prores -profile:v 3 -c:a pcm_s24le "Clip1 - Prores.mp4"


I'd like to stop here with the fiddling around - would you mind linking me to any small clip *known* to be importable in Resolve, so I can check that it indeed works with my installation as well?
Offline

Andrew Kolakowski

  • Posts: 9206
  • Joined: Tue Sep 11, 2012 10:20 am
  • Location: Poland

Re: Supported Linux codecs

PostThu Jun 07, 2018 8:52 pm

You can't use mp4 wit ProRes, you need to use .mov

Code: Select all
ffmpeg -i "Clip1.mp4" -c:v prores -profile:v 3 -c:a pcm_s24le "Out.mov"


Arri has some Alexa ProRes sample files on their ftp. They definitely should work in Resolve.

http://www.arri.com/camera/alexa/learn/ ... e_footage/
Offline
User avatar

Dwaine Maggart

Blackmagic Design

  • Posts: 11208
  • Joined: Wed Aug 22, 2012 2:53 pm

Re: Supported Linux codecs

PostThu Jun 07, 2018 9:08 pm

Typically, if Resolve is crashing when it sees a valid video file, the GPU is not being properly recognized.

Are you getting a GPU warning when you launch Resolve?

Do you have the proper NVIDIA driver installed, assuming you have an NVIDIA GPU?
Dwaine Maggart
Blackmagic Design DaVinci Support
Offline

doodloo

  • Posts: 7
  • Joined: Thu Jun 07, 2018 12:58 pm
  • Real Name: Pierre Martin

Re: Supported Linux codecs

PostFri Jun 08, 2018 1:18 pm

Hi Dwaine and thanks for your help,

Dwaine Maggart wrote:Typically, if Resolve is crashing when it sees a valid video file, the GPU is not being properly recognized.


I can tell that the GPU is recognised and not the problem here - no warning, and in one of Resolve's window I saw that it was being used properly. It's a GTX 1060, it is properly used with Blender, Chrome WebGL etc.

Would anyone have a sample clip that is *known to be importable* in Resolve under Linux as a baseline for diagnostics please? Also, is there a place where I can find verbose logs?
Offline

Lance Braud

  • Posts: 49
  • Joined: Wed Jul 29, 2015 3:07 am

Re: Supported Linux codecs

PostFri Jun 08, 2018 3:44 pm

Resolve Studio v16.2.3 | Nvidia GTX 1070 | v451.48 | Win10 x64 | AMD TR-1950X 16G RAM
Offline

doodloo

  • Posts: 7
  • Joined: Thu Jun 07, 2018 12:58 pm
  • Real Name: Pierre Martin

Re: Supported Linux codecs

PostFri Jun 08, 2018 5:28 pm

Thank you Lance,

The video pointed out by Lance works. I guess I'll have to try and find a way to convert all my clips into this specific format, `ffprobe` gives me the following info about your clip:
Code: Select all
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Downloads/sample.mov':
  Metadata:
    major_brand     : qt 
    minor_version   : 512
    compatible_brands: qt 
    encoder         : Lavf58.13.102
  Duration: 00:00:18.06, start: 0.000000, bitrate: 3393 kb/s
    Stream #0:0(eng): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 1982 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 24k tbc (default)
    Metadata:
      handler_name    : DataHandler
      encoder         : Lavc58.19.101 mpeg4
    Stream #0:1(eng): Audio: pcm_s16le (sowt / 0x74776F73), 44100 Hz, stereo, s16, 1411 kb/s (default)
    Metadata:
      handler_name    : DataHandler

Do you know any quick-and-dirty way of having `ffmpeg` generate something similar from my clips?
I'm going to try with:
Code: Select all
ffmpeg -i "Clip1.mp4" -c:v mpeg4 -q:v 5 -c:a pcm_s16le "Clip1.mov"


[EDIT]It worked! Thanks for all your help, this is awesome![/EDIT]
Offline

Lance Braud

  • Posts: 49
  • Joined: Wed Jul 29, 2015 3:07 am

Re: [Solved] Supported Linux codecs

PostFri Jun 08, 2018 6:23 pm

Glad that worked. The ffmpeg command I used was:

ffmpeg -i <input> -c:v mpeg4 -force_key_frames "expr:gte(t,n_forced*1)" -c:a pcm_s16le <output>.mov

The force_key_frames bit made performance much better in Resolve 12.5, but I don't know if it's still needed in 14+. This format will work fine for clips you just need to throw together quickly, but there will be some image loss and it won't grade very well.

If the image quality and file preservation is important, you should encode into dnxhr instead of mpeg4. This will be at 10 times the file size.

ffmpeg -i <input> -c:v dnxhd -profile dnxhr_lb -c:a pcm_s16le <output>.mov
Resolve Studio v16.2.3 | Nvidia GTX 1070 | v451.48 | Win10 x64 | AMD TR-1950X 16G RAM
Offline

doodloo

  • Posts: 7
  • Joined: Thu Jun 07, 2018 12:58 pm
  • Real Name: Pierre Martin

Re: [Solved] Supported Linux codecs

PostFri Jun 08, 2018 8:18 pm

Thanks Lance,

We're circling back to my thread... When trying to import dnxhd videos in Resolve, it just crashes without explanation.
I will use MPEG4 as quality is not important.

Thank you again!
Offline
User avatar

rugubara

  • Posts: 27
  • Joined: Fri Apr 20, 2018 6:03 am
  • Location: Moscow, Russia
  • Real Name: Anton Gubarkov

Re: [Solved] Supported Linux codecs

PostWed Oct 10, 2018 9:19 am

I would like to hear the BMD support answer about Resolve being so picky about codecs of MPEG4 containers. I have to import a lost of amateur sources in my work and I feel pretty pissed off by the need to convert them to dnxhd for editing every time.

BMD, what keeps you from supporting amateur camcorders and mobile phone footage?
Linux 5.7.0-gentoo Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
NVIDIA Corporation GP107GLM [Quadro P2000 Mobile] (rev a1)
Davinci Resolve Studio 17.2

Return to DaVinci Resolve

Who is online

Users browsing this forum: 4EvrYng, Bing [Bot], Majestic-12 [Bot], Peter Chamberlain, RedRider14, Steve Alexander and 134 guests