[MEncoder-users] 2pass: auto-calculation of bitrate?
Ilya Zakharevich
nospam-abuse at ilyaz.org
Sat Oct 13 06:12:45 CEST 2007
I'm looking for a way to let mencoder (I use xvid) to automatically
select the 2-pass average video bitrate based on the contents. I'm
pretty sure that most (if not the all) of the logic to do it is already
there, but I can't find the UI to trigger this behaviour.
A) For example: suppose I have 100 videos; now
a) append them all together;
b) do 2-pass encoding of them all with, e.g., 1200kb/sec bitrate;
c) split the result into 100 video files.
This way, mencoder will automatically assign some "appropriate"
average bitrate to each video.
B) Now suppose that I have only 1 video, but I have all 100 logs of
pass=1 for all 100 videos. Theoretically, this is all which is needed
to do an equivalent of a/b/c for this particular video. How to
convince mencoder to use these extra log files?
C) Now suppose that I have only 1 video, and only 1 log of pass=1 for
this video. It is more or less obvious that all I need from the
remaining 99 logs is very short "summaries". How to create the
summaries, and how to "feed" them to mencoder?
D) And now the last logical step: If of these 99 remaining videos 40%
is "action-like", 40% is "arthouse-like", and 20% is animation,
then law of big numbers starts to be applicable. Essentially, I
won't need to have summaries of the particular videos; I could feed
in 40 copies of "average action-like summary", 40 copies of
"average arthouse-like summary", and 20 copies of "average
animation summary".
So if I keep these summaries in ~/.mplayer in action.sum arthouse.sum
animation.sum, then I could ask mencoder to do
bitrate_from=1200,40*action+40*arthouse+20*animation
and it could choose the appropriate bitrate. Is it possible to do now
(possibly, with some pre-processing)? Any plans to have this?
Thanks,
Ilya
More information about the MEncoder-users
mailing list