Hardware encoding work around for Davinci's lack of H.26x support

Sersys

New Member
Hello,

Apparently Davinci Resolve on linux has no support for H.264 nor does for H.265. I'm looking for a solution to record my videos in a format that supports hardware acceleration on linux on a RX 7900 TX card. My video recordings are fairly large so working with them without hardware acceleration is very unfeasible.
The only obvious method I've found so far is the ffmpeg av1_vaapi integration in OBS. However it doesn't seem to work and couldn't reach out to the ffmpeg devs since they have no forum. In short: videos recorded with the FFmpeg AV1 VAAPI option shows just a blank black screen both in CBR and VBR mode and in CQP mode it shows colorful smudges every 2-3 seconds both in flatpak and native install versions.

My questions are:
Is there a way to record a video format that has hardware acceleration support and supported by Davinci Resolve?
Would anyone here help me fix the FFmpeg issue?
Does OBS offer any integration of AMD's proprietary AMF driver in a way that allows it av1, vp9 or vp8 encoding; should I bother experimenting with it?
Does OBS have a native AV1 VAAPI driverthat I'm not aware of and somehow not showing up as an option, that does not rely on ffmpeg?
 

tackleza

New Member
For Manjaro, AUR "ish" Linux, AUR, please install there packages; it works for me everytime

1737983778897.png

1737983893384.png
 

Sersys

New Member
For Manjaro, AUR "ish" Linux, AUR, please install there packages; it works for me everytime

View attachment 110961
View attachment 110962
That's still an H.264 encoder. Can you please confirm that those packages you've suggested enable an AV1 encoder or any hardware accelerated encoder that's not H.264 or H.265? Can you record videos with any non H.264/H.265 and do those videos play back correctly? I'm on Debian-testing but I can either try to convert AUR packages to .deb, build it myself or worst case scenario make a Arch distrobox container but it's a lot of pain to go through if there are no encoders that I could use with Davinci.
 

tackleza

New Member
Sorry, can't confirm since I never work with "AV1" and my AMD GPU is not fully support AV1, but those are modify version of "MESA" display driver. and AUR is a instruction how to "COMPILE" from source code to production. So you can't convert to .deb directly?

Those package is just a re-compile version of MESA that enable all the video encoder and decoder. since MESA driver in most of all Linux distribution is disabled some video codec due to legal reason.

Finally, not sure what your MESA version is running right now, AV1 is support since version "Mesa 24.1" and the latest version of MESA while I reply this post is "MESA 24.3.0". Maybe you have to change the OS to the rolling release for example Manjaro
 

Sersys

New Member
Sorry, can't confirm since I never work with "AV1" and my AMD GPU is not fully support AV1, but those are modify version of "MESA" display driver. and AUR is a instruction how to "COMPILE" from source code to production. So you can't convert to .deb directly?

Those package is just a re-compile version of MESA that enable all the video encoder and decoder. since MESA driver in most of all Linux distribution is disabled some video codec due to legal reason.

Finally, not sure what your MESA version is running right now, AV1 is support since version "Mesa 24.1" and the latest version of MESA while I reply this post is "MESA 24.3.0". Maybe you have to change the OS to the rolling release for example Manjaro
The testing branch of Debian is in fact a rolling distro and I have mesa ver 24.2.8-1 but I'll try your suggestion. May I please have a link so I can make sure I have the version you're using?

$ glxinfo -B
name of display: :1
display: :1 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: AMD (0x1002)
Device: AMD Radeon RX 7900 XT (radeonsi, navi31, LLVM 19.1.4, DRM 3.59, 6.12.10-amd64) (0x744c)
Version: 24.2.8
Accelerated: yes
Video memory: 20480MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.6
Max compat profile version: 4.6
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
Memory info (GL_ATI_meminfo):
VBO free memory - total: 17661 MB, largest block: 17661 MB
VBO free aux. memory - total: 31403 MB, largest block: 31403 MB
Texture free memory - total: 17661 MB, largest block: 17661 MB
Texture free aux. memory - total: 31403 MB, largest block: 31403 MB
Renderbuffer free memory - total: 17661 MB, largest block: 17661 MB
Renderbuffer free aux. memory - total: 31403 MB, largest block: 31403 MB
Memory info (GL_NVX_gpu_memory_info):
Dedicated video memory: 20480 MB
Total available memory: 52195 MB
Currently available dedicated video memory: 17661 MB
OpenGL vendor string: AMD
OpenGL renderer string: AMD Radeon RX 7900 XT (radeonsi, navi31, LLVM 19.1.4, DRM 3.59, 6.12.10-amd64)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.2.8-1
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.2.8-1
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile

OpenGL ES profile version string: OpenGL ES 3.2 Mesa 24.2.8-1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
 

AaronD

Active Member
Apparently Davinci Resolve on linux has no support for H.264...
That'd be a pretty strong reason for me to ditch DaVinky. If it can't even do *that* right - opening an ancient and still-universal standard - then what *else* will I have to work around?

I've been using Shotcut for a couple of years now. It's free, open source, opens everything, does a lot with it, and is easy enough (for me at least) to start with and grow into.
 

Sersys

New Member
That'd be a pretty strong reason for me to ditch DaVinky. If it can't even do *that* right - opening an ancient and still-universal standard - then what *else* will I have to work around?

I've been using Shotcut for a couple of years now. It's free, open source, opens everything, does a lot with it, and is easy enough (for me at least) to start with and grow into.
Thank you for your suggestion.
As far as I can tell Shotcut has bare minimum GPU acceleration support. It's nice to have the encoding offloaded to hardware but most features are missing:
Shotcut uses the GPU in three ways:
  1. For drawing parts of the user interface and showing video: Direct3D on Windows, Metal on macOS, and OpenGL on Linux.
  2. hardware encoding (where available and enabled)
  3. OpenGL for GPU Effects (filters and transitions) mode
Shotcut does NOT use the GPU or hardware acceleration for the following:
  1. decoding and pixel format conversion
  2. automatic (as-needed) filters to deinterlace, scale, and pad video and to resample or downmix audio
  3. filters that you add
  4. transitions
  5. compositing/blending video tracks
  6. mixing audio tracks
It's a hard dilemma: either use Davinci that supports everything but one specific encoding on GPU or use Shotcut that supports that specific encoding on GPU and barely anything else. This is exponentially problematic as you work with longer, like 2-3 hour videos.

As long as there is a chance to get AV1 or any GPU encoder other than H.26x working on OBS, I'd like to do that rather than giving up and forfeiting extra features by using Shotcut. Unless you have a work around for Shotcut to enable the missing gpu support for the features listed above?
 

Sersys

New Member
For Manjaro, AUR "ish" Linux, AUR, please install there packages; it works for me everytime

View attachment 110961
View attachment 110962
I've failed to use the packages you've recommended.
1 I could not find the package amdonly-gaming-libva-mesa-driver-git. So I could not experiment with it.
2 makedeb failed to convert amdonly-gaming-mesa-git complaining that this package is for X86 and it expects amd64
3 I've tried to install amdonly-gaming-mesa-git in an Arch distrobox but it failed, complaining about a missing llibglapi.so and even after installing https://aur.archlinux.org/packages/libglibutil-git/ which supposed to provide llibglapi.so it still would say it's missing.
4 I don't know how to find the corresponding git hub page of AUR packages so I couldn't build the package.
 
Top