Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question]: (H)QVBR mode on Ryzen 5 8600G with AV1 #468

Open
lanmarc77 opened this issue Mar 29, 2024 · 6 comments
Open

[Question]: (H)QVBR mode on Ryzen 5 8600G with AV1 #468

lanmarc77 opened this issue Mar 29, 2024 · 6 comments
Labels

Comments

@lanmarc77
Copy link

I have a Ryzen 5 8600G and wanted to use QVBR mode.
Using ffmpeg I can not use modes qvbr or hqvbr. The other modes work.

Reading a bit through the issues it seems that supported modes also depend on the device. I use the integrated graphics of the processor but could not find any documentation on which graphics cards/processors which codec modes are supported.

My question could be related to: #453

So this is either a bug if the modes should be supported on my APU or a documentation issue.

@MikhailAMD
Copy link
Collaborator

In general, PA is needed for these modes and it is supported on Ryzens like yours. https://github.com/GPUOpen-LibrariesAndSDKs/AMF/blob/master/amf/doc/AMF_Video_PreAnalysis_API.md
But it could be many issues. Could you please start with full command line you used and verbose log from FFmpeg and driver version?

@lanmarc77
Copy link
Author

Hi @MikhailAMD,
command line used:
ffmpeg -loglevel debug -i bbb_sunflower_1080p_30fps_normal.mp4 -c:v av1_amf -header_insertion_mode 1 -rc qvbr -qvbr_quality_level 44 -log_to_dbg true out.mp4 > qvbr_error.log 2>&1

Error log that came out of it attached. Thanks!
qvbr_error.log

I am using the probably most recent AMF libraries from here:
https://repo.radeon.com/amdgpu/6.0.3/ubuntu/pool/proprietary/a/amf-amdgpu-pro/amf-amdgpu-pro_1.4.33-1741713.22.04_amd64.deb
https://repo.radeon.com/amdgpu/6.0.3/ubuntu/pool/proprietary/liba/libamdenc-amdgpu-pro/libamdenc-amdgpu-pro_1.0-1741713.22.04_amd64.deb

@MikhailAMD
Copy link
Collaborator

From the log it seems this command line supplies YUV420P input for AMF encoder which is the default for FFmpeg. It works for normal encoder but not for PA. You need to force NV12 input.

@lanmarc77
Copy link
Author

Ok, I changed the command line to:
ffmpeg -loglevel debug -i bbb_sunflower_1080p_30fps_normal.mp4 -pix_fmt nv12 -c:v av1_amf -header_insertion_mode 1 -rc qvbr -qvbr_quality_level 44 -log_to_dbg true out.mp4 > qvbr_error.log 2>&1

The error message changed:
qvbr_error.log

@MikhailAMD
Copy link
Collaborator

There are two parts here:

  1. On Linux PA is currently by default try to run on OpenCL and it seems it is not installed on your system. Check AMD driver how to install optional OpenCL on Linux.
  2. In the future PA should and can run on Vulkan but it cannot be forced from FFmpeg. We need to correct this. I will add this to the task list.
    Thanks.

@lanmarc77
Copy link
Author

And Thank you.
After installing the rocm-opencl driver I get the error message that VULKAN can not be converted to OPENCL which is probably your second point.
So I wait patiently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants