[FFmpeg-user] Simultaneous two-pass?

Gabri Nurtinaz Shally gabri.ns at gmail.com
Thu Sep 27 11:55:44 CEST 2012


On Sep 27, 2012 3:06 PM, "Jesse Gordon" <tojesseg at gmail.com> wrote:
>
> I realize pass 2 must run some number of frames after pass 1 -- but how
many frames? Surely pass 2 could start encoding happily if pass 1 was 10
seconds of video ahead. I can't believe that pass 2 needs the log for the
very last frame before it can encode the first frame :-)
>

you think like that because you call the file as 'log'. while —as long as i
remember— all documentation i've read call it statistik. so, it need all
data to be read to calculate.

> Of course if the video had 1 minute of high action and 9 minutes of low
action, it could encode that first minute at almost 10mbit, and the rest at
almost nothing :-)
>
> But I suppose there is a limit to how far ahead bandwidth can be
borrowed. All I want is to run the second pass just one
borrow-window's-width behind the first pass :-)
>

its not borrowing... after reading the statistik, the encoder will know how
much bit should be allocated for each frame.

what you call borrowing is might be vbuffer. if a frame has excesive bit,
it put on the buffer that can be used by next frame. but it just one way,
current frame cannot use bit for the next frame. well, it could, but it has
side effect. if all frame after current also need high bitrate, then thus
frame quality will suffer, while current frame is good.

@carl:
what is the default value for thread count in ffmpeg? in mencoder, the
default value is 0, which mean mencoder will try to detect how much cpu the
computer has and set threads count accordingly.


More information about the ffmpeg-user mailing list