2/3 pass: no quality settings instead of target bitrate?

Discuss about generic usage of MediaCoder.

Moderator: HuggiL

Post Reply
boardersparadise
Modest
Modest
Posts: 102
Joined: Thu Oct 08, 2009 3:09 pm

2/3 pass: no quality settings instead of target bitrate?

Post by boardersparadise » Sat Mar 20, 2010 10:31 am

It appears that when selecting 2 or 3-pass, you can only specify the target bitrate. Why can't we select a quality level instead?
I am aware that some codecs might not support this, but why not enable this for those who do?

ladycoder
Expert
Expert
Posts: 588
Joined: Fri Nov 24, 2006 5:29 am

Re: 2/3 pass: no quality settings instead of target bitrate?

Post by ladycoder » Sat Mar 20, 2010 3:00 pm

The theory behind multi-pass encoding is to produce the best possible result for a chosen file size, or bits/pixel frame. There is no way of predicting the final size of a quality or quantizer setting, so I don't see much point in running it more than once. If you find a codec that does this, it would be interesting to read about.

AnonCrow
Modest
Modest
Posts: 136
Joined: Tue Aug 04, 2009 9:36 pm

Re: 2/3 pass: no quality settings instead of target bitrate?

Post by AnonCrow » Sat Mar 20, 2010 8:20 pm

What you can do with x264 (but not possible thru MediaCoder) is run 1st pass as CRF (or CQ if you absolutely need it) with --slow-firstpass , then use the resulting bitrate of
that as the bitrate in the 2nd pass - or something near enough that bitrate. You can emulate the behaviour in MediaCoder by just running a normal 1-pass CRF encode (nothing faster than preset=faster), get the resulting bitrate and use it in the normal 2-pass encoding, ignoring the video created by the CRF encode - unless you want to compare the two videos.

The quality difference between regular 2-pass encoding, 2-pass encoding with slow-firtspass, the above, or normal one pass CRF encoding (that happens to hit the same bitrate as all the previous) is usually going to be very small ( no more than 2 percent), assuming of course the same preset. So much more productive to just choose a slower preset.


3-pass for x264 in only really useful if the source clip is very short (no more than a couple hundred frames) or if you're targeting for a very small (and need very exact) bitrate.

edit:
a few references, though the two first are old:
http://forum.doom9.org/showthread.php?t=130067
http://forum.doom9.org/showthread.php?t=130376
http://forum.doom9.org/showthread.php?t=150544
http://doom10.org/index.php?topic=243.0
http://doom10.org/index.php?topic=92.msg782#msg782
http://forum.doom9.org/showthread.php?t=143904
http://avidemux.org/admForum/viewtopic.php?id=5597

Post Reply