Opened 6 hours ago

Last modified 4 hours ago

#11292 open defect

AMD Hardware Encoding is Broken in versions >= 7.1

Reported by: TanMan Owned by:
Priority: important Component: avcodec
Version: git-master Keywords:
Cc: primeadvice@gmail.com Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Using HEVC_AMF encoder on Ryzen 5700G on versions >= 7.1 results in huge files:
How to reproduce:

% ffmpeg -i input -c:v hevc_amf -quality 5 output
ffmpeg version 7.1
also tested with version 2024-11-06-git-4047b887fc-full_build-www.gyan.dev
running on Windows 11 23H2 22631.4391

Output under >= 7.1 generates this error:
[hevc_amf @ 000002ef6f027500] rate control mode is PEAK_CONSTRAINED_VBR but rc_max_rate is not set
I am unable to find anywhere to set this rc_max_rate, and the resulting file has a much higher bitrate than the original x264 source and is huge.
This worked fine in previous versions (through 7.01) and resulted in very good quality 1080p video at 2kbps and encoded files very fast (6x to 12x).
The libx265 encoder still works fine in >= 7.1. The resulting 1080p files run about 1.5kbps and look fine, but it takes 3 to 6 times longer (2x to 3x).

Change History (2)

comment:1 by Gyan, 4 hours ago

Cc: primeadvice@gmail.com added
Component: ffmpegavcodec
Priority: normalimportant
Status: newopen

In June 2024, a change* was made which made Peak VBR the fallback rate control method, without checking if the max rate had been set.

*see 02430680b02ee42472148e67e178b6d1c2ac43fd

comment:2 by Gyan, 4 hours ago

Meanwhile, you can set -maxrate to set rc_max_rate.

Note: See TracTickets for help on using tickets.