Very low frame rate using FFMPEG VAAPI encoder ( < 1 fps )

CheeseCake

New Member
Hi all,

Artix Linux user here with RX 5700 XT and up-to-date AMDGPU drivers. I have been streaming / recording using obs for the past few month and everything was working fine until recently (I noticed this issue about two weeks ago when I started recording again), obs started to produce very low fps output. We're talking literally about 0,3 fps. Aside from that, the video quality was fine, and the sound was also fine.
I have tried using the x264 encoder and the output had no issue at all.

I'd really like to be able to encode with my GPU again so if anyone knows whats going on, I'd really appreciate it. I have already tried to downgrade obs but I still had the same issue.

Here is my vainfo output :
Code:
vainfo: VA-API version: 1.11 (libva 2.11.0)
vainfo: Driver version: Mesa Gallium driver 21.0.1 for AMD Radeon RX 5700 XT (NAVI10, DRM 3.40.0, 5.11.10-artix1-1, LLVM 11.1.0)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

And here are my obs settings for streaming :
obs_settings.png
 

alex9k

New Member
I'm having a similar issue with the Radeon VII. Has been working fine for months, but now I'm just getting slideshows with FFMPEG VAAPI.

ffmpeg itself using vaapi is still working fine tho.
 

tacosukoneko

New Member
Hi,

This is a bug in mesa 21.0. This bug has been fixed in mesa active development branch (master). I successfully worked around the problem by uninstalling mesa 21.0 and compiling and installing mesa master branch from here. OP, since you are using an Arch Linux derivative, you might consider mesa-git from AUR to assist in this process, should you attempt it.

My assumption is that only users of bleeding-edge distributions or development branches of more stability-focused distributions will experience this bug, since Debian stable still packages mesa 18.3 and is unaffected. Therefore, I dare to imagine that the preferred workaround for these users would be to switch to even newer sources for their user-space graphics driver, as opposed to switching to a more stability-focused distribution.
 

CheeseCake

New Member
Hi,

This is a bug in mesa 21.0. This bug has been fixed in mesa active development branch (master). I successfully worked around the problem by uninstalling mesa 21.0 and compiling and installing mesa master branch from here. OP, since you are using an Arch Linux derivative, you might consider mesa-git from AUR to assist in this process, should you attempt it.

My assumption is that only users of bleeding-edge distributions or development branches of more stability-focused distributions will experience this bug, since Debian stable still packages mesa 18.3 and is unaffected. Therefore, I dare to imagine that the preferred workaround for these users would be to switch to even newer sources for their user-space graphics driver, as opposed to switching to a more stability-focused distribution.

Hello again,

Thank you very much for the reply, I followed your instructions and installed the mesa-git package via the AUR. The install was quick and easy and even prompted me to remove mesa 21.0 and other conflicting packages. From what I can see in obs, my issue has been resolved so thanks again :)
 
Top