VAAPI recording with Navi encoder turns to garble after 30-45 seconds

jnon

New Member
Recording environment:
Arch Linux, KDE Plasma Wayland, Pipewire
GPU: 6600XT
OBS 29.0.0 through flatpak

Trying to record 3440x1440p at 60fps at anywhere between 2000-4000 Kbps using FFmpeg VAAPI in H.264. I'm just doing a full screencap of one monitor. The first 20-30 seconds is perfect, but suddenly the video stutters and looks like it drops to a super low bitrate and remains like that for the remainder of the recording.

I'm not sure where to start in solving what would be causing this, as before the OBS version 29 stack swap with the H.264 encoder debocle, I had to use the G-streamer plugin or my entire Wayland session would just crash. Navi version 23 no longer does this, but I'm stumped on why its suddenly refusing to record past 30 seconds without a problem. I don't get any noticeable error prompts from the OBS logs or a message saying that the bitrate is too high. Any ideas on what might be happening?
 

jnon

New Member
A first time here, I didn't see the memo about posting the log file. Here is what happens during a recording:

17:54:51.205: ==== Recording Start ===============================================
17:54:51.205: [ffmpeg muxer: 'adv_file_output'] Writing file []
17:55:21.197: Failed to create xdg-screensaver: 2
17:55:51.198: Failed to create xdg-screensaver: 2
17:56:21.198: Failed to create xdg-screensaver: 2
17:56:51.199: Failed to create xdg-screensaver: 2
17:57:21.199: Failed to create xdg-screensaver: 2
17:57:51.200: Failed to create xdg-screensaver: 2
17:57:58.231: [ffmpeg muxer: 'adv_file_output'] Output of file []
17:57:58.231: Output 'adv_file_output': stopping
17:57:58.231: Output 'adv_file_output': Total frames output: 11215
17:57:58.231: Output 'adv_file_output': Total drawn frames: 11221
17:57:58.231: ==== Recording Stop ================================================
 

jnon

New Member
I mulled over it and though that the xdg-screensaver: 2 failure was happening because I had Plasma set to change that screen's background every minute.
I turned off the screensaver switching and it still did nothing. That same error "Failed to create xdg-screensaver: 2" continues to pop up. It's not guranteed to start after 30 seconds, but once it does start, it always happens at a perfect 1 minute interval. The encoding just breaks upon the first error.

This has to be a Wayland thing right now with the latest freedesktop 20.08 platform package, but I'm not sure if anyone has run into the same issue.
 

jnon

New Member
I dropped to an X-session and confirmed two things.

-This isn't a Wayland issue, the same "Failed to create xdg-screensaver: 2" still occurs every exact minute the error starts.
-This also is not a Navi VAAPI encoder issue. I attempted changing to x264 CPU encoding and the same exact error continues to populate in logs.
 

jnon

New Member
even after today's upgrades to freedesktop 20.08 I'm unfortunately still having the same error in logs with no info on why this error is killing the encoder. Is this happening to anyone else?
 

jopeless

New Member
Hello jnon. I use Artix Linux and I have a Radeon 6700XT graphics card. I have the same problem.
After upgrading to version 29.0.2 it seems that the software doesn't support hardware enconding through x264 GPU enconding.
However I can record by using the software version.
It's a pity and I think we have to wait till next version.
I would like they will also add vulkan support.
 

jopeless

New Member
Hello jnon,

I suggest you to install obs-gstreamer.
Then select GStreamer enconder H.265 or H.264
It works for me.
You can find it int the AUR repositories.
They use VA-API.
I spent several hours looking for a solution and this is the workaround I can tell you.
 
Top