View Full Version : x264 defaults changing
Rumbah
5th July 2009, 14:28
"--direct auto" works fine with crf, too, as often stated by Dark Shikari.
Sharc
5th July 2009, 16:14
So which one should/will become the default then?
Deinorius
5th July 2009, 17:19
--direct spatial is already default, but why not change to auto?
Dark Shikari
5th July 2009, 18:40
--direct spatial is already default, but why not change to auto?The quality per speed benefit is probably too low to make it a default option, especially with CRF as default.
Deinorius
5th July 2009, 19:02
OK, that's logical. But I hope you disable PSNR and SSIM by default. Most users really don't need it.
LoRd_MuldeR
5th July 2009, 21:34
OK, that's logical. But I hope you disable PSNR and SSIM by default. Most users really don't need it.
And more important: People shouldn't put too much attention on metrics! Especially when Psy optimizations are on by default...
Dark Shikari
5th July 2009, 21:43
And more important: People shouldn't put too much attention on metrics! Especially when Psy optimizations are on by default...Yes, as a result of this and the above reasons, psnr and ssim will be off by default.
10L23r
5th July 2009, 22:10
would it be possible to use psy as a metric?
Dark Shikari
5th July 2009, 22:18
would it be possible to use psy as a metric?No, because it is QP-sensitive (it's more of a heuristic than a metric).
JohannesL
6th July 2009, 04:51
I think --crf 21 should be default, since 23 gives rather crappy quality in many cases.
10L23r
6th July 2009, 05:18
crf 22 is good 4 me.
Manao
6th July 2009, 07:28
I think --crf 21 should be default, since 23 gives rather crappy quality in many cases. crf 22 is good 4 me. And that's why there shouldn't be any default rate control mode settings. It's the setting that will vary among every individual.
Dark Shikari
6th July 2009, 07:39
And that's why there shouldn't be any default rate control mode settings. It's the setting that will vary among every individual.It's also the most asked useless question: "what CRF should I use"? "What bitrate should I use"?
The proper answer is to set a default and let people adjust from there, so it gives them an idea of what to start with. If you don't set a default, people end up doing the exact same thing--experimenting--except they don't even have a good starting point.
Also, I think in general Doom9 people are way too picky about video as compared to your average user, so we should err on the side of slightly lower quality and lower filesize as opposed to generating enormous files.
Atak_Snajpera
6th July 2009, 13:46
@Dark Shikari
You proposed 23 value but some people want 21. Why not choose something between? I was never disappointed with CRF@22.
Deinorius
6th July 2009, 22:28
What about --progress and --vbv settings. At least --progress can get default too.
Dark Shikari
6th July 2009, 22:33
What about --progress and --vbv settings. At least --progress can get default too.Good point, it should. I'll do that.
LoRd_MuldeR
6th July 2009, 22:34
What about --progress and --vbv settings. At least --progress can get default too.
VBV potentially hurts quality. And really is only needed for certain hardware players. So it should not be default, I think.
Different VBV-presest could be added, but I fear there are far too many devices with pretty different VBV requirements...
Deinorius
6th July 2009, 22:56
VBV potentially hurts quality. And really is only needed for certain hardware players. So it should not be default, I think. OK, that's true. But presets should be fine. You only need DXVA SD/HD or maybe Xbox 360/PS3. The other hardware devices need more adjusting of the settings. But I don't know how wide the presets will be set.
Dark Shikari
6th July 2009, 22:59
Device presets would go as yet another option, say --target or --device, in a later patch.
LoRd_MuldeR
6th July 2009, 23:01
But presets should be fine. You only need DXVA SD/HD or maybe Xbox 360/PS3. The other hardware devices need more adjusting of the settings. But I don't know how wide the presets will be set.
Hmm, I think this would be too specific. There are far too many devices out there. And new devices appear/disappear every month. Who wants to maintain all of them?
IMHO the built-in presets should be more general, like "Fast" vs. "Slow" or like "Film" vs. "Anime". But not specific to one single playback device...
Deinorius
6th July 2009, 23:04
I see.
Audionut
6th July 2009, 23:16
And new devices appear/disappear every month. Who wants to maintain all of them?
But keeping some profiles for the popular ones makes sense.
LoRd_MuldeR
6th July 2009, 23:22
But keeping some profiles for the popular ones makes sense.
Who decides which devices are popular and which are not? I'm sure people will complain when their favorite device is missing ;)
And it may lead people to the wrong idea that x264 supports certain devices, but others not. Don't you think?
Atak_Snajpera
7th July 2009, 00:08
I agree with Lord_Mulder. fast , slow etc preset is enough! Is that hard to use any gui for that?
Selur
7th July 2009, 08:28
agree, more specific profiles like hardware&co shouldn't be included in the CLI.
Yoshiyuki Blade
7th July 2009, 08:35
I'd say anything between CRF 20-22 would be a good default. 23 a tad too high, but we are indeed rather picky, as videophiles. 23 is also not as bad @1080 as it would be @480, if I'm not mistaken. So it's probably a decent borderline between bad and good.
Dark Shikari
7th July 2009, 09:24
And it's in (http://git.videolan.org/?p=x264.git;a=commit;h=af2a4ecd7bcefc97c8aa83913c9a2980206f9cd0). Have fun everyone.
Yoshiyuki Blade
7th July 2009, 09:43
Great! I like the organized design of this. Instead of having a ton of individual profiles in 1 long list, you have 2 separate lists that cover everything in an intuitive fashion.
popper
8th July 2009, 01:51
And it's in (http://git.videolan.org/?p=x264.git;a=commit;h=af2a4ecd7bcefc97c8aa83913c9a2980206f9cd0). Have fun everyone.
its a shame, it appears VLC 1.0 released today doesnt have this update and their web sites down due to the demand.
ohh well....
http://forum.videolan.org/
"The forum and wiki have been disabled due to high load during the VLC 1.0.0 release. It will be back once things settle down.
More info about the release on <a href="http://www.videolan.org>VideoLAN's website.
"
Mug Funky
8th July 2009, 03:01
i've only read the top and tail of this thread as i'm at work, but here's a couple of suggestions that may or may not have been covered:
- most h.264 playback is happening on apple's atrociously bad quicktime. i would never suggest pulling on the skirt to apple's juggernaut (i love analogies that don't make sense), but perhaps a --quicktime preset could be handy that just changes the couple of settings that quicktime has problems with.
- as you probably know already, having a default bitrate/quality setting is tantamount to making a statement about what quality people should expect to see. i can't help thinking back to when 128kbps was the default for mp3 interchange, and the shitty sound people spent years putting up with. crf is a really good idea as a default, but perhaps before a LAME style --preset-standard is settled upon, there should be some kind of testing/polling process to find a nice quality-based value that not even a mac based person could get wrong. i tend to encode at crf 18 FWIW, but that tends to come in around half of DVD bitrates for standard def stuff (most of what i encode is straight from masters, not from DVDs. you'd be amazed the difference that makes to bitrates, especially with film content)
sorry, that was a bit tl;dr. basically what i'm thinking is should the default please the quality nuts, or should it please the youtube generation? and if so what crf would those imply?
paradoxical
22nd May 2013, 21:00
First of all, you realize you're 4 years late to the party responding to Dark Shikari's post, right?
Why only --crf 23?
Do you really consider CRF 23 to give "very good" results?
Clearly he did. CRF 16 or 18 would likely increase file sizes immensely for most content. The point of 23 was a trade off between quality and ridiculously large file sizes.
Why only --ref 3?
Common framesizes, like 1920x1080 or 1280x720 for example, allow for 4 reference frames in Level 4.0 / 4.1 / 4.2 for example, correct?
So why not increase the default settings from --ref 3 to --ref 4?
See this response that was made at the time for the same question:
Maybe 4 or even possibly 5?
4 would break level 4.1 for 1080p streams. So either the default ref number depends on resolution (and then the users will never understand how it is set), or it stay at 3.
poisondeathray
23rd May 2013, 05:46
So, --ref 16 gets reduced to --ref 4 by --level 4.0 or 4.1 or 4.2 when framsize is 1920x1080p.
did something change? are levels enforced now ?
or did you use --bluray-compat ?
I just tested r2334 and nothing is reduced
detmek
23rd May 2013, 10:22
Level parametar only reduces reference frames if those are not manualy specified, AFAIK.
sneaker_ger
23rd May 2013, 14:46
Correct. --level reduces the ref frames to the maximum of the level (which is indeed 4 for level 4.1 1080p) unless it is overridden by --ref. --bluray-compat on the other hand limits the refs to 6 without any possibility to override it.
Why only --ref 3?
Common framesizes, like 1920x1080 or 1280x720 for example, allow for 4 reference frames in Level 4.0 / 4.1 / 4.2 for example, correct?
So why not increase the default settings from --ref 3 to --ref 4?
The defaults are not there to simply max out refs/bframes or whatever and they are not really focused on compatibility in the first place (no level, vbv or bluray-compat stuff used by default):
The settings in presets were picked to be roughly optimal positions on the speed-compession curve based on testing.
Also, the devs don't seem to be keen on changing them every other month.
poisondeathray
23rd May 2013, 14:53
Correct. --level reduces the ref frames to the maximum of the level (which is indeed 4 for level 4.1 1080p) unless it is overridden by --ref. --bluray-compat on the other hand limits the refs to 6 without any possibility to override it.
Thanks for the clarification, I tested with --ref so that must have overriden the --level limits
--level never used to limit anything (nothing was enforced), when was that introduced ? I can't find it in the changelog
paradoxical
23rd May 2013, 14:59
The defaults having been changed means they can not be changed again?
No, it doesn't meant they can't be changed again, and I never claimed any such silly thing, but the fact that it's been 4 years and they haven't changed again is a good sign that such a situation is highly unlikely at any point in the foreseeable future. My point is you were basically arguing over a decision that was made and changed in the code 4 years ago as if your input was going to somehow make any difference.
But this seems to be incorrect?
As I said, I was merely quoting what was being said at the time. But as was said by someone else and quoting Dark Shikari, the point of the defaults were what he considered a good balance between size/quality and speed. Ref 3 is a good number because it guarantees compatibility with all levels for all resolutions even if it's not set at 4 and it's slightly faster.
sneaker_ger
23rd May 2013, 15:07
--level never used to limit anything (nothing was enforced), when was that introduced ? I can't find it in the changelog
I don't know when it happened, but it must have been many years ago. Since it still doesn't apply vbv and doesn't enforce the refs rigorously, people often still say "it's only a flag", though that is not true.
paradoxical
23rd May 2013, 15:12
I don't know when it happened, but it must have been many years ago. Since it still doesn't apply vbv and doesn't enforce the refs rigorously, people often still say "it's only a flag", though that is not true.
For reference frames at least, it was added in with the very same check-in that included the new defaults and the preset system.
https://github.com/DarkShikari/x264-devel/commit/af2a4ecd7bcefc97c8aa83913c9a2980206f9cd0
+
+ /* Automatically reduce reference frame count to match the user's target level
+ * if the user didn't explicitly set a reference frame count. */
+ if( !b_user_ref )
+ {
+ int mbs = (((param->i_width)+15)>>4) * (((param->i_height)+15)>>4);
+ int i;
+ for( i = 0; x264_levels[i].level_idc != 0; i++ )
+ if( param->i_level_idc == x264_levels[i].level_idc )
+ {
+ while( mbs * 384 * param->i_frame_reference > x264_levels[i].dpb
+ && param->i_frame_reference > 1 )
+ {
+ param->i_frame_reference--;
+ }
+ break;
+ }
+ }
+
+
So, 4 years ago.
poisondeathray
23rd May 2013, 15:16
Thanks for the clarification
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.