View Full Version : what are the best settings for x264 encoding.
modsoul
18th May 2006, 09:45
i am trying to encode my anime collection (using virtualdub) so could somebody please tell me what options i should use to get max quality at around 300 k bps. at the moment i set it to
partition decision =5
method exhaustive: search
i don't mind performance loss( its encoding at 5 fps in those setting but whatever)
also i tied to uise quantisiser value 10 (cuz that the value i used to use for xvid under mencoder but the file size was much larger) what would be a appoximate equal quantizer's value for x264..
is using quantizer's better than setting the bit rate by hand.
sorry for being a noob.
i did use the search function for quantizer's... in fact that what pointed me to this forum.
Daodan
18th May 2006, 10:08
1. Using Virtual Dub with x264 is not the best choice. Use x264 cli with one of the guis you can find in the forum above this one: megui, staxrip, realanime, etc.
2.exhaustive is not really useful, probably not even for anime. Use umh and subme 6 or 7 instead (faster and better). Other than that, there are a lot of options there, use spatial for b-frames, a large number for reference frames (I'm not encoding much anime but people around here say it's useful for anime).
For quantizers - q=2 corresponds to q=18 in x264 (or around). There was once a method to calculate that , but can't find it..try q=30 maybe..
Yama4050242
18th May 2006, 10:21
MPEG Quant H264 Quant Integer H264 Quant
1 13.406791521822 13
2 19.406791521822 19
3 22.916566526149 23
4 25.406791521822 25
5 27.338360091146 27
6 28.916566526149 29
7 30.250921054168 30
8 31.406791521822 31
9 32.426341530476 32
10 33.338360091146 33
11 34.163381233646 34
12 34.916566526149 35
13 35.609429830669 36
14 36.250921054168 36
15 36.848135095473 37
16 37.406791521822 37
17 37.931568569324 38
18 38.426341530476 38
19 38.894356602484 39
20 39.338360091146 39
21 39.760696058495 40
22 40.163381233646 40
23 40.548163258164 41
24 40.916566526149 41
25 41.26992866047 41
26 41.609429830669 42
27 41.936116534803 42
28 42.250921054168 42
29 42.554677492588 43
30 42.848135095473 43
31 43.131969384143 43
modsoul
18th May 2006, 10:54
thank for the replies.
i am not limited to anime. infact i am about to encode mgs in game mivies for a freind as well.
here a pic of all the option i can see
http://img311.imageshack.us/img311/2917/x2649ch.jpg (http://imageshack.us)
which one of these do i change.
thanks.
Inventive Software
18th May 2006, 11:19
If you absolutely don't mind waiting a long long time for the encoding to finish, change these options...
For a target bitrate: Change to "Multipass 1st pass" for the 1st pass, and "Multipass Nth pass" for the second pass / 3rd pass. All other settings apply here.
On the "More..." tab change these:
"Partition Decision" to 6b (RDO on B-Frames);
"Max Ref frames" to 4 or 5, or more (8?), and in consequence, enable "Mixed Refs".
On the "MBs and Frames" tab change these:
Enable "4x4, 4x8 and 8x4 P-frame search",
Change "Max Consecutive" under the B-frames box to 3 or 4, or 1 less than the "Max Ref frames" number. Enable "Use as references" and "Bidirectional ME".
I read somewhere that "Direct Mode" should be set to "Spatial" for Anime content, and "Temporal" for Film content, can anybody confirm that?
Other than that, that's all the options you need to enable. I'd recommend doing at least 2 passes to get the target bit-rate or file size you're looking for. You may wish to experiment with the deblocking filter to get acceptable settings.
Caroliano
18th May 2006, 11:22
You shoud start by using :search: & reading the stickies. In Sharktooth's daily builds sticky there are links to many guides that explain x264 settings. Also use Megui to encode for x264 as it store it in it's native mode in Matroska or Mp4 and with that you can use all x264 options and the sharktooths profiles (http://forum.doom9.org/showthread.php?t=101813)
Also see this topic (http://forum.doom9.org/showthread.php?t=107699) for comparison of diferent options and their impact in speed and velocity. Exaustive search is plain waste of time. People think that if it is slow it shoud be good... that's why I'm for this become an hiden option, mainly for debuging....
EDIT: I read somewhere that "Direct Mode" should be set to "Spatial" for Anime content, and "Temporal" for Film content, can anybody confirm that?
No. For 1 pass direct spatial is the recomended one always (it is now defaut. For two pass direct auto shoud be always better (in quality and speed).
Inventive Software
18th May 2006, 11:37
No. For 1 pass direct spatial is the recomended one always (it is now defaut. For two pass direct auto shoud be always better (in quality and speed).
I don't quite get that. Are you telling me that for 1-pass encoding, use Spatial, and for multi-pass encoding, use Temporal?
foxyshadis
18th May 2006, 11:58
There is no "auto" in vfw. If there was, it would be best. When auto is used in the cli typically 90% are chosen spatial, for all content, so you can see which is the better choice of the two you do have. (But this is another reason vfw isn't great for encoding x264.)
You get 5 fps is exhastive? Wow. You won't get any better quality but daaang you have a monster machine. You should get killer speed with multi-hex.
Guest
18th May 2006, 13:16
what are the best settings for x264 encoding. Please read and follow forum rules, specifically, rule 12: do not ask what's best. Thank you.
modsoul
18th May 2006, 13:20
i really apologize if this info is already available elsewhere on the forum. but i really did search on google and that pointed me to a thread here. since google gave so few result i made a new thread.
There is no "auto" in vfw. If there was, it would be best. When auto is used in the cli typically 90% are chosen spatial, for all content, so you can see which is the better choice of the two you do have. (But this is another reason vfw isn't great for encoding x264.)
You get 5 fps is exhastive? Wow. You won't get any better quality but daaang you have a monster machine. You should get killer speed with multi-hex.
thanks. mine is a amd opteron 165 (dual core at 1.8 GHz) but since encoding is single threaded its basically as fast as athlon 64 3000+.
also can you point me to a good guide for learning the cli version. i used to use mencoder on Linux for encoding previously so i think I'll be able to use it.
does the cli version allow something akin to scheduling.
now i'm of to :search:
Sharktooth
18th May 2006, 13:22
what neuron2 said and use MeGUI or StaxRip or RealAnime or whatever (nut not virtualdub!!!) with a high quality anime profile.
FYI x264 is MULTI-THREADED...
modsoul
18th May 2006, 13:51
If you absolutely don't mind waiting a long long time for the encoding to finish, change these options...
For a target bitrate: Change to "Multipass 1st pass" for the 1st pass, and "Multipass Nth pass" for the second pass / 3rd pass. All other settings apply here.
On the "More..." tab change these:
"Partition Decision" to 6b (RDO on B-Frames);
"Max Ref frames" to 4 or 5, or more (8?), and in consequence, enable "Mixed Refs".
On the "MBs and Frames" tab change these:
Enable "4x4, 4x8 and 8x4 P-frame search",
Change "Max Consecutive" under the B-frames box to 3 or 4, or 1 less than the "Max Ref frames" number. Enable "Use as references" and "Bidirectional ME".
I read somewhere that "Direct Mode" should be set to "Spatial" for Anime content, and "Temporal" for Film content, can anybody confirm that?
Other than that, that's all the options you need to enable. I'd recommend doing at least 2 passes to get the target bit-rate or file size you're looking for. You may wish to experiment with the deblocking filter to get acceptable settings.
thank i enabled all the options you said and lowered method to the 3rd option. 5 fold speed increase :eek:
Please read and follow forum rules, specifically, rule 12: do not ask what's best. Thank you.
sorry about that too.
i really did not read the rules and have never encountered that rule before on any forum.
edit. thanks for pointing me to other encoders rather than virtual dub. i just tried megui and its far better than virtual dub. apparently there is no need to use the command line even to use cli.. WOW.
also
FYI x264 is MULTI-THREADED...
x264 maybe but virtual dub is not.
foxyshadis
18th May 2006, 14:55
x264 vfw config -> more -> threads
Virtualdub also internally runs the input and output on different threads, so if you have a heavy avisynth it won't interfere with encoding. The cli option "--thread-input" also does this, it's combined with threading in megui. Just an fyi, you might not even care now. ;P
modsoul
18th May 2006, 15:38
x264 vfw config -> more -> threads
Virtualdub also internally runs the input and output on different threads, so if you have a heavy avisynth it won't interfere with encoding. The cli option "--thread-input" also does this, it's combined with threading in megui. Just an fyi, you might not even care now. ;P
thanks for the info. i always care for more info. yeah i saw the cli line when i selected the option in megui. awesome program megui. really nice. and now that exhaustive search is off i am at least getting 20+ fps..exhaustive search really is proc intensive.
heeres a question. i used meguie to encode some eps but they came out without the audio. they were in the mkv container. any tips ?
in the megui avisynth script generator's edit tab i found that it had placed "audio=false" . i removed it then tried to preview but no sound. i turned it to true then tried preview and still no sound. what should i do ?
Daodan
19th May 2006, 10:10
Probably you configured something wrong in megui in the audio part. Usually what I do is process the audio with another program and remux it at the end because I also have this way more control over the parameters. BeLight is easy to use and outputs a lot of formats.
DeathTheSheep
21st May 2006, 00:10
Sorry I'm a bit late, but for a small x264 guide you might want to have a look at the guide in my sig. It might help you out a bit, who knows ;)
lexor
21st May 2006, 03:41
16 posts on the subject of "what is best" and it still not locked? Which one of you murdered bond?
modsoul
21st May 2006, 03:52
actually its not really a what best thread.
i had not actually read the rules (now i have)so i phrased the question in the way i would on say anandtech (or other forums i frquent).
its really more of a noob asking for tips cuz he can't understands 99/100 of the options available.
i do apologize again for not reading the rules and phrasing the thread this way. sorry.
Sorry I'm a bit late, but for a small x264 guide you might want to have a look at the guide in my sig. It might help you out a bit, who knows
that guide is awesome thanks.
Probably you configured something wrong in megui in the audio part. Usually what I do is process the audio with another program and remux it at the end because I also have this way more control over the parameters. BeLight is easy to use and outputs a lot of formats.
i had never before had the need to mux audio and video before. now that i do know its clear that megui while allowing for audio encoding as well required you mux it your self. i like the mkvmergegui for that more that the one built into megui.
Sharktooth
21st May 2006, 04:06
@modsoul: use the EDIT function (go advanced mode) to edit the thread title, please (that will avoid further annoiance from moderators and maybe others).
thanks:)
as neuron2 said: there are no best settings, it all depends on the used content, bitrate aso....
so try yourself and see if you like what x264 gives you
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.