Log in

View Full Version : x264 bitrate problem


roman76r
18th April 2008, 09:52
I used x264 under VLC 0.8.6f in transcode mode for live streaming. So I seted vbv-bufsize, vbv-maxrate, qcomp, ratetol and other parameters necessary for live streaming. I had right output stream with valid bitrate. Past 2-3 hours , video bitrate begin to increase from valid 264kbps to 350-400kpbs and more.

vlc command line:
start vlc -vvv udp://@127.0.0.1:40003 --sout-x264-vbv-bufsize=528 --sout-x264-vbv-maxrate=264 --sout-x264-qcomp=0.0 --sout-x264-keyint=15 --sout-x264-ratetol=0.1 --no-sout-x264-cabac --sout-x264-level=1.2 --sout-x264-subme=6 --sout-x264-me=umh --sout-transcode-vb=250 --sout "#transcode{width="320",height="240",venc="x264{fps=15,level=1.2}", vb=264, fps=15, aenc="ffmpeg",acodec="mp4a",ab="48",samplerate="32000",channels="2",deinterlace}:standard{access="udp",mux="ts",dst="127.0.0.1:50003"}"


What I do wrong, and is anybody can help me to resolve this issue?

Selur
22nd April 2008, 12:34
this might help:
If you set qcomp=0 (i.e. "bitrate variability"), then it tries to make each frame use exactly the same number of bits. It's not quite that precise, but that's its goal.

If you set vbv-maxrate and vbv-bufsize to some nonzero values, then it restricts the average bitrate of a certain number of frames (the number being howevermany can fit in your specified vbv-bufsize (which is specified in kbit)). If vbv-maxrate==bitrate, then it's CBR; otherwise it just restricts the peak bitrate.

You can mix any value of qcomp with the vbv stuff, in which case qcomp controls the local allocation of bits within the averaging window. (As opposed to the non-vbv case, where qcomp distributes bits over the whole movie.)

I think the name "VBV" was taken from MPEG-2 or the like. The H.264 standard calls it "HRD". Theoretically, vbv-maxrate is the rate at which the decoder can read from the medium (DVD, network, etc) and vbv-bufsize is the amount of memory it has available to pre-buffer the incoming stream.
source: http://forum.doom9.org/showthread.php?p=699596#post699596