ffmpeg | branch: master | Andreas Rheinhardt <[email protected]> | Wed Sep 1 14:28:03 2021 +0200| [5312208f1274683610d1b677517b953603f48d2b] | committer: Andreas Rheinhardt
Revert "ffmpeg: force 128k default audio bitrate if nothing is specified and there is no specific default" This reverts commit 628a73f8f3768513fa6152c98d54842cf2ae1aad. At the time of said commit there was talk of removing the audio bitrate "ab" option to bring FFmpeg in line with what Libav has done in 2012 in commit 041cd5a0c55e02dd3b9a2419644b03103819c3d3. By having different option flags for the "ab" and the ordinay bitrate "b" option is is possible to have different default bitrates for audio and video. In order to maintain this behaviour and not break user scripts the commit to be reverted added code to ffmpeg.c that set the bitrate value to the audio default for audio codecs, but only if AVCodec.defaults didn't exist (as in this case the default would be codec-default and not affected by the "ab" removal). This had the downside of being an API violation, because AVCodec.defaults is not a public field. Given that the "ab" option and its audio-specific default value have never been removed, said API violation can be simply fixed by reverting said commit. Signed-off-by: Andreas Rheinhardt <[email protected]> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5312208f1274683610d1b677517b953603f48d2b --- fftools/ffmpeg.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index fb2d9a81e7..a9bb9d964d 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -3572,11 +3572,6 @@ static int init_output_stream(OutputStream *ost, AVFrame *frame, } if (!av_dict_get(ost->encoder_opts, "threads", NULL, 0)) av_dict_set(&ost->encoder_opts, "threads", "auto", 0); - if (ost->enc->type == AVMEDIA_TYPE_AUDIO && - !codec->defaults && - !av_dict_get(ost->encoder_opts, "b", NULL, 0) && - !av_dict_get(ost->encoder_opts, "ab", NULL, 0)) - av_dict_set(&ost->encoder_opts, "b", "128000", 0); ret = hw_device_setup_for_encode(ost); if (ret < 0) { _______________________________________________ ffmpeg-cvslog mailing list [email protected] https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
