-
Notifications
You must be signed in to change notification settings - Fork 148
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
Bitrate issue when using Navi21 VCE in H265 mode. #256
Comments
It is hard to definitely answer but there is one possibility worth to explore: if content is unusually complex, there are situations when encoder cannot deliver the requested bitrate. For example, if one tries to encode frames with generated white noise, the bitrate would not be reached.
|
The source clip is a 17 second video from Minecraft, which is contained in this owncloud folder: I can try to test a different clip, but I would need to record it first. I will test the AMF TranscodeHW sample, but I cannot promise to finish this test today. |
I added some more samples, Relive-Sample-VCE265-5.5M.mp4 was directly recorded with Relive with H.265 at 5.5MBit/s. |
I tried TranscodeHW AMF sample. It produces proper file sizes for HEVC and H264. I tried ffmpeg 4.3.1: here is an issue: with simple command line I can reproduce the problem: ffmpeg.exe -i source_500mbit_x264.m4v -c:v hevc_amf -quality speed -usage transcoding -rc vbr_peak -b:v 10M -bufsize 1M -maxrate 11M out_ffmpeg_hevc.mp4 But with this command line ffmpeg produces the correct file: ffmpeg.exe -i source_500mbit_x264.m4v -c:v hevc_amf -quality speed -usage transcoding -rc vbr_peak -b:v 10M -bufsize 1M -maxrate 11M -min_qp_i 0 -min_qp_p 0 -max_qp_i 51 -max_qp_p 51 out_ffmpeg_hevc.mp4 In hevc_amf implementation QP values defaulted to 0-51. Common properties like qmin and qmax could be re-defaulted in hevc_amf but it is not good practice. Or handbrake should set them explicitly. I will ask some people to look into ffmpeg. |
Thanks for looking into this. |
I tested this and I have opened a pull request #3452 with the workaround you proposed. Feel free to close this issue at your convenience. |
We will send a patch to ffmpeg and close this issue once the patch is accepted. Thank you for your help. |
The fix has been applied to ffmpeg master. Handbrake change is still good thing to do. |
Thanks, the Handbrake change has been merged. |
The qp min/max set by ffmpeg is suboptimal for the AMF encoder. Changing to the correct values greatly increases visual quality. References: * GPUOpen-LibrariesAndSDKs/AMF#256 (comment) * https://trac.ffmpeg.org/ticket/7272#comment:6
The qp min/max set by ffmpeg is suboptimal for the AMF encoder. Changing to the correct values greatly increases visual quality. References: * GPUOpen-LibrariesAndSDKs/AMF#256 (comment) * https://trac.ffmpeg.org/ticket/7272#comment:6
The qp min/max set by ffmpeg is suboptimal for the AMF encoder. Changing to the correct values greatly increases visual quality. Reference: * GPUOpen-LibrariesAndSDKs/AMF#256 (comment)
The qp min/max set by ffmpeg is suboptimal for the AMF encoder. Changing to the correct values greatly increases visual quality. Reference: * GPUOpen-LibrariesAndSDKs/AMF#256 (comment)
The qp min/max set by ffmpeg is suboptimal for the AMF encoder. Changing to the correct values greatly increases visual quality. Reference: * GPUOpen-LibrariesAndSDKs/AMF#256 (comment)
* reorder options alphabetically * set gops_per_idr to 1. Ref: https://trac.ffmpeg.org/ticket/7272 * qp_min/qp_max set by ffmpeg is suboptimal for the AMF encoder. Changing to the correct values greatly increases visual quality. Ref: GPUOpen-LibrariesAndSDKs/AMF#256 (comment) * Enforce HRD to ensure that bitrate/maxrate is correctly constrained * Enable VBAQ to improve visual quality in complex scenes (movement/foliage)
* reorder options alphabetically * set gops_per_idr to 1. Ref: https://trac.ffmpeg.org/ticket/7272 * qp_min/qp_max set by ffmpeg is suboptimal for the AMF encoder. Changing to the correct values greatly increases visual quality. Ref: GPUOpen-LibrariesAndSDKs/AMF#256 (comment) * Enforce HRD to ensure that bitrate/maxrate is correctly constrained * Enable VBAQ to improve visual quality in complex scenes (movement/foliage)
As described in Handbrake #3447, the bitrate of an H.265 encoded video cannot be reduced below a certain Threshhold. This issue persists when building Handbrake with the newest AMF version.
The text was updated successfully, but these errors were encountered: