Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 22nd February 2006, 15:02   #1  |  Link
kotrtim
Registered User
 
Join Date: Dec 2005
Posts: 145
Various settings of X264

I encoded a 496x272 short video clip wih different settings
This are the settings used as reference

--crf 20 --bframes 3 --b-pyramid --subme 1 --analyse none --me dia

the bitrate produced by this command line will be refered as "1" or 100%

Variables is the only setting that differs from the reference command line


http://img67.imageshack.us/img67/850/x264table7jz.png
*NOTE = analyse all includes 8x8dct
reference bitrate = 1304.26



The previous sample is a fast motion anime
This sample is an extract from exorcism of emily rose
slow motion, mostly static backgrund

The reference is "0"
Bitrate , negative means smaller filesize than reference
Speed, negative means slower (percentage)


Last edited by kotrtim; 24th February 2006 at 02:57.
kotrtim is offline   Reply With Quote
Old 22nd February 2006, 15:08   #2  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Wouldn't it be better to use two-pass ABR to keep the bitrate constant between runs with different settings? Then you can easily see the differences in PSNR. It would also be interesting to see results for different clips, not only one.

Nice work with the table though

Last edited by nm; 22nd February 2006 at 15:11.
nm is offline   Reply With Quote
Old 22nd February 2006, 16:12   #3  |  Link
Daodan
unrecognized user
 
Join Date: Oct 2005
Location: home of Stella Artois
Posts: 303
Indeed a nice test (to bad usually people use two-pass encoding). May I know what version of x264 did you use?
nm, I'll try to make some similar test with 2-pass and SSIM metrics, maybe this weekend.
__________________
zzz
Daodan is offline   Reply With Quote
Old 22nd February 2006, 19:12   #4  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,856
You should have chosen, as reference, the following command line :
Code:
--crf 20 --subme 5 --analysis all --me hex
There are several reasons for that, but mainly :
- you would have seen the difference with / without mixed ref ( mixed ref is used only if p8x8 is enabled )
- it's 'sane' defaults settings, while yours are the fastest available, so it's closer to all the other settings you could think of, in term of psnr & bitrate.
- you'd have a bigger difference between --analysis all and none ( and in general, you'd magnify the differences that are important/pertinent )

nm, Daodan : crf is quite close to what a two pass encoding gives. The only problem is the bitrate that varies with the quality, but on a short clip bitrate also varies in two passes.
__________________
Manao is offline   Reply With Quote
Old 22nd February 2006, 21:45   #5  |  Link
asdfsauce
VEIG Master
 
Join Date: Nov 2005
Location: US/CA
Posts: 73
Thanks for sharing your results. Should you ever happen to do this again, could you include a delta-time/FPS column as well?
asdfsauce is offline   Reply With Quote
Old 23rd February 2006, 04:11   #6  |  Link
kotrtim
Registered User
 
Join Date: Dec 2005
Posts: 145
Code:
--crf 20 --subme 5 --analysis all --me hex
I'll make this as reference and do another table....

delta-time/FPS, Megui will report the time starts and end, is it OK to just include time taken instead of FPS?
kotrtim is offline   Reply With Quote
Old 23rd February 2006, 04:46   #7  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
The best way would be to compare time taken divided by the reference time. So .9 means it's faster, 134.3 means you need your head checked to use those options. Including raw time just means everyone has to do that conversion in their heads. You can make a formula in excel to convert the timestamps into ratios like that pretty easily.

I'm considering writing a short script to encode and then compare via ssim. I've been kind of flying by the seat of my pants when it comes to some options, like mixed refs and bime, and it'db be really nice to know conclusively how well they work.

Can you also provide a snippet of your sample so we get a general idea of what these settings apply to here?
foxyshadis is offline   Reply With Quote
Old 23rd February 2006, 06:53   #8  |  Link
Audionut
Registered User
 
Join Date: Nov 2003
Posts: 1,281
I think it's an excellent test. The test clearly show's the affect on bitrate each setting has.

Why people think you need 2 passes to determine the affect a setting has on PSNR is beyond me.

You can clearly see that with subme 1 the PSNR value is 43.077
And that with subme 6 the PSNR value is 42.327
__________________
http://www.7-zip.org/
Audionut is offline   Reply With Quote
Old 23rd February 2006, 07:31   #9  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,259
People want the same size in a comparison so that they can take some conclusions for their 2pass encodes where they aim for a specific size.

that subme 1 delivers a higher PSNR at a higher size than subme 6 doesn't mean much, since when people aim for a specific size they normaly want to choose the subme that delivers better PSNR/SSIM. (subme 1 needs more than 25% more datarate to archive a 0.7 difference in PSNR,...)
Selur is offline   Reply With Quote
Old 23rd February 2006, 09:45   #10  |  Link
kotrtim
Registered User
 
Join Date: Dec 2005
Posts: 145
Quote:
You can clearly see that with subme 1 the PSNR value is 43.077
And that with subme 6 the PSNR value is 42.327
I just put the PSNR value for reference, the purpose of this test is not psnr, it is at given same qualty (CRF 20), assume the same, which settings could achieve at the lowest bitrate possible, this means subme 6 is so much better than subme 1... psnr is useless, I would rather believe the quality is crf 20 instead of psnr, if bitrate is the same, then you refer to psnr.

on 2 pass mode, subme 6 will definitely give you a lower overall rate factor

Besides, is it better to use subme 2,3,4 for pass 1?, it can give you a much more accurate / closer bitrate to subme 6 than using the turbo (subme 1)...and speed is almost as fast as subme 1

Last edited by kotrtim; 23rd February 2006 at 09:56.
kotrtim is offline   Reply With Quote
Old 23rd February 2006, 12:27   #11  |  Link
Manao
Registered User
 
Join Date: Jan 2002
Location: France
Posts: 2,856
crf is constant quality, if, and only if settings are the same. It never was intended to make a constant quality across a different set of settings.
__________________
Manao is offline   Reply With Quote
Old 23rd February 2006, 12:40   #12  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
That's what I was thinking. Now you have big changes both in bitrate and PSNR, which make it a bit hard to decipher how large the differences between settings actually are. SSIM would probably be a better metric, if you know how to use those tools.
nm is offline   Reply With Quote
Old 23rd February 2006, 12:55   #13  |  Link
kotrtim
Registered User
 
Join Date: Dec 2005
Posts: 145
Quote:
Originally Posted by nm
SSIM would probably be a better metric, if you know how to use those tools.
We have to wait for Daodan to do it, coz I don't know how, SSIM is avilable in avisynth?

anyway, it is really weird that subme 7 is faster than subme 6, is it a bug?
kotrtim is offline   Reply With Quote
Old 23rd February 2006, 13:03   #14  |  Link
Daodan
unrecognized user
 
Join Date: Oct 2005
Location: home of Stella Artois
Posts: 303
I think by monday i'll have some tests with both SSIM and PSNR but it's slow bussiness since I wanted to use HD sample (beacuse I mostly encode HD atm so I wanted to be also usefull to what I'm doing). kotrtim, I asked what version of x264 you used because from what I understood subme7 is a valid option only in Sharktooth's builds. (or am I wrong?)
__________________
zzz
Daodan is offline   Reply With Quote
Old 23rd February 2006, 16:26   #15  |  Link
dude051
dead
 
dude051's Avatar
 
Join Date: Jun 2003
Location: who knows
Posts: 47
Straight from the newest build of X264 off of http://www.x264.nl
Code:
  -m, --subme <integer>       Subpixel motion estimation and partition
                                  decision quality: 1=fast, 6=best. [5]
__________________
If we all believed in an "Eye For an Eye", we would all be Blind...
dude051 is offline   Reply With Quote
Old 23rd February 2006, 16:43   #16  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,558
Sharktooth's and ChronoCross's.

http://chronocrossdev.com/apps/x264/

That subme7=faster is sort of mindblowing, I always thought it was slower. That second table is very useful, I really like how it was laid out. Thanks!
foxyshadis is offline   Reply With Quote
Old 23rd February 2006, 16:58   #17  |  Link
DarkZell666
aka XaS
 
DarkZell666's Avatar
 
Join Date: Jun 2005
Location: France
Posts: 1,122
Dammit that's exactly what I was trying to do !

Only I'm just a tad more lazy =)

Just noticed one thing : if I want to use subme 5 I'm better off using subme 4 since it's joly faster and only loses 0.033dB compared to subme 5.

Noticed something else : trellis is just as useless as I thought

Congrats man, I hope more comparisons like this will appear in the near future (should have finished mine but never got round to ..)
__________________

Q9300 OC @ 3.2ghz / Asus P5E3 / 4GB PC10600 / Geforce 8600 GTS
DarkZell666 is offline   Reply With Quote
Old 23rd February 2006, 17:15   #18  |  Link
akupenguin
x264 developer
 
akupenguin's Avatar
 
Join Date: Sep 2004
Posts: 2,392
Quote:
Originally Posted by DarkZell666
Noticed something else : trellis is just as useless as I thought
What's useless about +0.28 dB?

Quote:
Originally Posted by kotrtim
anyway, it is really weird that subme 7 is faster than subme 6, is it a bug?
It means he didn't use Sharktooth's or Chrono's builds. Note that the bitrate and psnr from subme 7 were identical to 6. The speed difference was just random variation. (From which we can guess that the rest of the speeds are probably also only accurate to within 1%.)

Last edited by akupenguin; 23rd February 2006 at 17:19.
akupenguin is offline   Reply With Quote
Old 23rd February 2006, 17:34   #19  |  Link
DarkZell666
aka XaS
 
DarkZell666's Avatar
 
Join Date: Jun 2005
Location: France
Posts: 1,122
Quote:
Quote:
Originally Posted by DarkZell666
Noticed something else : trellis is just as useless as I thought

What's useless about +0.28 dB?
Sorry my bad, just saw 1.002 in the bitrate savings ^^'
That'll teach me to think twice before saying something
__________________

Q9300 OC @ 3.2ghz / Asus P5E3 / 4GB PC10600 / Geforce 8600 GTS
DarkZell666 is offline   Reply With Quote
Old 23rd February 2006, 18:05   #20  |  Link
kotrtim
Registered User
 
Join Date: Dec 2005
Posts: 145
Quote:
Sorry my bad, just saw 1.002 in the bitrate savings ^^'
That'll teach me to think twice before saying something
an addition of 0.2% bitrate isn't so important, and in 2 pass mode trellis 1 would surely be better than none, it's just that trellis 2 is not significantly better than trellis 1.... so do always enable trellis, if quality is priority, the table 2 is so misleading.......this time, i'll do a 2-pass table.
kotrtim is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:51.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.