>
> belcampo wrote:
> >
> > FFmichael wrote:
> >>
> >> Frederik Dam Sunne wrote:
> >>>> I have finally got my stream grapher working with FFprobe/gnuplot
> and
> >>>> what it
> >>>> has shown me so far is what I have been suspecting.....
> >>>>
> >>>> I cannot achieve a constant bitrate using libx264 with any rate
> control
> >>>> method.
> >>> Have you tried with both -b and -bt ?
> >>>
> >>> I do this for constant bitrate in windows:
> >>>
> >>> ffmpeg.exe -i "input.mov" -s 620x348 -an -pass 1 -vcodec libx264
> >>> -aspect 16:9 -vpre "C:\ffmpeg\libx264-medium_firstpass.ffpreset" -b
> 1M
> >>> -bt 1M -threads 2 -y NUL
> >>>
> >>> ffmpeg.exe -i "input.mov" -s 620x348 -an -pass 2 -vcodec libx264
> >>> -aspect 16:9 -vpre "C:\ffmpeg\ffpresets\libx264-medium.ffpreset" -b
> 1M
> >>> -bt 1M -threads 2 -y temp.m4v
> >>>
> >>> Or at least, I thought it was constant - can you test the above
> lines?
> >>>
> >>>
> >>
> >> I made this command line which is identical to yours:
> >>
> >> ffmpeg -i funny_bubbles.mov -s 620x348 -an -pass 1 -vcodec libx264
> >> -aspect
> >> 16:9 -vpre medium_firstpass -b 1M -bt 1M -threads 2 -y tmpfile.m4v
> &&
> >> ffmpeg
> >> -i funny_bubbles.mov -s 620x348 -an -pass 2 -vcodec libx264 -aspect
> 16:9
> >> -vpre medium -b 1M -bt 1M -threads 2 -y temp.m4v
> >>
> >> The result is not constant bitrate.
> >>
> >>
http://ffmpeg-> users.933282.n4.nabble.com/file/n2255686/2passtest2.jpg
> >> kb/s:996.69
> >> frame I:4 Avg QP:16.28 size: 12850
> >> frame P:345 Avg QP:22.61 size: 7690
> >> frame B:551 Avg QP:25.48 size: 3232
> >> (as reported by FFmpeg)
> > Bitrate is specified as amount of bits per second.
> > In 1 second you'll have an amount of I P and B-frames, depending on
> the
> > chosen GOP-size. So you'll have to sum xI + yP + zB and devide by the
> > total of frames. You'll the average, if this is the same for 'every'
> > second, you've got CBR.
> > At least that is what I'm thinking it is.
> >
>
> This is clearly not the case with the examples I have posted.
>
> I looked into it a bit more and:
>
> "The decoder's buffer is filled over time at a constant data rate in
> the
> case of CBR, and at a non-constant rate in the case of VBR. In both
> cases,
> data is removed from the buffer in varying chunks, depending on the
> actual
> size of the coded frames.
> In the H.264 and VC-1 standards, the VBV is replaced with generalized
> version called Hypothetical Reference Decoder (HRD)."
>
http://en.wikipedia.org/wiki/Video_buffering_verifier>
http://en.wikipedia.org/wiki/Video_buffering_verifier>
> Can anyone explain the term "Hypothetical Reference Decoder (HRD)" as
> it
> relates to CBR and VBR?
>
> Michael
> --
I'm still studying the details myself, but an in-depth explanation can be found at