diff mbox series

[FFmpeg-devel,2/2] avcodec/videotoolboxenc: Set default bitrate to zero

Message ID tencent_FE004D687E7FAEAD6638C9C0B9B6F06A420A@qq.com
State New
Headers show
Series [FFmpeg-devel,1/2] avcodec/videotoolboxenc: Fix bitrate doesn't work as expected | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Zhao Zhili July 16, 2024, 12:59 p.m. UTC
From: Zhao Zhili <zhilizhao@tencent.com>

Zero is auto mode. From the doc of videotoolbox:

   The default bit rate is zero, which indicates that the video
   encoder should determine the size of compressed data.

Before the patch, the default bitrate is 200000 setting by
avcodec/options_table, which doesn't work for most of cases.
---
 libavcodec/videotoolboxenc.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c
index 35628341f6..747681fd05 100644
--- a/libavcodec/videotoolboxenc.c
+++ b/libavcodec/videotoolboxenc.c
@@ -2933,6 +2933,7 @@  static const AVOption h264_options[] = {
 };
 
 static const FFCodecDefault vt_defaults[] = {
+        {"b",    "0"},
         {"qmin", "-1"},
         {"qmax", "-1"},
         {NULL},