[FFmpeg-devel] [RFC] ac3enc: how do I force ac3 encoder tooutput frames with the same size?
michaelni at gmx.at
Fri Apr 19 16:31:27 CEST 2013
On Sat, Dec 29, 2012 at 01:00:30PM +0100, Piotr Bandurski wrote:
> > > 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.
> I would also need constant frame sizes to write correct length of audio data to the output rm file
> (currently muxer writes some random value).
any news on this patch ?
is there something working & ready to be applied/reviewed ?
If there just half working code thats not ready then it might make
sense to put it in some public git repository (github or other)
so interrested users could use it and its easier for other developers
to work on top of the latest (quite hard with random patches from the
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
During times of universal deceit, telling the truth becomes a
revolutionary act. -- George Orwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: Digital signature
More information about the ffmpeg-devel