Log in

View Full Version : x264 MUCH better quality than XviD?


Pages : 1 [2] 3 4 5

*.mp4 guy
29th January 2007, 15:30
This (http://img259.imageshack.us/img259/332/lightblockinguj5.png) screenshot shows the problem pretty clearly (make sure to open it in a media player and view it fullscreen). Here (http://img201.imageshack.us/img201/1930/lightblockingwithenhanczz7.png) is a version with enhanced overal contrast and enhanced blue channel contrast to make the problem more obvious, it is also zoomed 2X with bicubic interpolation.

there isn't anything special about this source to make it exhibit this problem, infact its a rather poor example of it.

With all of this said I am getting very tired of rehashing this topic I guess most people just don't see the artifacts.

Sharktooth
29th January 2007, 15:39
ensure you're not using CoreAVC for decoding coz it introduces blocks in dark areas that are NOT in the encode...
however dont generalize...x264 is just ONE of the h.264 codecs. IF it has problems in dark areas that doesnt means h.264 (as a standard) has problems in dark areas.

*.mp4 guy
29th January 2007, 15:40
I know, I'm using FFDshow.

[edit] I'm not generalizing, I have not once said that h.264/AVC has problems with banding blocking compared to ASP, I always refer specifically to X264 because that is the only Mpeg4-AVC/H.264 complient encoder I use, AVC as a standard may have a problem with banding/blocking in certain situations, and based on my limited experience with other encoders I think it needs to be considered as a potential problem; but I have not once claimed that it is a problem with the AVC standard, I have only said that it is a problem with X264.

Sagittaire
29th January 2007, 16:11
This (http://img259.imageshack.us/img259/332/lightblockinguj5.png) screenshot shows the problem pretty clearly (make sure to open it in a media player and view it fullscreen). Here (http://img201.imageshack.us/img201/1930/lightblockingwithenhanczz7.png) is a version with enhanced overal contrast and enhanced blue channel contrast to make the problem more obvious, it is also zoomed 2X with bicubic interpolation.

there isn't anything special about this source to make it exhibit this problem, infact its a rather poor example of it.

With all of this said I am getting very tired of rehashing this topic I guess most people just don't see the artifacts.


1) Well for me real comparison is comparison between source and encoding.

2) Make comparison with enhanced overal contrast and enhanced blue channel contrast is really not a good way for make comparison.

3) You see a problem for the choma chanel. If the quality for the chroma chanel is not good for you change simply the chroma qp offset.

*.mp4 guy
29th January 2007, 16:15
1- fine, you have the source, look at it yourself.

2- the blue is just a neet way to make it glaringly obvious, it is perfectly obvious with only contrast enhancement, if you don't like it, ok, but it is effective in showing the problem.

3- it is not a problem with the chroma channel, the blue was only a way of highlighting luma differences, furthermore the blue enhancement was done in RGB colorspace so it was using luma and chroma information.

Sagittaire
29th January 2007, 16:38
2- the blue is just a neet way to make it glaringly obvious, it is perfectly obvious with only contrast enhancement, if you don't like it, ok, but it is effective in showing the problem.


Well it's simply not a good way. Some HVS tunnig use for example higher quantizer in dark area but if you make modification for the image (more unatural constrast or more unatural luma) the HVS tunnig well be visualy not good in this case.

You show simply artefact (if there are really artefacts) that in the real conditions it will be impossible to see.

Moreover in this case make q2@uhr or q3@uhr is a completely useless and absurd example ...

HeadBangeR77
29th January 2007, 17:08
Well XviD q2 with uhr done more than 10 Mbps, I have no doubt that x264 obtain good result at 10 Mbps for 400p encoding ... !!?

What must be my setting for XviD ... ???
Sagittaire, I mean no offence, but you seem to act so quickly, that you miss some points and statements I've made (even more than just once ;)). If we are to discuss and test, then plz make an effort and read what I've written, at least once.

http://forum.doom9.org/showpost.php?p=945765&postcount=34

"I'm encoding fast samples atm: XviD 1.1.2 Koepi's build, MSP=5, VHQ=1, VHQ for b-frames, Chroma ME, Turbo, Trellis, b-frames 2/1.62/0.0 (no Qpel nor any other options on)..."

Encoding speed on my old Athlon XP-M @ 11x220, 2x512MB Mushkin TCCD 2-3-3-11: about 35-36 fps.

This is the way I make some quick samples. For more quality in one-pass encodes you'll need:
MPS=6, VHQ=2/3*, VHQ for b-frames, Chroma ME, Trellis and Qpel, b-frames 2/1.62/0.0 (no Turbo nor any other options on).
* VHQ=4 could have problems with grain & noise.

Encoding speed: 13-15 fps, as far as I can remember, which is still way above x264 & my current hardware.

I've already listed the matrices used, so I won't do it again. Of course you could use others, as you've already done (like Sharktooth's EHR, UHR, Fox Entertaiment, Semi-Insane etc., although it doesn't make sense to me).

<smoke>

EDIT coming soon. ;)

HeadBangeR77
29th January 2007, 17:24
Well it's simply not a good way. Some HVS tunnig use for example use higher quantizer in dark area but if you make modification for the image (more unatural constrast or more unatural luma) the HVS tunnig well be visualy not good in this case.

You show simply artefact (if there are really artefacts) that in the real conditions it will be impossible to see.
Although I do see those artifacts, I must agree with you. :)

Moreover in this case make q2@uhr or q3@uhr is a completely useless and absurd example ...
I can see your point, but you speak of very high bitrates, as if you wanted to test the ultimate codec's capabilities, and on the other hand you seem to limit that bitrate. If you had read what I had written before, I'm not interested in one-pass-extremely-high-bitrate encodes.

I'm doing samples atm, but try to keep them in reasonable bitrate & size, so that they won't get bigger than the VOB itself (which is, as I wrote, 65.5MB).

I've spotted the artifacts and came to the conclusion, XviD was better for that source, while doing 2-pass sample clips (for details see one of my first posts). XviD produced better quality in this particular scene, at the same bitrate (sic!).

I'm not trying to claim a specified codec is better or worse: I'm trying to say, that for certain sources and certain bitrates, XviD is still a match for x264.

Savvy? ;)

Sagittaire
29th January 2007, 17:33
Sagittaire, I mean no offence, but you seem to act so quickly, that you miss some points and statements I've made (even more than just once ;)). If we are to discuss and test, then plz make an effort and read what I've written, at least once.


No offence at all but here I speak about *.mp4 guy sample.

Moreover IMO XviD q2 with high quality matrix is a completely useless setting for me. In this bitrate interval MPEG2 will begin to done very good result with really better hardware compatibility and really better authoring capacity (DVD)

HeadBangeR77
29th January 2007, 17:42
No offence at all but here I speak about *.mp4 guy sample.
And I know this, especially because I haven't uploaded my VOB yet. But I wanted to concentrate on some other points of discussion, like e.g. desired filesize and encoding's total time, apart form just bumping the bitrate up to 10 Mbit/s for a resized encode. Hence my reference to my previous posts, as well as some recommendations as to XviD encoding ;)

Moreover IMO XviD q2 with high quality matrix is a completely useless setting for me. In this bitrate interval MPEG2 will begin to done very good result with really better hardware compatibility and really better authoring capacity (DVD)
And that's utterly true. :) I would like to prove it's possible to keep a reasonable transparency for an XviD encode at some reasonable bitrate, keeping some filmgrain and scene's natural dust & dirt, hence I'm experimenting with samples atm. Try Didee's SixOfNine Q3, Heini's SixOfNine Q3 and Heini's MR Q2/Q3.

cheers,
HDBR77

Btw. What about my question? Would turning off some advanced AVC settings like 4x4 partitions, DCT Decimate etc., just to keep some filmgrain, harm the overall quality? Would it harm quality at constant quant or just make the file bigger or would harm the quality in case of 2-pass encode with target filesize/bitrate? I don't have to mess with XviD settings to retain the discussed details.

Sharktooth
29th January 2007, 17:50
it will make the file bigger or harm the quality in case of 2 passes (fixed filesize). However "harm the quality" means it will lower the metrics (PSNR, SSIM) that do not necessarily represent the "perceived quality"...

HeadBangeR77
29th January 2007, 18:38
it will make the file bigger or harm the quality in case of 2 passes (fixed filesize). However "harm the quality" means it will lower the metrics (PSNR, SSIM) that do not necessarily represent the "perceived quality"...
Thanks very much for the quick and precise answer (the best metrics are my own eyes, especially late at night with no other lights, but just my pc and me :D).

I'm finishing my sample-encodes and I've just come to the conclusion, it would be good to make a two-pass encode with my sample vob, anomorphic! :

1) VOB is 65.5 MB large, so let's say we want to save some space (that's MPEG-4 all about, isn't it?), and make it 40-45 MB (the same for XviD and x264 or should we lower the filesize in case of x264, because of its more advanced capabilites?). I would suggest:
45MB for XviD
38MB for x264

(???)

2) I think we should enable/disable what options we want (XviD, x264), use custom CQM of our choice, but no filters at all, and encode the sample into a container of our choice (AVI, MP4, MKV, OGG etc.).

3) Two passes, no matter if the first is fast or full, or a hybrid (which is my choice). The script (cropping and PAR) I'll post later, this evening yet.

Would the above be an objective comparison? We could let everybody just download the encodes and say what they think about it. I don't need any metrics, but let's say SSIM (and maybe MSU Blocking - sounds suitable for this test ;)) could go.

cheers,
HDBR77

PS. @ foxyshadis
The scene is crazy, true enough, so the problem is in keeping as much grain/dust/goodness knows what as possible, because it's natural for this particular scene. X264 makes it so clean, that it doesn't look like a XVIIth century's fight in an old smithy, but more like star wars or sth :D
And the above can't be done at all cost imo - so bitrates like 10 Mbit/s are excluded, since the source is roughly 4-5 Mbit/s (here I agree with Sagittaire).

foxyshadis
29th January 2007, 20:44
Well it's simply not a good way. Some HVS tunnig use for example higher quantizer in dark area but if you make modification for the image (more unatural constrast or more unatural luma) the HVS tunnig well be visualy not good in this case.

You show simply artefact (if there are really artefacts) that in the real conditions it will be impossible to see.

Moreover in this case make q2@uhr or q3@uhr is a completely useless and absurd example ...

I've never heard anyone describle a film effect as "natural", but most movies are filmed with all kinds of effects. The whole point of having an advanced video codec is to better handle the things that threw cogs into older codecs. Stop apologizing for x264, we all agree it's a great codec but the thread is about specific limitations it has and possibly how to mitigate them; simply saying they don't exist and the people who see them can't really see them isn't helping.

I don't know if there's any way to warp the grain to convince the encoder to keep it, without working on a parametric way of doing it, though. (Which may be as simple as a file with frame ranges and ffdshow settings. I started such a thing but abandoned it as needing more thought in the design first.) Especially for such a crazy scene as headbanger77's.

DarkZell666
29th January 2007, 21:47
[evilmode on]
I don't know if there's any way to warp the grain to convince the encoder to keep it,I like the word "warp" :p
So, basically, rather than telling x264-the-bastard to be a nice guy with poor little shy grain, we should teach the grain to be less impressionable so that x264-the-bastard isn't tempted to punch it's face too often :P
[evilmode off]

What about ... medium frequency "sharpening" rather than edge (high frequency) sharpening ? That's what grain is, after all, isn't it ? (more or less ...)

*.mp4 guy
30th January 2007, 02:49
I think some people missed the point of that example, which is that there are some things X264 just isn't any better at then Xvid, for these situations it makes more sense to use Xvid because it doesn't cause any unique problems, the clip was supposed to demonstrate this, not the artifacts x264 produces on more subdued areas of the picture.

Sagittaire also seems to have gottent the impression that I am "against" X264 (or advances in videocoding in general) Which couldn't be farther from the truth; Just look at all the time I spend here, the matrices I made for X264 etc. Just because I acknowledge problems when I find them (and do my best to find ways that I can work around them) doesn't mean that I'm against advances in video coding, it just means that If the best solution in certain situations is to use a less advanced codec I will use the best solution not the newest.

Sorry if I pulled this thread to far off topic, that wasn't my intent.

HeadBangeR77
30th January 2007, 03:14
I think some people missed the point of that example, which is that there are some things X264 just isn't any better at then Xvid, for these situations it makes more sense to use Xvid because it doesn't cause any unique problems, the clip was supposed to demonstrate this, not the artifacts x264 produces on more subdued areas of the picture.
I agree with you form the first to the last letter of your statement (see my post here (http://forum.doom9.org/showpost.php?p=946100&postcount=58)).

as well as with ...

Just look at all the time I spend here, the matrices I made for X264 etc. Just because I acknowledge problems when I find them (and do my best to find ways that I can work around them) doesn't mean that I'm against advances in video coding, it just means that If the best solution in certain situations is to use a less advanced codec I will use the best solution not the newest.

Sorry if I pulled this thread to far off topic, that wasn't my intent.
I think everything we've been talking about is still about pros and cons of the two mentioned codecs, so it perfectly suits the thread's name. ;)

Btw. Didee's SixOfNine seems to eat much from my sample, while Heini's SixOfNine preserves everything (both are in the same league). Screenshots to be uploaded later (the sample probably tomorrow).

cheers,
HDBR77

FAII
30th January 2007, 07:26
Is 3 pass really worth it? I encode all of my videos in 2 pass. My friend tells me there's barely any difference between 2 pass and 3 pass.

DarkZell666
30th January 2007, 09:35
FAII (you're way off topic btw) : there are many topics about 2-pass vs. 3-pass and the true answer is ? .... tadaaaaaaaa! => It depends ! :p
Try encoding a sample with 2- ans 3-passes and compare for yourself, that's the best advice that can be given to you imho, because wether the 3rd pass is worth the time spent on it is your choice :)

FAII
30th January 2007, 10:21
OK, let's switch from "Is it worth it?" to "Is it always better (no matter how little)?"

And could you link to these threads? I can't find them.

MySchizoBuddy
30th January 2007, 11:30
2006 codec benchmark wasn't done right
I'm still waiting for the Vc1 and h.264 comparison

Theliel
30th January 2007, 12:33
for me is easy. X264 is the best video codec at the moment, but is posible that sometimes is better use Xvid.

VC1 Vs H.264... well, H264 are more powerfull and better codec, but yes, I'll like view some test too. I haven't time for make some of them.

Sharktooth
30th January 2007, 14:50
OK, let's switch from "Is it worth it?" to "Is it always better (no matter how little)?"

And could you link to these threads? I can't find them.
3rd pass is only useful if rate control misses the desired bitrate (but it happens very rarely).
for what concerns "grain" in modern movies, it's digitally added... so by removing it you actually do what you're supposed to...
re-adding it during playback is as easy as a mouse click (with ffdshow)...
however dont forget to use (lower) the deadzone parameters in x264 that are supposed to "help" preserving noise and grain...
for what concerns my encodings i never found a case where xvid would be superior to x264 in terms of global quality of a movie...

HeadBangeR77
31st January 2007, 01:01
Attention! Achtung! Pozor! Uwaga!
There will be a new download link very soon (thanks to DarkZell666), so if you're sick of multiple clicking and waiting at rapidshare, you will able to download directly the whole sample from an ftp!
Update: The new link is already avaliable here:
http://forum.doom9.org/showpost.php?p=947397&postcount=85

My best sample encodes at constant quantizer are here:
http://forum.doom9.org/showpost.php?p=947231&postcount=83

cheers

...

Although I still haven't got my normal internet accses (1.5Mbit/768kbit FTTH) and have to stick to some shitty-almost-modem-speed shared ADSL connection, I will upload the promised sample tonight, if anyone is still interested (hope so!) ;)

I have packed the sample, including d2v project (forced film, sometimes two projects differ a bit then) and the suggested aviscript (idct, cropping, resizing), with WinRAR and split it into 4 pieces, just in case sth might go wrong while uploading (8 KB/s, no comments). I'm gonna update this post with further links to the upload, for now, here's the first part:

http://rapidshare.com/files/14170724/Black.Pearl.Sample.VOB.part1.rar

and finally the next ones:

http://rapidshare.com/files/14176578/Black.Pearl.Sample.VOB.part2.rar

http://rapidshare.com/files/14180722/Black.Pearl.Sample.VOB.part3.rar

http://rapidshare.com/files/14182108/Black.Pearl.Sample.VOB.part4.rar

thanks for your patience and may the force be with you! :D

HDBR77

HeadBangeR77
31st January 2007, 01:57
In the meantime ...

I've done some samples at constant quantizer over the last few days, in order to check, if XviD is capable of preserving every detail from the mentioned killer-scene, even at the cost of high bitrate. I'll post some screenshots later, however they can't give back the overall impression one could get only while watching whole samples. I would like to remind you, that the original VOB is
65.5 MB large, 16:9 anomorphic widescreen (1:2.35 /1:2.40) NTSC, so there's not much left after cropping black bars (712x360).
Therefore I decided to resize (I usually either downsize or upsize) to 720x304 square pixels - not a big hit in terms of quality imo, and it goes a tad faster.

0) The original VOB MPEG-2
http://www.hidebehind.com/thumbs3/B92FC654.png (http://www.hidebehind.com/B92FC654)
http://www.hidebehind.com/thumbs3/B4BDB289.png (http://www.hidebehind.com/B4BDB289)

1) Heini's SixOfNine @ Q2 - 75.6 MB, 4186 kbps
This one has managed to keep everything I wanted to keep, or at least to keep the overall grainy impression, including dust & dirt, which are an integral part of the scene. Though I think the cost is too big, since it's bitrate is higher than the original MPEG-2. Still, it's better than 10 Mbit/s mentioned somewhere above in this thread.
Nevertheless, once or twice, there are some artifacts visible, as if the codec wanted to swallow the grain, but couldn't (some dust and grain flickering, or dead zones derived of dust). Only visible while watching at very high brightness, frame by frame.
http://www.hidebehind.com/thumbs3/F5BFFBB1.png (http://www.hidebehind.com/F5BFFBB1)
http://www.hidebehind.com/thumbs3/ECECA752.png (http://www.hidebehind.com/ECECA752)

2) Didee's SixOfNine @ Q2 - 70.0 MB, 3877 kbps
This matrice has produced some nice effect, eating more of the filmgrain and dust than the previos, yet making it more evenly, without rapid changes or any artifacts I could spot. If I had to choose between those two, it would really be a hard choice to make. Bitrate still above the original!
http://www.hidebehind.com/thumbs3/27A0CC9C.png (http://www.hidebehind.com/27A0CC9C)
http://www.hidebehind.com/thumbs3/A9B3FACC.png (http://www.hidebehind.com/A9B3FACC)

3) Soulhunter's V3 @ Q2 - 54,8 MB, 3031 kbps
This one was tricky, I must admit. It doesn't play in the same league as the first two ones, however the overall impression was very good and it managed to keep the damend grain & dust very well. As a con, I could say the image was somehow softer, not so sharp as in case of the first two. On the other hand the bitrate was reasonable, at least!
http://www.hidebehind.com/thumbs3/D786326C.png (http://www.hidebehind.com/D786326C)
http://www.hidebehind.com/thumbs3/E37000C8.png (http://www.hidebehind.com/E37000C8)

4) Heini's MR (modded V3 HR) @ Q2 - 52.7 MB, 2915 kbps
It may sound crazy, but this one kept a bit less grain & dust than the previous, however the overall impression was a bit better, as if the image was a bit sharper or sth similar. Of course, no match for the first two, but the bitrate was kept in reasonable limits. 3 and 4 have the best quality/size ratio imho.
http://www.hidebehind.com/thumbs3/11BB6506.png (http://www.hidebehind.com/11BB6506)
http://www.hidebehind.com/thumbs3/6874F41D.png (http://www.hidebehind.com/6874F41D)

5) Sharktooth's V3 HR @ Q2 - 52.0 MB, 2877 kbps
V3 HR did the worst job in this amateur comparison, however I wouldn't say it failed badly. Although the difference in bitrate against its modded version was mariginal, it kept less grain and was somehow softer, yet managed to keep a decent overall impression (has not ruined the scene, in other words).
http://www.hidebehind.com/thumbs3/FB2EBF18.png (http://www.hidebehind.com/FB2EBF18)
http://www.hidebehind.com/thumbs3/A1E0E95C.png (http://www.hidebehind.com/A1E0E95C)

At quantizer 3, what I expected, all the matrices has swallowed too much. Heini's 6of9 did relatively well, if I had to name the winner, Didee's 6of9 has kept its face as well. Soulhunter's matrice failed at this quant unfortunatelly, turning the grain into some kind of moving, unnatural haze or fog (that's exactly what x264 did in my early tests). Heini's MR did a bit better this time, although it didn't look to well in terms of "grain retention". :D Sharktooth's one similar, maybe a bit worse then its competitors. I will just give the final bitrate and post screenshots again.

6) Heini's SixOfNine @ Q3 - 43.4 MB, 2401 kbps
http://www.hidebehind.com/thumbs3/4D07C1CA.png (http://www.hidebehind.com/4D07C1CA)
http://www.hidebehind.com/thumbs3/E2253CFB.png (http://www.hidebehind.com/E2253CFB)

7) Didee's SixOfNine @ Q3 - 41.1 MB, 2269 kbps
http://www.hidebehind.com/thumbs3/A447220E.png (http://www.hidebehind.com/A447220E)
http://www.hidebehind.com/thumbs3/7D59D3F8.png (http://www.hidebehind.com/7D59D3F8)

(the rest in the next post because of forum's limitations)

Settings (fast sample) as listed ...here... (http://forum.doom9.org/showpost.php?p=945765&postcount=34), haven't tried the more accurate ones as suggested ...here... (http://forum.doom9.org/showpost.php?p=946091&postcount=57), and I probably won't because of time issues.
Plz view at full screen with as much brightness as possible (I personally use QPQ function in my Iiyama CRT monitor).

2-pass samples I have, but I'm already tired of all this. I could upload the best one, if someone was interested.

Good night everyone! :)

PS. Just a tip, seems obvious, but ... the png size may suggest the amount of details in each frame, since they were compressed using the same pngout-plugin (6 passes).

R3Z
31st January 2007, 04:48
Well done man, if you want web space to host these or any other projects that give a visual representation - please let me know and its yours.

That goes for anyone else too.

HeadBangeR77
31st January 2007, 04:57
8) Soulhunter's V3 @ Q3 - 29.8 MB, 1643 kbps
http://www.hidebehind.com/thumbs3/5733178A.png (http://www.hidebehind.com/5733178A)
http://www.hidebehind.com/thumbs3/FF27461B.png (http://www.hidebehind.com/FF27461B)

9) Heini's MR (modded V3 HR) @ Q3 - 31.3 MB, 1728 kbps
http://www.hidebehind.com/thumbs3/1F790A90.png (http://www.hidebehind.com/1F790A90)
http://www.hidebehind.com/thumbs3/30ED6DE0.png (http://www.hidebehind.com/30ED6DE0)

10) Sharktooth's V3 HR @ Q3 - 30.6 MB, 1690 kbps
http://www.hidebehind.com/thumbs3/7DE0D4.png (http://www.hidebehind.com/7DE0D4)
http://www.hidebehind.com/thumbs3/54A1C5B8.png (http://www.hidebehind.com/54A1C5B8)

11) My script for upsizing (despite of some denoising involved, looks good) - Heini's SixOfNine Q3
http://www.hidebehind.com/thumbs3/5938A6AA.png (http://www.hidebehind.com/5938A6AA)
http://www.hidebehind.com/thumbs3/78919EEA.png (http://www.hidebehind.com/78919EEA)

12) My script for upsizing (despite of some denoising involved, looks good) - Didee's SixOfNine Q3
http://www.hidebehind.com/thumbs3/37BD3B1B.png (http://www.hidebehind.com/37BD3B1B)
http://www.hidebehind.com/thumbs3/CDCB7AE0.png (http://www.hidebehind.com/CDCB7AE0)

@ R3Z
Cheers! :) Hope all that could be of any use apart from my own curosity. ;)
Hosting might be useful, but first I must get my proper HTTH connection back, thanx in advance.

R3Z
31st January 2007, 05:07
@ R3Z
Cheers! :) Hope all that could be of any use apart from my own curosity. ;)
Hosting might be useful, but first I must get my proper HTTH connection back, thanx in advance.

Truly, it does help man :D

Its all well and good for others to tell people what to do, but if you are a noobie or want to learn more the only way you can get around to knowing things is a) visual representation with the settings used and b) doing it yourself.

Bookmark my name, and if you need space - let me know :)

DeathTheSheep
31st January 2007, 06:53
For a starter, MeGUI has baloon tips explaining the options in the x264 codec configuration.

Some of those balloon tips look quite a bit like they were ripped out of an older version of my guide...!

Just an aside, btw...

DarkZell666
31st January 2007, 07:45
Hmmm you did say Q2 right ? The overlayed info says it's Q3 all over ;)

HeadBangeR77
31st January 2007, 13:31
Hmmm you did say Q2 right ? The overlayed info says it's Q3 all over ;)
When? Where? Why? For what purpouse? :o
Gonna check it out immediately.

EDIT: I've left Q2 in the description of No 6-10, just a typo (it's written above, that they were made at Q3). Edited.

Q2: 1) P 2.0, P 2.0; 2) B 3.0, P 2.0; 3) P 2.0, P 2.0; 4) P 2.0, P 2.0; 5) P 2.0, P 2.0;
Q3: 6) P 3.0, P 3.0; 7) P 3.0, P 3.0; 8) P 3.0, P 3.0, 9) P 3.0, P 3.0; 10) P 3.0, P 3.0.

Btw. Turning on Qpel blew up the size in this case, e.g. by Didee's 6of9 Q2 from 70MB to 74.5MB, yet with noticeable quality's improvement. I can't say the same is valid for pure constant quant (B 1/1/0) with Qpel - 95MB and no visual improvement, unless I'm blind. :D
Perfect quality? Standard MPEG matrix at Q1 - 144MB - pure nonsesne from quality/filesize pov. :p

PS. Could someone with better knowledge and experience in x264 try to make a sample?

check
31st January 2007, 14:20
your sample is really way too big to bother with. Cant you crop it down to ~50mb at the max?

HeadBangeR77
31st January 2007, 14:28
your sample is really way too big to bother with. Cant you crop it down to ~50mb at the max?
To download 66.5MB and to download 50MB doesn't make a large difference, does it? :confused:
I've made all my samples with this m2v (as well as all 2-pass samples, that I would have to encode again, to reach a different target filesize). The larger the samples the better for testing purpouses imo.

Also, sorry for inconvenience of splitting files, that can be downloaded only part by part after half an hour or so (I wasn't familiar with rapidshare), if one doesn't have a paid account by them. The reason was safety of upload, as stated before.

cheers,
HDBR77

HeadBangeR77
31st January 2007, 21:12
Here's my last post, which I will keep updating with new samples. Till now you've only got some screenshots (tried to choose those with P 2.0/P 3.0 frames, since B-frames seem to be uncapable of noise-retention ;)) and my subjective, rather brief impressions. Now I'm gonna upload a few samples I've made, starting from the best one, and finishing with the most reasonable ones, in terms of quality/filesize ratio. I would be really grateful (I know I keep repeating myself) if someone could encode such samples using x264. I'm gonna trie as well, but I don't use MEGUI nor am I into x264's custom matrices, so my encodes won't be a proper comparison for my XviD ones.

Settings as described earlier + Qpel. Turbo still on, MSP at 5, since I had a vague impression MSP 6 used to swallow more filmgrain, VHQ 1 (from the same reason).

1) The absolute killer in terms of quality and bitrate - Heini's SixOfNine @ Q2 - 80.5MB, 4456kbps

http://rapidshare.com/files/14297870/13a-H6o9-Qpel-5-1-Q2.avi

2) Imo the best among those within reasonable bitrate, really grrrainy - Soulhunter's V3 @ Q2 - 60.4MB, 3343kbps

http://rapidshare.com/files/14330263/15a-SV3-Qpel-5-1-Q2.avi

3) Maybe a bit worse than the previous, but still quite good - Heini's MR @ Q2 - 56.1MB, 3106 kbps

http://rapidshare.com/files/14340025/16a-HMR-Qpel-5-1-Q2.avi

4) Comparable to the previous one, much smaller filesize - Heini's SixOfNine @ Q3 - 45.7MB, 2525kbps

http://rapidshare.com/files/14347717/17-H6o9-Qpel-5-1-Q3.avi

(To be continued... ;)) - not valid anymore - finito! :D

DarkZell666
31st January 2007, 22:24
HeadBanger77: i've just sent you a pm with ftp credentials for uploading your sample (which will be better than rapidshare I guess ;)). (btw, I invite anyone who'll download the files off my mirror to report the download speed back =)).

HeadBangeR77
1st February 2007, 05:22
HeadBanger77: i've just sent you a pm with ftp credentials for uploading your sample (which will be better than rapidshare I guess ;)). (btw, I invite anyone who'll download the files off my mirror to report the download speed back =)).
I've sent you a pm either - it's sooo late I'm gonna upload the vob tomorrow (i.e. today, after-noon :D). Thanks a bunch, mate, much appreciated. :) Hope some x264 encodes will emerge from the tides of time then. ;)

New download links(!!!):

http://xasonline.info/headbanger/Black.Pearl.Sample.m2v
http://xasonline.info/headbanger/Black.Pearl.Sample.d2v


btw. it's working flawlessly with Total Commander & I can cap the upload speed at last, and enjoy browsing in the meanwhile!
edit: download 60 KB/s, which is my maximum with the present connection.

PS. The script:


# PLUGINS
LoadPlugin(" ... \DGDecode.dll")

# SOURCE
mpeg2source(" ... \Black.Pearl.Sample.d2v", idct=7)

# CROPPING
crop(4,58,712,360)

# RESIZING
LanczosResize(720,304)


And don't forget to change the sample path in the d2v project either. ;)

Sharktooth
1st February 2007, 15:12
Some of those balloon tips look quite a bit like they were ripped out of an older version of my guide...!

Just an aside, btw...
Uhm, it's possible. The baloon tips were a contribution from someone of this community. The changelog eventually shows who was the author.

HeadBangeR77
1st February 2007, 23:14
To sum the things up, as well to gather all the links to my uncommented efforts in one place

The thread started with a question, if x264 (eventually H.264 in general) was much better than XviD (MPEG-4 ASP). There is no doubt that x264, being a much more advanced codec, delivers better overall quality throughout the film /movie /clip, and this at the same or even lower bitrate. I don't want to go into any numbers, statistics etc., 'cause that would probably raise some pulses here, especially in the AVC forum, and this is not my intention. I was reading carefully through this thread to gather opinions, before I started to post at all. Especially the posts of DarkZell666 (http://forum.doom9.org/showpost.php?p=944722&postcount=6), *.mp4 guy (http://forum.doom9.org/showpost.php?p=944760&postcount=7) (don't forget he's really deep into AVC), and aabxx (http://forum.doom9.org/showpost.php?p=944765&postcount=8) were the ones I could agree with, more or less. Therefore I found some source, that had caused me whole lot of trouble in the past, both with XviD and x264, and proposed some sort of competition /comparison here:
http://forum.doom9.org/showthread.php?p=945716#post945716

I wanted to prove XviD handles this particular source better, both at high bitrates (1-pass samples at constant quantizer 2 & 3) and middle-high bitrates (2-pass encodes within reasonable limits of filesize). My goals, used settings and matrices can be found on pages No 2-4 of this thread, including screenshots(!) (http://forum.doom9.org/showpost.php?p=945832&postcount=37) from the source for those, that wouldn't download the sample anyway. Until now I've made dozens of samples with XviD, more or less successfully, both at constant quantizer beyond and within limits of reasonable bitrate, and 2-pass encodes within reasonable limits (46MB). In my opinion the given sample can cause a lot of trouble to any codec available today, unless we start to use some filters, which was definitely not the goal of this thread, but pure codec's capabilities and possible limitations. Till now, to my surprise and disappointment (:p), no single x264 encode has popped out!

With one thing, suggested by Sagittaire, I will never agree: speed. Since most XviD's users use fast first pass or a hybrid first pass (as in Teegedeck's presets), and most x264's users prefer 2 full passes (some even 3), there's no match in terms of speed for XviD imho. On my outdated-yet-still-breathing pc (Athlon XP-M 11x220, 2x512MB Mushkin TCCD 2-3-3-11, ATI Radeon 9800 PRO @ XT v-modded, modded BeQuiet 450W PS and so on) I can reach 25-40 fps for the first pass (hybrid, yet I change it depending on the source) and 10-12 fps for the 2nd pass with all the options maxed out. With x264 I rarely see anything beyond 10fps, not to mention an encode with all possible goodies activated.

Now, before you fall asleep while reading, here are the links to the most important materials I've been dealing with over the last few days:

Post with the most important links
http://forum.doom9.org/showthread.php?p=946838#post946838

The source sample, MPEG-2, "The Curse of the Black Pearl"
http://xasonline.info/headbanger/Black.Pearl.Sample.m2v
http://xasonline.info/headbanger/Black.Pearl.Sample.d2v

Screenshots and my subjective impressions start here...
http://forum.doom9.org/showthread.php?p=946858#post946858

The best constant quality/quantizer samples are here...
http://forum.doom9.org/showthread.php?p=947231#post947231

...and the best 2-pass encodes with a bunch of screenshots:

http://forum.doom9.org/showthread.php?p=948242#post948242

PS. Hope my English is understandable. ;)

DarkZell666
2nd February 2007, 08:07
You gotta be reading my mind mate =)

I did a couple of CQP18 encodes tweaking the deadzone/deblocking parameters and "good quality" settings=> the x264 encode comes out exactly the same size as the MPEG2 encode (~500kB near), and looses quite some grain in the background, but overall looks very good (the grain in the foreground is preserved nicely). I'll post more details later on, when I've tried the different CQM's (I wanted to get the most out of the flat one before trying something else).

-- Edit per akupenguin's following comment --
I simply changed "DGIndexProjectFile14" to "DGIndexProjectFile15" (inside the .d2v HeadBanger77 posted), and the latest 1.4.9 beta 13 dgdecode.dll opened it, with correctly set IVTC etc... my bad ^^
-- --

More coming later, I'll compare your smallest encode with mine (your biggest encode looks very close to the MPEG2 except in very rare places, and it's closer to the MPEG2 than my current x264 version, even if your's is 23MB bigger than the source :p)

akupenguin
2nd February 2007, 08:14
You also didn't mention your deinterlacing method in your avs script, so I resorted to using FieldDeinterlace(full=true, dthreshold=10)
Black.Pearl.Sample.m2v isn't interlaced, it's soft-telecined.

DarkZell666
2nd February 2007, 11:01
My current batch file:
SET DEBLOCK=-6
SET DEADZONE=0
SET QP=18

rem SET MATRIXNAME=M4G-HighDetail-V3.1
rem SET MATRIX=--cqmfile "./Matrices/%MATRIXNAME%.cfg"

rem SET MATRIXNAME=M4G HRM V1
rem SET MATRIX=--cqmfile "./Matrices/%MATRIXNAME%.cfg"

SET MATRIXNAME=flat
SET MATRIX=

rem BFRAMEOPTS NOT USED YET
rem SET BFRAMEOPTS=-w -b 3 --b-pyramid --direct spatial --b-rdo

SET PARTITIONS=-8 -A "p8x8,i8x8,b8x8"
SET MISCOPTS=--no-fast-pskip --progress --deadzone-inter %DEADZONE% --deadzone-intra %DEADZONE%
SET OPTIONS=--qp %QP% --mixed-refs --ref 3 --no-deblock --me hex --subme 6 %PARTITIONS% -t 1
x264 %OPTIONS% %MISCOPTS% %MATRIX% --progress -o "BP_QP%QP%_%MATRIXNAME%cqm_deadzone%DEADZONE%-nodeblock.mkv" "pirates.avs"

As you can see: QP18, no bframes, no deblocking, deadzone(inter+intra)=0, flat matrix.
This gave me a 50,5MB file, with rock-ass quality (not 100% transparent yet, but getting there :p).

See for yourself: screenshots here (http://xasonline.info/doom9/BP_QP18_flatcqm_deadzone0-nodeblock.rar) (~3MB)
Note: I voluntarily ruled out the 4x4 partitions.

*.mp4 guy
2nd February 2007, 12:23
The M2v really isn't a great source, there are a lot of visible artifacts in it, did you put it through dvd rb or something? I don't remember the dvd beeing that bad.

DarkZell666
2nd February 2007, 13:00
The M2v really isn't a great source, there are a lot of visible artifacts in it, did you put it through dvd rb or something? I don't remember the dvd beeing that bad.

I suppose the question was targeted to HeadBanger77, but in case you're actually asking me the answer is no :)

DarkZell666
2nd February 2007, 14:25
All x264 settings are as shown in the batch file in my previous post.

Here's what I've tried so far:

x264 QP18 with M4G High-Detail 1.3 => 48.371kB
x264 QP18 with flat CQM => 51.749kB
x264 QP17 with flat CQM => 61.139kB
x264 QP18 with M4G HRM => 64.942kB
Original MPEG2 source for reminder => 67.122kB

Screens:

http://xasonline.info/doom9/pirates_lot1_hat.jpg

http://xasonline.info/doom9/pirates_lot1_face.jpg

http://xasonline.info/doom9/pirates_lot1_background.jpg

Note: the original m2v picture is 1 or 2 frames off each time. I tried adding Trim(2,0) but it jumped the other way round (as if it had trimmed 4 frames instead of 2).

HeadBangeR77
2nd February 2007, 14:35
The M2v really isn't a great source, there are a lot of visible artifacts in it, did you put it through dvd rb or something? I don't remember the dvd beeing that bad.
I was waiting for someone with sharp sight to mark that. ;)
Yes, it's my back-up copy, that had been simply shrinked to fit one DVD-5 (no menu, no extras, just the main movie and AC3 5.1 soundtrack), fortunatelly just a few days before my young cousin literally broke the original in two pieces (the same happened to "Dead Man" <shed a tear>). * When I compare it to e.g. Two Towers Director's Cut Edition (bare movie on two DVD-9s + 2 x DVD-9 with extras) the quality is s***y. This make a proper encode even more difficult imo, since when I use e.g. Didee's SixOfNine matrice, which is rather flat, it makes the source even more blocky (same for the HVS version). Heini's SixOfNine keeps the details I would like to keep, and is less blocky than the source at the same time. Very gentle use of Deblock_QED helps a lot, but we don't use any filters/scripts for this little comparison.**

As to the d2v - I'm still using 1.4.9. beta-7, since I haven't found any bugs in it so far, for my limited use. And yes, the source was 100% film, so forcing film was enough. I attached my d2v, since I've marked, that forcing film doesn't always give the same results (a few frames may differ), and I wanted all the encodes to be identical in terms of frames.

Brb, cheers

[evilmode=on]
* now someone tell me back-ups aren't needed! :angry:
[evilmode=off]

** framestepping for instance from frm 2700 and further reveals some nasty blocks.

Evilmode and its modifications are under pending patent protection, reserved for DarkZell666 Inc.

PS. I've just made a two pass encode with Fox Home Entertainment - interesting :D
http://rapidshare.com/files/14499240/Black.Pearl.Sample14.avi

PS2. @ DarkZell666
Could you just paste the links /thumbnails - my screen goes crazy :D Also, joined jpegs aren't a great idea while comparing quality: I would recommend single pngs, which are lossles, so that everyone could view them at fullscreen resolution. ;)

I'm examining the screencaps you've taken from the the flat matrice's encode.

HeadBangeR77
2nd February 2007, 16:28
(...)
As you can see: QP18, no bframes, no deblocking, deadzone(inter+intra)=0, flat matrix.
This gave me a 50,5MB file, with rock-ass quality (not 100% transparent yet, but getting there :p).

See for yourself: screenshots here (http://xasonline.info/doom9/BP_QP18_flatcqm_deadzone0-nodeblock.rar) (~3MB)
Note: I voluntarily ruled out the 4x4 partitions.
Gee, looks more blocky than the source, and the screenshots are so heavily compressed, that I can't tell much about the quality of the encode itslef. :(
Btw. The presentation looks bad, since the colors are washed out (VMR9 with TV-scale?).

I've also made some x264 encodes, using the default flat matrice, but I'm half-noob to AVC, so I didn't want to compare my results with my XviD ones. I played much with b-frames, I & P frames quality settings, with and without 4x4 partitions etc. I didn't trun off the deblocking though, used -2/-2 in the most extreme case, since it's already blocky at these settings. The samples I made are 50-60MB large (with 2 or 3 b-frames), QP 16, and I must admit I had expected worse results. :)

I'm comparig my two-pass XviD encodes atm, aiming at 46MB filesize, but the choice is hard. Gonna upload them today, when I've made my mind, so that they can be compared with those made at constant quantizer, uploaded above. I will attacht a bunch of screenshots as well. Do you think 46MB would be just for x264 as well, considering the source is Xvid-friendly ;), or 36-38MB, considering its more advanced features?

cheers
HDBR77

check
2nd February 2007, 16:50
To compare in a useful and practical way, both codecs should output the same size files. You should also aim to have a net reduction in filesize, say to 75%?

HeadBangeR77
2nd February 2007, 17:09
To compare in a useful and practical way, both codecs should output the same size files.
I must agree with you, considering the source has been carefully chosen to cause much trouble to x264; that's why I asked.

You should also aim to have a net reduction in filesize, say to 75%?
You mean 75% of the size I've already chosen, or in comparison to the original. If the latter is true, it's already less than that.

DarkZell666
2nd February 2007, 19:07
Actually I used this script to generate the screens:

clip1 = directshowsource("BP_QP18_M4G-HighDetail-V3.1cqm_deadzone0-nodeblock.mkv").Subtitle("QP18_m4ghighdetail")
clip2 = directshowsource("BP_QP17_flatcqm_deadzone0-nodeblock.mkv").Subtitle("QP17_flatcqm")
clip3 = directshowsource("BP_QP18_flatcqm_deadzone0-nodeblock.mkv").Subtitle("QP18_flatcqm")
clip4 = directshowsource("BP_QP18_M4G HRM V1cqm_deadzone0-nodeblock.mkv").Subtitle("QP18_m4gHRM")

clip5 = m2v().Subtitle("Orig. M2V")
clip6 = clip5

flat = StackVertical(clip2, clip3)
m4g = StackVertical(clip1, clip4)
m2v = StackHorizontal(clip5, clip6)

video = StackHorizontal(flat,m4g)
video = StackVertical(video, m2v)
video = video.ConvertToRGB32().SelectRangeEvery(15, 2)
video = ImageWriter(video, start = 0, file="D:\_etienne\blackpearltest\grabs\", type = "jpg", info=false)
return video

function m2v() {
LoadPlugin("DGDecode.dll")
m2v = mpeg2source("Black.Pearl.Sample_xas.d2v", idct=7)
m2v = m2v.crop(4,58,712,360).LanczosResize(720,304).ConvertToYV12()
return m2v
}


This was the quickest way I found at lunch time at work (imagine me eating a sandwich and configuring x264 with one hand, you'll understand :p). I'm doing the encodes again, and I'll output png's this time (but they'll have to stay as they are, sorry ^^).

*.mp4 guy
2nd February 2007, 19:16
...could you just upload the clips somewhere like megaupload (http://www.megaupload.com/), still frames are not the best way to compare video quality.

HeadBangeR77
2nd February 2007, 20:28
I've just finished encoding and decided, what samples among the 2-pass ones are the best imo. I'm gonna post the download links here, together with a short comment and codec's settings. I will also attach RARed still frames: of course comparing e.g. P 2 with B 4 makes no sense, but the majority has exactly the same quantizer and type of frame.

1) The best sample according to metrics (PSNR, SSIM), one of the best according to my own eyes, yet a bit blocky:

http://rapidshare.com/files/14591117/Black.Pearl.Sample12.avi

Didee's SixOfNine, hybrid first pass at Q2 (MSP=5, VHQ=1, Chroma ME, VHQ for b-frames, Qpel, Turbo, B-frames 2/1.62/0), second pass with curve compression 5/5 (MPS=6, VHQ=4, Chroma ME, VHQ for b-frames, Qpel, B-frames as in the 1st).


2) The best one imho, with almost the worst metrics (:p), less blocky than the source:

http://rapidshare.com/files/14618487/Black.Pearl.Sample11.avi

Heini's SixOfNine, hybrid first pass at Q3 (MSP=5, VHQ=1, Chroma ME, VHQ for b-frames, Qpel, Turbo, B-frames 2/1.62/0), second pass with curve compression 5/5 (MPS=6, VHQ=4, Chroma ME, VHQ for b-frames, Qpel, B-frames as in the 1st).


3) Comparable to No 1, good metrics, yet a bit worse according to my sight, a bit less blocky than 1:

http://rapidshare.com/files/14603587/Black.Pearl.Sample13.avi

Didee's SixOfNine HVS, hybrid first pass at Q2 (MSP=5, VHQ=1, Chroma ME, VHQ for b-frames, Qpel, Turbo, B-frames 2/1.62/0), second pass with curve compression 5/5 (MPS=6, VHQ=4, Chroma ME, VHQ for b-frames, Qpel, B-frames as in the 1st).


4) Still frames taken from the source, the best 1-pass samples linked a few posts above, and the just mentioned 2-pass encodes:

http://xasonline.info/headbanger/DE BEST.rar ;)

cheers,
HDBR77