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?
2/3 pass: no quality settings instead of target bitrate?
Moderator: HuggiL
-
- Modest
- Posts: 102
- Joined: Thu Oct 08, 2009 3:09 pm
Re: 2/3 pass: no quality settings instead of target bitrate?
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.
Re: 2/3 pass: no quality settings instead of target bitrate?
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
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