[FFmpeg-devel] [PATCH] Maximum bitrate FAQ
Michael Niedermayer
michaelni
Tue Sep 4 03:34:13 CEST 2007
Hi
On Mon, Sep 03, 2007 at 09:14:29PM +0200, Stefano Sabatini wrote:
> On date Saturday 2007-09-01 15:08:29 +0200, Michael Niedermayer encoded:
> > Hi
> >
> > On Sat, Sep 01, 2007 at 12:59:58PM +0200, Stefano Sabatini wrote:
> > > Hi all.
> > >
> > > Suggested log: add a discussion for the FAQ: "How can I encode a video
> > > without going over a maximum bitrate?"
> > >
> > > The given reply is likely somehow incorrect, so improvements and
> > > suggestions will be appreciated.
> >
> > please test and mention -mbd rd -flags trell and large -lmax
> >
> > (testing is so you see yourself what effect they have on the over/underflows
> > ... they should have a good one but i think the text will be better if the
> > author has used the options himself instead of repeating what someone else
> > says ...)
>
> I tested -mb rd and -mb bits getting in some cases an output size 5%
> littler, with an encoding time increase of about 30%, in other cases a
> less significant improvement; I got similiar results with -flags trell.
>
> For what regards -lmax: I really can't figure out what does it mean,
> I tried several values getting the best result (lower bitrate) at 10k,
> increasing -lmax the bitrate seems to grow when the quality seem to
> stay the same.
>
> I feel like I'd have to understand libavcodec/ratecontrol.c ;-).
well ...
here are some actual examples to show the effect and as startpoints
for experimentation
ffmpeg -f rawvideo -s cif -i foreman_cif -b 50k -bt 100k -g 300 -maxrate 70k -bufsize 100k test.avi
117 x [mpeg4 @ 0xXXXXXXXX]rc buffer underflow
frame= 300 fps=116 q=31.0 Lsize= 147kB time=12.0 bitrate= 100.4kbits/s
video:134kB audio:0kB global headers:0kB muxing overhead 9.471236%
ffmpeg -f rawvideo -s cif -i foreman_cif -b 50k -bt 100k -g 300 -maxrate 70k -bufsize 100k -mbd rd -flags trell -lmax 100*QP2LAMBDA test.avi
no buffer underflows
frame= 300 fps= 52 q=45.1 Lsize= 86kB time=12.0 bitrate= 58.7kbits/s
video:73kB audio:0kB global headers:0kB muxing overhead 17.369228%
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070904/81183c17/attachment.pgp>
More information about the ffmpeg-devel
mailing list