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 2nd July 2009, 04:56   #1  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,690
x264 presets, profiles, and tuning system

Presets will be used as follows:

--preset name

and apply before all other options. In other words, they override the x264 defaults, which, with the default changes, will be:

--subme 7 --bframes 3 --weightb --8x8dct --ref 3 --mixed-refs --trellis 1 --crf 23 --threads auto

As such, all options that you set will act on top of the preset you choose, regardless of the option order.

ultrafast:

--ref 1 --scenecut 0 --nf --no-cabac --bframes 0 --partitions none --no-8x8dct --me dia --subme 0 --aq-mode 0

veryfast:

--partitions i8x8,i4x4 --subme 1 --me dia --ref 1 --trellis 0

fast:

--mixed-refs 0 --ref 2 --subme 5

medium:

<defaults>

slow:

--me umh --subme 8 --ref 5 --b-adapt 2 --direct auto

slower:

--me umh --subme 9 --ref 8 --b-adapt 2 --direct auto --partitions all --trellis 2

placebo:

--me tesa --subme 9 --merange 24 --ref 16 --b-adapt 2 --direct auto --partitions all --no-fast-pskip --trellis 2 --bframes 16

For all encodes, regardless of preset or not, using --pass 1 will automatically trigger "turbo" settings, which are as follows and override all commandline options:

--trellis 0 --no-8x8dct --partitions none --me dia --ref 1 --subme MIN(2, previous subme)

This can be disabled using --slow-firstpass.

For all encodes, if you don't set your own --ref option and instead use the default or a preset, x264 will automatically lower --ref if the --level you set conflicts with it. If you set --ref explicitly, it will not override what you set.

Profiles will be used as follows:

--profile name

The options will be baseline, main, and high, which do what you think they do. Note that these override all other options no matter what, with two exceptions.. Because interlaced and lossless coding are options with very explicit meanings, the encoder will terminate with an error if you attempt to use them with an incompatible profile.

Tunings will be used as follows:

--tune name

The options will be "film" and "animation", and will tweak AQ strength, psy-rd/trellis strength, deblock, refs, and so forth:

film:

--deblock -1:-1 --psy-rd 1.0:0.15

animation:

--ref (previousref==1?1:MIN(previousref*2,16)) --deblock 1:1 --psy-rd 0.4:0 --aq-strength 0.6 --bframes 5

All of this is subject to change before final release, and suggestions are welcome.

If you don't use any of the new presets, the only changes for you will be the new defaults, and the automatic fast first pass.

Last edited by Dark Shikari; 2nd July 2009 at 06:51.
Dark Shikari is offline   Reply With Quote
Old 2nd July 2009, 06:16   #2  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,182
That's cool...

May I suggest to add several devices presets (basically for PMPs & SAPs) ?
Kurtnoise is offline   Reply With Quote
Old 2nd July 2009, 06:18   #3  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,690
Quote:
Originally Posted by Kurtnoise View Post
That's cool...

May I suggest to add several devices presets (basically for PMPs & SAPs) ?
Maybe later.
Dark Shikari is offline   Reply With Quote
Old 2nd July 2009, 06:29   #4  |  Link
juGGaKNot
Registered User
 
juGGaKNot's Avatar
 
Join Date: Feb 2008
Posts: 733
Quote:
Originally Posted by Dark Shikari View Post
Presets will be used as follows:

--me umh --subme 9 --ref 8 --b-adapt 2 --direct auto --partitions all --trellis 2

placebo:

--me tesa --subme 9 --merange 24 --ref 16 --b-adapt 2 --direct auto --partitions all --no-fast-pskip --trellis 2 --bframes 16
Slower should have merange 24, placebo 32.

Quote:
Profiles will be used as follows:

--tune name

The options will be "film" and "animation", and will tweak AQ strength, psy-rd/trellis strength, deblock, refs, and so forth:

film:

--deblock -1:-1 --psy-rd 1.0:0.15

animation:

--ref (previousref==1?1:MIN(previousref*2,16)) --deblock 1:1 --psy-rd 0.4:0 --aq-strength 0.6 --bframes 5
The film tune looks actually better to me for animation ( cs 1.6 )

I will not be able to tweek psy-rd and vaq/autovaq on my own ?

These new option seem k for gui but not for cmd users.

Last edited by juGGaKNot; 2nd July 2009 at 06:36.
juGGaKNot is offline   Reply With Quote
Old 2nd July 2009, 06:38   #5  |  Link
Kurtnoise
Swallowed in the Sea
 
Kurtnoise's Avatar
 
Join Date: Oct 2002
Location: Aix-en-Provence, France
Posts: 5,182
Quote:
Originally Posted by juGGaKNot View Post
Slower should have merange 24, placebo 32.


Quote:
Originally Posted by juGGaKNot View Post
These new option seem k for gui but not for cmd users.
cmd users use more or less all switches, not presets. Period...
Kurtnoise is offline   Reply With Quote
Old 2nd July 2009, 06:45   #6  |  Link
juGGaKNot
Registered User
 
juGGaKNot's Avatar
 
Join Date: Feb 2008
Posts: 733
Quote:
Originally Posted by Kurtnoise View Post
cmd users use more or less all switches, not presets. Period...
Ahh i was thinking that all cvars will be replaced, than good, so lets go.
juGGaKNot is offline   Reply With Quote
Old 2nd July 2009, 09:08   #7  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,266
Thanks for the update.
Little question regarding, profile:
Quote:
Note that these override all other options no matter what, ...
with what ?
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 2nd July 2009, 09:14   #8  |  Link
juGGaKNot
Registered User
 
juGGaKNot's Avatar
 
Join Date: Feb 2008
Posts: 733
Quote:
Originally Posted by Selur View Post
Thanks for the update.
Little question regarding, profile:

with what ?
"x264.exe --profile placebo --tune film" replaces any following cvar with "--me tesa --subme 9 --merange 24 --ref 16 --b-adapt 2 --direct auto --partitions all --no-fast-pskip --trellis 2 --bframes 16 --deblock -1:-1 --psy-rd 1.0:0.15" i guess.

Last edited by juGGaKNot; 2nd July 2009 at 09:21.
juGGaKNot is offline   Reply With Quote
Old 2nd July 2009, 09:27   #9  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,690
Quote:
Originally Posted by Selur View Post
Thanks for the update.
Little question regarding, profile:

with what ?
profile baseline will disable CABAC, B-frames, CQMs, 8x8dct no matter what. It will error out on interlaced video.

profile main will disable 8x8dct and CQMs no matter what.

profile high will do nothing as that's default.

All will error out on lossless.
Dark Shikari is offline   Reply With Quote
Old 2nd July 2009, 10:39   #10  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,800
Quote:
Originally Posted by Dark Shikari View Post
For all encodes, regardless of preset or not, using --pass 1 will automatically trigger "turbo" settings, which are as follows and override all commandline options:

--trellis 0 --no-8x8dct --partitions none --me dia --ref 1 --subme MIN(2, previous subme)
Is this done in the CLI interface or will it be enforced in the library?

I hope for the latter...
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.


LoRd_MuldeR is offline   Reply With Quote
Old 2nd July 2009, 10:42   #11  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,690
Quote:
Originally Posted by LoRd_MuldeR View Post
Is this done in the CLI interface or will it be enforced in the library?

I hope for the latter...
Former.
Dark Shikari is offline   Reply With Quote
Old 2nd July 2009, 10:52   #12  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,800
Quote:
Originally Posted by Dark Shikari View Post
Former.
d'oh!
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.


LoRd_MuldeR is offline   Reply With Quote
Old 2nd July 2009, 11:01   #13  |  Link
roozhou
Registered User
 
Join Date: Apr 2008
Posts: 1,181
Quote:
animation:

--ref (previousref==1?1:MIN(previousref*2,16)) --deblock 1:1 --psy-rd 0.4:0 --aq-strength 0.6 --bframes 5
IMHO default 0:0 should be OK.
roozhou is offline   Reply With Quote
Old 2nd July 2009, 14:11   #14  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,266
Why does '--presets' will only change the defaults?
Will '--tune' also only change the defaults?
Wouldn't it be better to replace all the settings which are defined through the preset with the preset?

Cu Selur

Ps.: Sorry, but personally I don't like the idea to have 'presets&tune' in the cl interface, but I think that is mainly because the cl interface for me is something that's far more connected to the library itself, for me they belong into a gui.
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 2nd July 2009, 14:17   #15  |  Link
Audionut
Registered User
 
Join Date: Nov 2003
Posts: 1,254
Quote:
Originally Posted by Selur View Post
for me they belong into a gui.
I agree. However, I tend to see a lot of people thinking that megui is x264.

And so these same people complain to the x264 devs when megui does something stupid in a profile.

I see this as the x264 devs trying to minimize time wasted.
__________________
http://www.7-zip.org/
Audionut is offline   Reply With Quote
Old 2nd July 2009, 14:20   #16  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,800
Quote:
Originally Posted by Selur View Post
Wouldn't it be better to replace all the settings which are defined through the preset with the preset?
I don't think so. The way it is planned you can easily pick a preset as your basic configuration and still adjust a few settings here and there.

If the preset would overwrite your custom options, you couldn't make use of presets anymore, as soon as you need to adjust one single parameter!

Also it would be very confusing to have parameters in the command-line that are valid, but will be ignored by x264...
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.


LoRd_MuldeR is offline   Reply With Quote
Old 2nd July 2009, 14:38   #17  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,567
Quote:
Originally Posted by roozhou View Post
Quote:
Originally Posted by Dark Shikari View Post
--ref (previousref==1?1:MIN(previousref*2,16)) --deblock 1:1 --psy-rd 0.4:0 --aq-strength 0.6 --bframes 5
IMHO default 0:0 should be OK.
Deblock 1:1 usually better for anime than 0:0 but IMHO psy-rd should be 0.0:0 and no AQ until AutoVAQ patch will be added...
Keiyakusha is offline   Reply With Quote
Old 2nd July 2009, 14:39   #18  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,266
Quote:
Also it would be very confusing to have parameters in the command-line that are valid, but will be ignored by x264...
Like when you would use '--profile' ?
Also when the options just override the defaults it's always a pain to look up the presets to know which of my options would not be changed.
I would prefer them to override not just the defaults and throw an error if some one added a parameter which tries to change them. This would also notify one if one presets changes in a manner that it covers a new variable.

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Old 2nd July 2009, 14:44   #19  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,800
Quote:
Originally Posted by Selur View Post
Also when the options just override the defaults it's always a pain to look up the presets to know which of my options would not be changed.
The opposite is the case: With your suggestion, we would have a mixture of command-line parameter that are effective and parameters that will be ignored (because of the preset).

With the method that is planned, all command-line parameters that a specified explicitly will work as expected. Only parameters that are left out will default to the selected preset/profile.

Why should it be possible to specify valid parameters that will be ignored? Why should it be forbidden to select a preset and adjust single parameters ???
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 2nd July 2009 at 14:53.
LoRd_MuldeR is offline   Reply With Quote
Old 2nd July 2009, 14:54   #20  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 5,266
Did you miss:
"I would prefer them to override not just the defaults and throw an error if some one added a parameter which tries to change them. This would also notify one if one presets changes in a manner that it covers a new variable."
or did you ignore it on purpose?

Quote:
Only parameters that are left out will default to the selected preset/profile.
did you miss:
Quote:
Profiles will be used as follows:.... Note that these override all other options no matter what,...
Quote:
Why should it be forbidden to select a preset and adjust single parameters ???
I my option:
- I think it is a bad idea to have 'changing' defaults.
- I think such syntactic sugar should not be included in the cl interface

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote
Reply

Tags
development, interface, x264

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 09:52.


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