Opened 4 years ago
Closed 3 years ago
#9231 closed defect (fixed)
B-frames parameter is ignored in videotoolboxenc
Reported by: | _08 | Owned by: | |
---|---|---|---|
Priority: | important | Component: | avcodec |
Version: | git-master | Keywords: | videotoolbox regression |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
When using videotoolbox encoder will use B-frames even if -bf is set to zero.
How to reproduce:
% ffmpeg -i input.mkv -c:v hevc_videotoolbox -bf 0 -g 60 output.mkv (-g may be necessary because it used to do intra-only encodes by default on Intel, though it seems to be fixed in macOS 11.3) % ffprobe -show_frames output.mkv ffprobe reports existence of B-frames (pict_type=B)
The bug was apparently introduced in commit efece4442f3f583f7d04f98ef5168dfd08eaca5c. avctx->max_b_frames is unconditionally set to 16 in vtenc_configure_encoder, user-set value is ignored. The only way to disable B-frames is using baseline profile in h264_videotoolbox.
Change History (4)
comment:1 by , 4 years ago
Keywords: | regression added |
---|---|
Priority: | normal → important |
comment:2 by , 3 years ago
Status: | new → open |
---|
comment:3 by , 3 years ago
Somebody please test 55d9d6767967794edcdd6e1bbd8840fc6f4e9315
I do not want to, since I do not like MacOS on my Mac :)
comment:4 by , 3 years ago
Resolution: | → fixed |
---|---|
Status: | open → closed |
Works properly on a 2020 MacBook Pro with Intel graphics and macOS 11 (no B-frames with -bf 0, has B-frames by default or with explicit -bf >0).
Commit forcing B-frames to 16 was about Apple Silicon so ideally someone needs to test it on that as well.
That should do it. https://patchwork.ffmpeg.org/project/ffmpeg/patch/AS8P193MB1447841AFF31CC635506639F98E39@AS8P193MB1447.EURP193.PROD.OUTLOOK.COM/
BTW, 16 b-frames??