[FFmpeg-devel] [RFC] ac3enc: how do I force ac3 encoder tooutput frames with the same size?
Piotr Bandurski
ami_stuff at o2.pl
Wed Dec 26 01:14:51 CET 2012
Hi,
> one way is to use a bitrate that produces an integer size
> (like 65536) and apply
>
> diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
> index de8defc..b4acea2 100644
> --- a/libavcodec/ac3enc.c
> +++ b/libavcodec/ac3enc.c
> @@ -2210,7 +2210,7 @@ static av_cold int validate_options(AC3EncodeContext *s)
> if (!best_diff)
> break;
> }
> - avctx->bit_rate = best_br;
> +// avctx->bit_rate = best_br;
> s->frame_size_code = best_code << 1;
> s->frame_size_min = 2 * ff_ac3_frame_size_tab[s->frame_size_code][s->bit_alloc.sr_code];
> s->num_blks_code = 0x3;
Attached works with your patch.
Regards
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rmencac3.txt
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121226/baab7114/attachment.txt>
More information about the ffmpeg-devel
mailing list