Log in

View Full Version : Question about multi pass


daWsOn_s
24th February 2008, 02:40
Hello,
I was making some x264 test with megui, do you think that it's normal that one pass econding with 1p good quality is better than 2pass hqfast/slow encoding?

I am asking because it's happening to me I can clearly see the difference between them and it's weird that even HQ slow is worse.

The input is:
mpeg2 720x576 pal

Output is:
720x540 with 890kbit desired bitrate

1p good quality : 891kbit
Hq slow/hq fast: 895kbit

Thanks

Dark Shikari
24th February 2008, 03:49
What are the commandlines used for each? Paste them.

daWsOn_s
24th February 2008, 19:23
Good quality

--[NoImage] Job commandline: "C:\Programmi\megui\tools\x264\x264.exe" --bitrate 833 --ref 3 --bframes 3 --b-pyramid --b-rdo --bime --weightb --subme 6 --trellis 1 --analyse p8x8,b8x8,i4x4,i8x8 --8x8dct --threads auto --thread-input --sar 1:1 --progress --no-psnr --no-ssim --output "E:\DVD_VIDEO\VIDEO_TS\test.mkv" "E:\DVD_VIDEO\VIDEO_TS\test.avs"
--[Information] [24/02/2008 19.11.31] Encoding started
--[Information] Final statistics
---[NoImage] Desired video bitrate: 833 kbit/s
---[NoImage] Obtained video bitrate (approximate: 893 kbit/s



Hqfast/hq slow (I don't remember what it is)
--[Information] [24/02/2008 19.14.19] Started handling job
--[Information] [24/02/2008 19.14.19] Preprocessing
--[NoImage] Job commandline: "C:\Programmi\megui\tools\x264\x264.exe" --pass 1 --bitrate 890 --stats "E:\DVD_VIDEO\VIDEO_TS\test.stats" --bframes 16 --b-pyramid --direct auto --filter -2,-1 --subme 1 --analyse none --me dia --merange 8 --threads auto --thread-input --sar 1:1 --progress --no-psnr --no-ssim --output NUL "E:\DVD_VIDEO\VIDEO_TS\test.avs"
--[Information] [24/02/2008 19.14.19] Encoding started
--[Information] [24/02/2008 19.15.16] Job completed
--[Information] [24/02/2008 19.15.16] Postprocessing
---[Information] Deleting intermediate files
-[Information] Log for job11
--[NoImage] Job type: video
--[Information] [24/02/2008 19.15.16] Started handling job
--[Information] [24/02/2008 19.15.16] Preprocessing
--[NoImage] Job commandline: "C:\Programmi\megui\tools\x264\x264.exe" --pass 2 --bitrate 890 --stats "E:\DVD_VIDEO\VIDEO_TS\test.stats" --bframes 16 --b-pyramid --weightb --direct auto --filter -2,-1 --analyse p8x8,b8x8,i4x4,i8x8 --8x8dct --merange 8 --threads auto --thread-input --sar 1:1 --progress --no-psnr --no-ssim --output "E:\DVD_VIDEO\VIDEO_TS\test.mkv" "E:\DVD_VIDEO\VIDEO_TS\test.avs"
--[Information] [24/02/2008 19.15.16] Encoding started
--[Information] Final statistics
---[NoImage] Desired video bitrate: 890 kbit/s
---[NoImage] Obtained video bitrate (approximate: 897 kbit/s




PS: I've set 890kbit on the multi-pass encoding for having the final bitrate similar to the 1-pass one

Dark Shikari
24th February 2008, 20:36
--bitrate 833 --ref 3 --bframes 3 --b-pyramid --b-rdo --bime --weightb --subme 6 --trellis 1 --analyse p8x8,b8x8,i4x4,i8x8 --8x8dct

--pass 2 --bitrate 890 --bframes 16 --b-pyramid --weightb --direct auto --filter -2,-1 --analyse p8x8,b8x8,i4x4,i8x8 --8x8dct --merange 8

So let's compare.

The first has multiple reference frames--the latter doesn't.

The first has RDO partition decision on all frames (--subme 6 + --b-rdo), the latter doesn't.

The first has trellis, the latter doesn't.

The first has bidirectional ME optimization (bime), the latter doesn't.

No wonder it looks better :p

(That second one is definitely not HQ-Slow)

daWsOn_s
24th February 2008, 21:40
I've retried selecting Hq slow (so now I'm sure :) ) the command line is:

[NoImage] Job commandline: "C:\Programmi\megui\tools\x264\x264.exe" --pass 2 --bitrate 890 --stats "E:\DVD_VIDEO\VIDEO_TS\test.stats" --ref 3 --bframes 16 --b-pyramid --weightb --direct auto --filter -2,-1 --subme 6 --trellis 1 --analyse p8x8,b8x8,i4x4,i8x8 --8x8dct --me umh --merange 12 --threads auto --thread-input --sar 1:1 --progress --no-psnr --no-ssim --output "E:\DVD_VIDEO\VIDEO_TS\test.mp4" "E:\DVD_VIDEO\VIDEO_TS\test.avs"

It still looks worse

cogman
24th February 2008, 22:12
I think what Dark means is that the first, while titled a HQ slow profile, really isn't. For whatever reason the person that made to profile didn't turn on the stonger and more important options for a better looking encode.

In MeGui you should be able to edit the profile so that It is a strong profile, apply the changes that Dark suggested above and see if there is a difference (there should be).

Does Megui have the option of AQ yet? if so, turn that on as well :)

Dark Shikari
24th February 2008, 22:24
I think what Dark means is that the first, while titled a HQ slow profile, really isn't. For whatever reason the person that made to profile didn't turn on the stonger and more important options for a better looking encode.

In MeGui you should be able to edit the profile so that It is a strong profile, apply the changes that Dark suggested above and see if there is a difference (there should be).

Does Megui have the option of AQ yet? if so, turn that on as well :)MeGUI's AQ is on by default.

And I mean the second (the twopass one) has crappy options--not the first.

daWsOn_s
24th February 2008, 22:28
I can't change the profile settings cause I don't understand the most of them. I've also tried hq slower and it still looks a little worse, I really don't understand .... aren't HQ profile supposed to be better ?

Dark Shikari
24th February 2008, 22:56
I can't change the profile settings cause I don't understand the most of them. I've also tried hq slower and it still looks a little worse, I really don't understand .... aren't HQ profile supposed to be better ?HQ Slower should be the following:

--ref 5 --mixed-refs --bframes 16 --b-pyramid --b-rdo --bime --weightb --direct auto --filter -2,-1 --subme 6 --trellis 1 --analyse p8x8,b8x8,i4x4,i8x8 --8x8dct --me umh --threads auto --thread-input --progress --no-psnr --no-ssim --output "output" "input"

cogman
24th February 2008, 22:57
I can't change the profile settings cause I don't understand the most of them. I've also tried hq slower and it still looks a little worse, I really don't understand .... aren't HQ profile supposed to be better ?

Not understanding what something does doesn't stop you from changing it :) (Though, IT guys jobs would be much easier or non-existent if people did know what they where doing first).

Yes, HQ should be better, no doubt there, but HQ is a title not an actual setting. The settings listed by Dark are what you need to change. They really aren't to hard to find and turn on, you just click edit profile and then under the advanced tab (or at least the next two tabs) you should see some check boxes that are unchecked. You can pretty much check every checkbox in megui and expect the results to improve (I hope. :D, I don't remember all of them). Just make sure in the second tab you you change the number box titled Reference Frames to at least 3. 5 IMO is a good mix between speed and quality, after 5 you don't get a huge benfit, just more processing time.

Really, most of the options in megui have little hoover-over boxes that appear with information on all the options and recommended values to be set. So if you don't know what something does just mouse over it and wait a few seconds to read the text on it. That helped me a lot in understanding x264's options.

@Dark Thats what I ment :) thanks for the correction though

daWsOn_s
24th February 2008, 23:42
HQ Slower should be the following:

--ref 5 --mixed-refs --bframes 16 --b-pyramid --b-rdo --bime --weightb --direct auto --filter -2,-1 --subme 6 --trellis 1 --analyse p8x8,b8x8,i4x4,i8x8 --8x8dct --me umh --threads auto --thread-input --progress --no-psnr --no-ssim --output "output" "input"

It's correct



@ cogman

I know you're right :) but as you can see the hq slower profile has all the suggestions said by dark (even more) and the quality continue to be worse, and it takes three times the 1-pass. :(

Dark Shikari
24th February 2008, 23:45
It's correct



@ cogman

I know you're right :) but as you can see the hq slower profile has all the suggestions said by dark (even more) and the quality continue to be worse, and it takes three times the 1-pass. :(Can you post screenshots of the worse quality?

I.e. the one you think is better, and the one you think is worse.

daWsOn_s
25th February 2008, 00:28
Can I simply post two sample video?

Anyway that's a quickly difference with other source and bitrate, the artifact difference is the same.

1-pass Goodquality

http://img406.imageshack.us/my.php?image=vlcsnap198017rt7.png


2-pass HQslow

http://img144.imageshack.us/my.php?image=vlcsnap198187qg1.png



In the second image you can see how the image tends to "double" and the outlines are less sharp than the first image. Look at his face and background

Atak_Snajpera
25th February 2008, 00:32
haha You didn't use the same frames :)

Dark Shikari
25th February 2008, 02:00
You can post the videos if you want--upload them to Mediafire or similar.

daWsOn_s
25th February 2008, 21:19
Ok those are the videos of the screenshots, of course I'll never do econding of this poor quality but the artifact that appears, shows clearly what I'm talking about even at 890kbit

the good quality profile (1 pass) (http://www.divshare.com/download/3880549-eef)


Hq slow profile (2 pass) (http://www.divshare.com/download/3880551-3e9)

Take attention and compare the face in movement of Eddie Cahill at 35 seconds, it's pretty obvious that the first one seems less compressed.

Dark Shikari
25th February 2008, 21:36
Ok those are the videos of the screenshots, of course I'll never do econding of this poor quality but the artifact that appears, shows clearly what I'm talking about even at 890kbit

the good quality profile (1 pass) (http://www.divshare.com/download/3880549-eef)


Hq slow profile (2 pass) (http://www.divshare.com/download/3880551-3e9)

Take attention and compare the face in movement of Eddie Cahill at 35 seconds, it's pretty obvious that the first one seems less compressed.Yet if you look at the stream--the I-frame containing the face is actually larger in the twopass version, and higher quality (and less compressed!)

The reason it looks "better" to your eyes is because the higher quantizer blurs it more due to the inloop deblocker, masking the artifacting better. This problem is because of the --filter -2:-1 in the commandline, which if removed, would likely fix the problem ;)

daWsOn_s
26th February 2008, 01:34
I've removed it but same quality, I mean it's less evident but it's still there

daWsOn_s
6th September 2008, 22:42
The "problem" was trellis. Why are trellis 1 or 2 considered better then 0 if the image looks definitely worse in compression?

wyti
7th September 2008, 00:18
trellis is almost always better, in certain case (especially with very fine details) he kill those details where deadzone doesn't.
But now with the new psy-trellis algo (on by default if you have latest version in MEGUI and trellis active + subme >= 6) trellis should looks better in all cases (i hope ^^)

Sharktooth
7th September 2008, 01:42
those presets do not exist anymore and anyways, the preset was edited by someone.
hint: update and all the packages (including presets) with the auto-update or by a clean reinstall (followed by an update...)