You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In previous versions of ffmpeg<7.1, using hevc_amf with "-quality 5" was sufficient to encode with a bitrate ~ 2mbps. With current versions of ffmpeg, this isn't working anymore. I tried setting "-maxrate 2000k", but this was also ignored. The encoded video is now huge with a very high bitrate. The problem only exists using the hevc_amf encoder with ffmpeg versions >= 7.1.
To Reproduce
Steps to reproduce the behavior:
Use ffmpeg (full) for Windows (from Gyan) with version >= 7.1
TanMan1217
changed the title
[Bug]: Using hevc_amf encoder ffmpeg>=7.1, -maxrate is ignored resulting in huge files with very high bitrates
[Bug]: Using hevc_amf encoder in ffmpeg>=7.1, -maxrate is ignored resulting in huge files with very high bitrates
Nov 9, 2024
If the command line is without -max_rate, then there is a warning message “rate control mode is PEAK_CONSTRAINED_VBR, but rc_max_rate is not set”. The encoding will still work normally, and the default max_rate of 1.5x (1.5 * bitrate) will be applied.
Since the command line does not specify the bitrate -b:v, then the default bitrate of 20M will be applied by AMF.
Since the -maxrate 2000k is smaller than the default bitrate of 20M, then the -maxrate 2000k will be ignored and won’t take effect.
As a result, a large file will be produced where the actual bitrate is 20M.
A patch will be submitted to remove the warning message “rate control mode is PEAK_CONSTRAINED_VBR, but rc_max_rate is not set”. It brought a little confusion.
For the bitrate parameter -b:v, we previously set it to 2M in FFmpeg, but it has now been changed to -1. In AMF, the default value is 20M. This explains the difference seen between past and present behavior.
Describe the bug
In previous versions of ffmpeg<7.1, using hevc_amf with "-quality 5" was sufficient to encode with a bitrate ~ 2mbps. With current versions of ffmpeg, this isn't working anymore. I tried setting "-maxrate 2000k", but this was also ignored. The encoded video is now huge with a very high bitrate. The problem only exists using the hevc_amf encoder with ffmpeg versions >= 7.1.
To Reproduce
Steps to reproduce the behavior:
Setup (please complete the following information):
I originally posted the problem as an ffmpeg bug, but they suggested I also post this here.
The text was updated successfully, but these errors were encountered: