View Full Version : x264 presets, profiles, and tuning system
quantum5uicid3
11th December 2009, 16:54
ive been searching and going through the thread but it's still unclear to me. if you "explicitly" set individual options, "--preset" and "--tune" will not override these choices, but "--profile" and "--level" will?
J_Darnley
11th December 2009, 17:40
Yes. Profile will override everything you set. Level will only lower the reference frames if you don't specify --ref.
Options are evaluated in this order:
preset -> tune -> user set options -> fast first pass -> profile -> level
Biggiesized
14th December 2009, 06:50
Is '--tune animation' geared more towards anime or CGI?
Dark Shikari
14th December 2009, 07:10
Is '--tune animation' geared more towards anime or CGI?anime. CGI is film.
laserfan
15th December 2009, 19:50
Is '--tune animation' geared more towards anime or CGI?
anime. CGI is film.
Someone please help me with this--I'd have thought "--tune animation" was appropriate for any 2-D animation (cartoon) whether film-based or not.
And can not CGI be output as video & not film? :confused:
neuron2
15th December 2009, 19:58
I think CGI here refers to 3D shaded stuff, which is quite different from flat 2D animation.
liquidator87
15th December 2009, 20:47
is --tune film meant to be used in "normal" movie encoding?
Dark Shikari
15th December 2009, 20:51
is --tune film meant to be used in "normal" movie encoding?Yes. It's not default because it may hurt animated content, (2D) screen captures, etc.
Xavius
4th January 2010, 18:01
--tune grain
is for sources with a lot of grain, when you want to "retain" grain?
in other words:
--tune film is for real life content (and CGI/3D)
--tune animation is for 2d animation
--tune grain is for... ???
Dark Shikari
4th January 2010, 18:24
--tune grain
is for sources with a lot of grain, when you want to "retain" grain?
in other words:
--tune film is for real life content (and CGI/3D)
--tune animation is for 2d animation
--tune grain is for... ???Tune grain is for high bitrates on sources with a lot of grain where uniform grain retention is more important than anything else.
laserfan
4th January 2010, 19:26
--tune grain
is for sources with a lot of grain, when you want to "retain" grain?
in other words:
--tune film is for real life content (and CGI/3D)
--tune animation is for 2d animation
--tune grain is for... ???
Tune grain is for high bitrates on sources with a lot of grain where uniform grain retention is more important than anything else.
I wonder if --tune grain would work well with the artificially high grain effect used in flashbacks/flash-forwards in the TV (FX) series Damages.
Maybe I will try it...
Dogway
4th January 2010, 21:18
I have just made some comparison tests on that because I was using a strong debander on my avs. So firstly I thought it to be as Grainy, I then compared it to Film, and it was much better this way. My conclusion is just use Grain on overall grainy sources (well just like Dark Shikari stated), like say the natural grain of the film.
Also I wanted to add here my suggestion for a CG toon tune. I didnt find any of the tunings nice by default, this far this is the best I have got:
cabac=1 / ref=16 / deblock=1:-2:-1 / analyse=0x3:0x133 / me=tesa / subme=9 / psy=1 / psy_rd=1.0:0.2 / mixed_ref=1 / me_range=32 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-3 / threads=2 / sliced_threads=0 / nr=0 / decimate=0 / mbaff=0 / constrained_intra=0 / bframes=3 / b_pyramid=0 / b_adapt=2 / b_bias=0 / direct=3 / wpredb=1 / wpredp=2 / keyint=250 / keyint_min=25 / scenecut=30 / rc_lookahead=60 / rc=2pass / mbtree=1 / bitrate=4000 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:0.60
The source had local grain (fromgradfun), and large flat areas (not so flat now because debander), with some motionless and heavy motion parts. I decided to go all settings maxed out and some custom based on tune Film. I just tweaked AQ, no-dct, ref. frames, and deblocking strength. If you find something wrong, just let me know. Im just new, reading, learning, testing.
I also have a question, what aq=2 does? is it recommended? does it respect the strength value?
Chainmax
16th January 2010, 17:46
I really like the way presets are laid out now, even with the amount of them it's easy to navigate through the list and select what you want. However, I do miss the PC-only profiles. I assume that the unrestricted DXVA ones would be the replacement for the live action ones (would that be correct?), but what about the AE-something ones? Could those be included back?
sneaker_ger
16th January 2010, 18:13
I really like the way presets are laid out now, even with the amount of them it's easy to navigate through the list and select what you want. However, I do miss the PC-only profiles. I assume that the unrestricted DXVA ones would be the replacement for the live action ones (would that be correct?), but what about the AE-something ones? Could those be included back?
This thread is about the presets of x264, you're talking about profiles of some GUI. You should pose your question in the appropriate thread.
fleon
12th March 2010, 01:22
Hi I own some videos of dj concerts and as you know they are mostly dark with lots of lights turning on an off an such, so should I still use tune film to encode them? or should I use another tune option?
flebber
12th March 2010, 01:47
Hi I own some videos of dj concerts and as you know they are mostly dark with lots of lights turning on an off an such, so should I still use tune film to encode them? or should I use another tune option?
How did your test encode with film option go? aside maybe this is a good avisynth filter http://forum.doom9.org/showthread.php?t=142706
fleon
12th March 2010, 02:09
Well, I havent tested it with tune film but I will do it right now, it is just that I thought there was a tune option for that already ....
An also it seems pretty hard for to use lsfmod, i dont know how to use it
flebber
12th March 2010, 02:41
Well, I havent tested it with tune film but I will do it right now, it is just that I thought there was a tune option for that already ....
An also it seems pretty hard for to use lsfmod, i dont know how to use it
Just use a small section of your concert that has different aspects dark light and test on that. Everyone perceives results differently. In its basic form LSFmode can be used a such.
LSFmod(defaults="slow")
bin_ch
14th March 2010, 01:40
Hi,
I noticed that preset slow and slower use 3 bframes, while veryslow uses 8.
Now that b-pramid has been made default, which tend to increase the possibility of more consecutive bframes, I am thinking would it be better to bump bframes in preset slower to, say, 5?
Great Dragon
27th April 2010, 15:40
Maybe it's bug, maybe not but I have this: then I use --tune presents it blocks deblock strength.
For example with these settings '--tune film --deblock=1:-3:-3' resulting setting of encoded video will be 'deblock=1:-1:-3'
nurbs
27th April 2010, 15:44
Try --deblock -3:-3
Audionut
19th June 2010, 12:07
x264-64 --preset slower --tune film --crf 20 --aq-mode 2 --keyint 240 --open-gop --fade-compensa
te 0.7 --ipratio 1.1 -o f:\saw6.mkv f:\saw6.avs
avs [info]: 1280x720p 0:0 @ 24000/1001 fps (cfr)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: profile High, level 4.0
x264 [info]: frame I:2154 Avg QP:19.87 size: 49871
x264 [info]: frame P:39318 Avg QP:20.85 size: 20427
x264 [info]: frame B:90328 Avg QP:22.64 size: 7781
x264 [info]: consecutive B-frames: 2.9% 6.8% 18.3% 72.1%
x264 [info]: mb I I16..4: 24.4% 68.5% 7.1%
x264 [info]: mb P I16..4: 4.2% 10.6% 0.7% P16..4: 47.4% 11.0% 1.9% 0.1% 0.1% skip:24.1%
x264 [info]: mb B I16..4: 0.2% 0.7% 0.1% B16..8: 39.8% 5.2% 1.0% direct: 4.3% skip:48.8% L
0:43.1% L1:50.9% BI: 6.0%
x264 [info]: 8x8 transform intra:69.0% inter:81.3%
x264 [info]: direct mvs spatial:99.2% temporal:0.8%
x264 [info]: coded y,uvDC,uvAC intra: 60.0% 72.0% 36.3% inter: 16.0% 22.8% 1.6%
x264 [info]: i16 v,h,dc,p: 36% 19% 8% 37%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 11% 7% 9% 13% 13% 12% 11% 10%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 11% 9% 3% 10% 16% 15% 14% 11% 11%
x264 [info]: i8c dc,h,v,p: 34% 27% 21% 18%
x264 [info]: Weighted P-Frames: Y:3.4%
x264 [info]: ref P L0: 49.8% 8.8% 18.3% 6.7% 5.5% 4.2% 3.7% 2.4% 0.6% 0.0%
x264 [info]: ref B L0: 80.3% 9.8% 4.6% 2.1% 1.6% 1.0% 0.5%
x264 [info]: ref B L1: 94.8% 5.2%
x264 [info]: kb/s:2348.01
encoded 131800 frames, 8.92 fps, 2348.01 kb/s
What are the thoughts on increasing the bframes in preset slow and slower, rather that having a jump from 3 to 8 in preset verslow?
creamyhorror
20th June 2010, 07:04
What are the thoughts on increasing the bframes in preset slow and slower, rather that having a jump from 3 to 8 in preset verslow?
I noticed that x264 may be using a lot more b-frames in r1649. Very high percentages on sequences of 5 b-frames on typical live-action:
x264 [info]: consecutive B-frames: 0.9% 1.6% 7.6% 10.5% 8.2% 71.1%
x264 [info]: consecutive B-frames: 0.6% 1.6% 6.5% 18.5% 11.6% 61.2%
Am I interpreting this wrongly, is this just a fluke, or has something changed in the frame decision algorithm?
Dark Shikari
20th June 2010, 07:36
I noticed that x264 may be using a lot more b-frames in r1649... as compared to what?
r1643? r1600? r1432? r1021?
Rumbah
20th June 2010, 10:26
I think compared to before weight-p (or mbtree or b-pyramid, I cannot remember ;) ). I noticed that, too, that I now get 5 b-frames used very often for live action compared to 3 before the change (with bframe mode 2).
Dark Shikari
20th June 2010, 10:59
I think compared to before weight-p (or mbtree or b-pyramid, I cannot remember ;) ). I noticed that, too, that I now get 5 b-frames used very often for live action compared to 3 before the change (with bframe mode 2).It was the modification of b-adapt to consider the effects of b-pyramid that increased the use of large numbers of B-frames.
creamyhorror
20th June 2010, 12:09
... as compared to what?
r1643? r1600? r1432? r1021?
Compared to a few revisions I've used over the last half year, I guess? I normally see higher percentages for the lower b-frame numbers. It could be just a simple fluke, so I'll keep observing.
It was the modification of b-adapt to consider the effects of b-pyramid that increased the use of large numbers of B-frames.
Does this imply that the default max b-frames of 3 might be a little low? I use about 5 or 6 myself along with the slower preset, but I'd like to know if the efficiency gains aren't worth the time.
Dark Shikari
20th June 2010, 12:15
Compared to a few revisions I've used over the last half year, I guess? I normally see higher percentages for the lower b-frame numbers. It could be just a simple fluke, so I'll keep observing.
Does this imply that the default max b-frames of 3 might be a little low? I use about 5 or 6 myself along with the slower preset, but I'd like to know if the efficiency gains aren't worth the time.It might be worth looking into at some point.
drob
21st June 2010, 18:33
For aquarium and fireplace BD encodes, where picture is mostly low motion (static background, fishes scroll slowly, static background flames moving slowly) , should i use --tune film?
Dark Shikari
21st June 2010, 19:32
For aquarium and fireplace BD encodes, where picture is mostly low motion (static background, fishes scroll slowly, static background flames moving slowly) , should i use --tune film?film should generally be used for anything that is normal, live-action video content. i.e. anything not artificial.
Blue_MiSfit
21st June 2010, 21:29
Indeed. For this kind of content, allowing the usage of more b-frames is probably a very good idea also.
Derek
gfxsky
21st December 2010, 05:58
This is the command line i'm using for a nokia 5800.
--profile baseline --pass 2 -B 400 --level 1.3 --ref 1 --aq-mode 2 --no-mixed-refs --trellis 2 --rc-lookahead 240 --scenecut 40 --partitions all --me umh --subme 10 --keyint 240 --min-keyint 24 --psy-rd 0.0:0.0 --vbv-bufsize 1000 --vbv-maxrate 768
how to use it, sir?
lych_necross
21st December 2010, 12:50
how to use it, sir?
Uhh.... c:\folder\x264.exe --profile baseline --pass 2 -B 400 --level 1.3 --ref 1 --aq-mode 2 --no-mixed-refs --trellis 2 --rc-lookahead 240 --scenecut 40 --partitions all --me umh --subme 10 --keyint 240 --min-keyint 24 --psy-rd 0.0:0.0 --vbv-bufsize 1000 --vbv-maxrate 768 input output
:confused:
:search:
Rash
4th January 2011, 14:19
Just a small question. Isn't the first post on this thread outdated?
Chikuzen
4th January 2011, 14:40
yes, it's outdated.
there are a lot of addions and changes that have been done.
Rash
4th January 2011, 19:46
Well, the truth is, I can't get a AVC High Profile out of x264. I have tried to force it using preset, not using preset but it doesn't work. Here are my lines and x264 outputs.
x264 --profile high --bitrate 264 --tune film --pass 1 -o [ommited] [ommited]
avs [info]: 480x272p 0:0 @ 5000000/208333 fps (cfr)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: profile Main, level 2.1
x264 --profile high --bitrate 264 --preset veryslow --tune film --pass 1 -o [ommited] [ommited]
avs [info]: 480x272p 0:0 @ 5000000/208333 fps (cfr)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: profile Main, level 2.1
x264 --profile high --bitrate 264 --preset veryslow --tune film --level 3.1 --pass 1 -o [ommited] [ommited]
avs [info]: 480x272p 0:0 @ 5000000/208333 fps (cfr)
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: profile Main, level 3.1
As you can see from the three tests I've made that I managed to get the forced level (3.1) to work. But I can't get the High profile, even when not using any presets. Can someone please help me? x264 core:112 r1834 a51816a
I have ommited the input and output files from the cmd line to make it easier to read.
[EDIT] Oh, nevermind. That was due to the fact it was on the first pass of the encode. For the second pass, x264 showed High profile on its output. Interesting that the level is displayed correctly, but the profile is displayed according to the turbo preset I suppose.
nurbs
4th January 2011, 19:59
First pass uses faster settings by default. 8x8dct is deactivated among other settings, so unless you use --slow-firstpass or a CQM your first pass will never be high profile. There is nothing wrong.
--level sets a flag regardless of settings used. --profile will limit features, but if no high profile features are used it will still signal main (or baseline).
bin_ch
16th May 2012, 09:15
Hello,
after two years (http://forum.doom9.org/showpost.php?p=1382782&postcount=269), I am still wondering what do you think about bumping --bframes in --preset slower a little?
D_S said in previous post that this might be worth looking into at some point, so any news? Or is it considered a bad idea? To my personal experience, 3 is almost always too low for those slow'ish presets.
Furthermore, if I understand correctly, with the upcoming sliced lookahead, the bottleneck caused by --b-adapt 2 and many bframes can be reduced a lot, this adds another point to use more bframes IMO.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.