PDA

View Full Version : x264 --q18 vs. xvid Q2 : Unexpected Results


grennis
26th January 2008, 04:48
According to everything I have read indicates that q18 is equivalent to Xvid's Q2 encoding, including this thread for example: http://forum.doom9.org/showthread.php?t=111982 where it is specifically stated that file size is comparable.

However, I'm encoding a 75sec DV clip and I'm seeing an output of 48M-50M from xvid Q2 (varies depending on other codec settings). Meanwhile, the x264 output filesize is 68M!!

Looking at the mp4 in gspot, it says the average bitrate in the mp4 is 7mbit!!! (@#&$^%).

So what is the deal? Why does x264 give me a slower encode and a larger file size at an insane bitrate for equivalent quality? Somebody help me here :confused: Is there some way to cap x264 from using this absurd bitrate?

Here is my x264 command line, based pretty much on the MeGUI preset for "Q2 Equivalent":

x264\x264.exe --qp 18 --ref 3 --mixed-refs --bframes 3 --b-pyramid --bime --weightb --analyse all --8x8dct --threads 2 --thread-input --sar 1:1 --progress --no-psnr --no-ssim --output %1.264 %1.avs

Dark Shikari
26th January 2008, 05:14
According to everything I have read indicates that q18 is equivalent to Xvid's Q2 encoding, including this thread for example: http://forum.doom9.org/showthread.php?t=111982 where it is specifically stated that file size is comparable.

However, I'm encoding a 75sec DV clip and I'm seeing an output of 48M-50M from xvid Q2 (varies depending on other codec settings). Meanwhile, the x264 output filesize is 68M!!

Looking at the mp4 in gspot, it says the average bitrate in the mp4 is 7mbit!!! (@#&$^%).

So what is the deal? Why does x264 give me a slower encode and a larger file size at an insane bitrate for equivalent quality? Somebody help me here :confused: Is there some way to cap x264 from using this absurd bitrate?

Here is my x264 command line, based pretty much on the MeGUI preset for "Q2 Equivalent":

x264\x264.exe --qp 18 --ref 3 --mixed-refs --bframes 3 --b-pyramid --bime --weightb --analyse all --8x8dct --threads 2 --thread-input --sar 1:1 --progress --no-psnr --no-ssim --output %1.264 %1.avsQP18 is not at all equivalent to QP2; thats just a rough approximation.

You should always use CRF mode anyways; no good reason to use --qp.

grennis
26th January 2008, 05:29
Thanks, the CRF 18 gives me a slightly smaller file size than xvid. I thought x264 would give me great compression over xvid but apparently not. I guess there's no reason to use it since xvid is widely supported.

Dark Shikari
26th January 2008, 05:30
Thanks, the CRF 18 gives me a slightly smaller file size than xvid. I thought x264 would give me great compression over xvid but apparently not. I guess there's no reason to use it since xvid is widely supported.x264 generally does give much better compression than Xvid; in my tests I've seen gains of up to 85% better quality at the same bitrate. Adaptive quantization makes that gap even larger.

How about you lower the bitrate until you notice a significant loss, rather than comparing two nearly transparent encodes?

grennis
26th January 2008, 06:13
x264 generally does give much better compression than Xvid; in my tests I've seen gains of up to 85% better quality at the same bitrate. Adaptive quantization makes that gap even larger.

How about you lower the bitrate until you notice a significant loss, rather than comparing two nearly transparent encodes?

Well I can bring the CRF up to 22 and possibly higher without seeing any difference (at least I don't) and this does bring the file size way down. But it bothers me that I'm losing something even if I can't see it.

akupenguin
26th January 2008, 06:20
CRF18 is losing something you can't see too. So are CRF1 and XvidQ2. Nothing short of lossless is perfectly lossless, so you might as well not encode anything.

Danisan
26th January 2008, 09:56
Here is my x264 command line, based pretty much on the MeGUI preset for "Q2 Equivalent":

x264\x264.exe --qp 18 --ref 3 --mixed-refs --bframes 3 --b-pyramid --bime --weightb --analyse all --8x8dct --threads 2 --thread-input --sar 1:1 --progress --no-psnr --no-ssim --output %1.264 %1.avs

Don't forget that that preset in MeGUI uses --subme 1, and I've noticed it creates larger files than --subme 6. So try using --subme 6 instead.

Dark Shikari
26th January 2008, 09:57
Don't forget that that preset in MeGUI uses --subme 1, and I've noticed it creates larger files than --subme 6. So try using --subme 6 instead.That's to be expected, since subme 1 sucks.

akupenguin
26th January 2008, 10:35
Don't forget that that preset in MeGUI uses --subme 1.
Why is that, anyway? subme 1 shouldn't be included in any preset that doesn't have "fastest" in its name. Anyone want to fix megui?

Sharktooth
26th January 2008, 15:01
it was by mistake, it happened when i exported, reimported and published the profiles without checking them.
im reorganizing them as well as fixing inconsitencies.

Sharro
26th January 2008, 18:41
At high bitrates and dvd-res, IMHO XVID with the right CQM will stand-up very well against x264, this has been widely discussed, at lower bitrates the story is different, but as I'm doing anamorphic encodings at higher bitrates... I'm sticking to XVID.

grennis
29th January 2008, 23:51
Just wanted to follow up in case other newbies follow my path. My problem was excessively noisy source. Once I setup the right filters and prepared the video for compression correctly, I found that x264 blows the doors off xvid. Thanks to everyone on this forum esp. Dark Shikari who helped this clueless newbie.

Dark Shikari
29th January 2008, 23:55
Just wanted to follow up in case other newbies follow my path. My problem was excessively noisy source. Once I setup the right filters and prepared the video for compression correctly, I found that x264 blows the doors off xvid. Thanks to everyone on this forum esp. Dark Shikari who helped this clueless newbie.Welcome to the club... the x264 club :cool:

Sharro
30th January 2008, 00:33
I found that x264 blows the doors off xvid.

I can call a few people on this thread to make you doubt of what you're saying.

My only attempt on encodes is keep as much of the original detail/grain/noise as possible, I use no filtering, just crop blackbars and do anamorphic encodings choosing the CQM, just that...

I can trick many trained eyes :).

All the best,

Sharro

PS: My last to major encoding sessions where the 3 Matrix on a DL DVD and Star Wars I; II and III on a DL all with ac3 tracks.

No filtering, maybe, one day I'll give a go to H264 at these bitrates and just playing with CQM's to see where I get in terms keeping detail.

Sagekilla
30th January 2008, 00:38
Mmm yes, I actually remove grain and noise through clever denoising (well, not that clever really) so I don't affect detail. Result? Less grain and noise (I don't particularly like either) and a much better image at the same bitrate, or a much smaller file at the same quality.

1.5 to 2 mbps is very normal for my 1:1 PAR (864x480) encodes, including original AC3 track. I could probably get this even lower if I encoded anamorphically and had the 144 less pixels.

Dark Shikari
30th January 2008, 02:18
You don't need really high bitrates to keep grain (http://x264.nl/x264.736.aq.0.47.mkv) ;)

(10 megabit, 1080p)

DeathTheSheep
1st February 2008, 05:01
Welcome to the club... the x264 club :cool:

How do you know if you're in the club? :confused:

Dark Shikari
1st February 2008, 06:52
How do you know if you're in the club? :confused:We have a secret clubroom where we encode all day :p The clubroom is also where we hide akupenguin, who is actually a superintelligent alien robot.

Morte66
1st February 2008, 14:18
We have a secret clubroom where we encode all day :p The clubroom is also where we hide akupenguin, who is actually a superintelligent alien robot.

I thought he was a hivemind combining tens of thousands of penguins?

DeathTheSheep
1st February 2008, 21:02
Wow, us AQ fanatics are all gathered here... looks like if someone's in the AQ club, that person's [obviously] a member of x264's. :D

A robotic, superintelligent alien penguin hivemind??! What happened to Loren Merritt?

gizzin
22nd February 2008, 07:36
come on guys where do you make this stuff up, clearly x264 is better. You just gotta know the right bells and whistles to enable.