-
Notifications
You must be signed in to change notification settings - Fork 150
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
[Request]: Support automatic level
calculation for encoders
#533
Comments
The encoder profile level is automatically increased based on the frame size if the given profile level is found to not be sufficient. For HEVC, the default profile level set is the highest one, which is why you are not seeing it get corrected upwards. For example, if you set a low profile level for the H264 encoder such as If you find this correction doesn't work, could you please provide an example? |
Is there a reason why AMF's HEVC uses the highest "level" by default? People have noticed this before when using OBS Studio in the past, but I don't think anyone has directly asked "why"? |
@rhutsAMD For HEVC, the AMF default is the highest level (6.2). It didn't occur to me to try using the lowest level and testing it that way, as it's a bit counterintuitive. The documentation for Is there any documentation that describes the automatic level adjustment? Also, as @cs9kc points out, defaulting to the highest level is questionable. Given the description you provided, wouldn't it make sense to default it to the lowest level and let AMF adjust it? |
I have lowered the default profile level for the HEVC encoder to |
Is there a reason not to have all AMF encoders default to the lowest level that can meet the requested resolution, frame rate, bitrate, and reference frame count? If you don't want to do it in AMF itself, we can always do it in FFmpeg (which right now defaults to leaving the level unset and using AMF's default) if it makes sense. Most encoders and tools that have an Auto option for level selection use this "pick lowest possible level" behavior. I suspect it's what users are expecting for the broadest possible decoder compatibility. |
When using the AVC, HEVC, or AV1 encoders, the codec
level
needs to be set by the application. It would be an improvement to offer anAuto
option where AMF calculates the best-fit level for the encode operation.Using HEVC as an example,
AMF_VIDEO_ENCODER_HEVC_PROFILE_LEVEL
should haveAMF_LEVEL_AUTO
. This option should apply to all encoders.Refer to the OBS upstream PR at obsproject/obs-studio#11548 for an example of what would be needed.
The text was updated successfully, but these errors were encountered: