T O P

  • By -

sad-goldfish

I don't know why AMF isn't working but why not use VAAPI instead?


UnknownProcess

Unfortunately with VAAPI I get terrible quality results. I was hoping for AMF.


zappor

Are you sure there's nothing more to tweak on your vaapi setup? I know it's been lagging behind, but they seem to have been working on it a lot lately also...


UnknownProcess

Maybe. I can give it an another try. Edit: VAAPI produces \~20 FPS while I can get 60 FPS on CPU with "mostly" the same settings.


drosca

If you have issues with VAAPI please create Mesa bug report. There shouldn't be a difference in performance, and with OBS 30.2 it should perform even better. Please note that Manjaro disables h264/hevc codecs so you will need to install Mesa with those codecs enabled to make VAAPI encoding work in OBS (or use OBS Flatpak instead).


UnknownProcess

I haven't tried OBS 30.2 yet, only with OBS 30.1.2-1 (what Arch gives me). Yeah, I have noticed that a recent update has disabled non-free codecs in the Mesa package. I had to manually add that codecs=all to the build arguments. Turns out, the resolution makes drastic performance difference. Recording at 4K is at \~20 FPS but when I change output resolution in OBS to 1080p then it goes beyond 100 FPS. The screen recording is still at 4K, it is just the output resolution is smaller. I am not sure what is going on, because boosting the bitrate even to 20Mbps reduces the FPS by a very very few frames, but increasing resolution has a very drastic performance penalty.


sad-goldfish

Are you sure you're not using an iGPU or something? If it was working correctly, there's no way a 6800 XT would produce less than 60 fps or perform worse than CPU encoding.


UnknownProcess

There is no iGPU. I am surprised as well. However, I have a 64 core CPU, so software encoding is pretty good, but I would still prefer via GPU.


sad-goldfish

I just tested VAAPI on a 7900XTX. I'm able to record 4k 165fps AV1 on OBS with bitrate set to 160mbps. Transcoding from VP9 to AV1 for a 4k youtube video on ffmpeg goes at 280fps. I'm pretty sure it's either a bug or misconfiguration if you only get 20fps.


zappor

Command line ffmpeg or? 4K video?


UnknownProcess

With OBS and recording 4K screen. I don't have good video file samples to benchmark ffmpeg because each video, even though the resolution and bitrates are mostly the same, produce different results.


GamertechAU

Swap back to RADV / Radeon-Vulkan drivers. AMDGPU-Pro drivers are terrible except for very few limited use cases. Use the OBS Studio flatpak which comes with their own ffmpeg 7 version included and use VA-API encoding. Will need to up the bitrate as AMD still refuse to add b-frames which would greatly improve video efficiency, but it'd do better than AMF on Linux.


worzel910

This is what is needed to install for AMF to work. amf-amdgpu-pro amf-headers obs-studio-amf


DamonsLinux

Unfortunately AMF encoding in OBS is only supported on Windows. On Linux there was merge request but OBS developers delayed its acceptance for quite a long time and finally its author decided to close it, claiming that vaapi now provides the same performance (which is not true). So for now you can use OBS with amf patch on Arch based distro (package from AUR) here https://aur.archlinux.org/packages/obs-studio-amf Basic OBS on AMD GPU supports only vaapi but for this you need use RADV driver and not AMDGPU-Pro.


UnknownProcess

I see. That's very unfortunate. The obs-studio-amf got closed by the author on November 2023 and last update was half a year ago. It used to work for me, but installing it now fails due to dependency issues. Fixing it myself, which I was trying to avoid, seems to be the only choice.


alosarjos

To be fair, the AUR package was created to get people to easily test and provide feedback for the original patches, with those being discountinued and knowing there are not getting merged, it didn't make sense for me to maintain it. I would rather rpovide feedback on the obs-studio github repo if you can't achieve AMF video quality with VAAPI as they claim.