x264: use ABR-mode if user specifies bitrate
authorIlkka Ollakka <ileoo@videolan.org>
Tue, 28 Jul 2009 10:43:57 +0000 (13:43 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Tue, 28 Jul 2009 11:01:07 +0000 (14:01 +0300)
commit9543a6abc6b57f5b1f9f49755daf8ed711836b29
tree912816192d767a43253fcbad031658ea1bcb43c6
parent84ae52a68f627f6863cfd59ffbbae8883cbb3cd0
x264: use ABR-mode if user specifies bitrate

Also set vbv-bufsize if user didn't specify them.
bufsize is bitrate * seconds between keyframes instead of earlier
2*bitrate. Recommended by Dark_Shikari

So now you can stream for mobiles with following:
 sout="#transcode{deinterlace,acodec=mp4a,vcodec=h264,width=320,height=180,venc=x264{no-cabac,bframes=0,ref=3,level=12,keyint=50},vb=180,ab=64,channels=2}...

tested with rtp-output and G1 android. Produces quite stable near cbr
stream.

And file-encoding should be ok with defaults (without any
venc=x264-settings or bitrates), if not targeted to
handhelds/streaming.
modules/codec/x264.c