[FFmpeg-user] Simultaneous two-pass?

Gabri Nurtinaz Shally gabri.ns at gmail.com
Thu Sep 27 09:29:43 CEST 2012


On Sep 27, 2012 2:13 PM, "Jesse Gordon" <tojesseg at gmail.com> wrote:
>
> Is it possible to run both passes at the same time -- for example pipe
the log output of pass 1 to the log input of pass 2 so that as the log is
generated pass 2 can start recoding?
>
> I tried using a named pipe for the log file and the pass2 process dies
saying "bad address" as soon as the pass1 process writes to the pipe.
>
> I glanced over the source code in ffmpeg.c and it looks like pass2 tries
to read in the whole log file before even starting encoding -- so maybe
what I want to do just won't work.
>
> Does pass 2 need the log data for the last frame of pass 1 before even
starting?
>

the purpose of doing the encoding two times is so the encoder can get the
statistik of video, knowing which part is a high motion that need higher
bitrate, or which part that slow motion that can be given little bitrate.
by knowing this, the encoder can distribute bitrate efficienly.

so, doing the first and second pass at the same time is basicly defeat the
purpose of two pass encoding.

> I have more then one CPU so running both passes somewhat concurrently
would be meaningful.
>

don't worry, modern encoder now support multithreading. all your cpu
resource will be used entirely b^-^


More information about the ffmpeg-user mailing list