View Full Version : Fast x264 settings to compare to CUDA encoder
St Devious
7th July 2009, 14:06
What's the fastest settings for max fps with 2 pass encoding for x264. Need to compare quality at fastest settings with CUDA encoder in Mediacoder.
J_Darnley
7th July 2009, 15:14
This is a no-brainer now:
--preset ultrafast
[EDIT] Sorry nurbs
nurbs
7th July 2009, 15:15
Look right here: http://forum.doom9.org/showthread.php?t=148149
If you have an up to date build you can use --preset ultrafast for maximum speed, if not you can just copy the command line options for that preset and use it. If you care about quality at all you should at least use the veryfast or fast preset or something in between them if you manually want to tune speed.
edit: I need to type faster :(
St Devious
7th July 2009, 15:19
This is a no-brainer now:
--preset ultrafast
[EDIT] Sorry nurbs
Look right here: http://forum.doom9.org/showthread.php?t=148149
If you have an up to date build you can use --preset ultrafast for maximum speed, if not you can just copy the command line options for that preset and use it. If you care about quality at all you should at least use the veryfast or fast preset or something in between them if you manually want to tune speed.
edit: I need to type faster :(
So I just put --preset ultrafast in the commandline and that's it ?
J_Darnley
7th July 2009, 15:22
Don't forget the input and output file though. You might also want to set a bitrate. So something like:
x264 -o NUL in.file --preset ultrafast -B bitrate -p1
[EDIT] Thanks for catching that, fixed.
ajp_anton
7th July 2009, 15:24
Don't forget the input and output file though. You might also want to set a bitrate. So something like:
x264 -o NUL in.file --preset ultrafast -b bitrate -p1b = b-frames
B = bitrate
nurbs
7th July 2009, 15:28
By the way I'd be interested in the results if you want to share (speed you get, your processor, your graphics card and what you think looks better).
St Devious
7th July 2009, 15:31
By the way I'd be interested in the results if you want to share (speed you get, your processor, your graphics card and what you think looks better).
absolutely. making an article to post on my website. I'll post the link here when it is done.
So, I saw in the other thread that the presets overwrite any other settings.
So If I set bitrate and everything else in megui and just enter the preset in front of everything in the commandline, that should take care of everything right ?
J_Darnley
7th July 2009, 15:44
Wrong. Presets are the first thing to be applied/set, then tune, then your settings, then "fast first pass" settings, then level restrictions and finally profile restrictions.
St Devious
7th July 2009, 15:47
Wrong. Presets are the first thing to be applied/set, then tune, then your settings, then "fast first pass" settings, then level restrictions and finally profile restrictions.
but DS said in the other thread
Presets will be used as follows:
--preset name
and apply before all other options. In other words, they override the x264 defaults,
If the presets are going to overwrite any other settings x264, then why tune them ?
J_Darnley
7th July 2009, 15:50
"They override the x264 defaults" not anything else.
nurbs
7th July 2009, 15:51
x264 always takes the last option you specify.
Examlpe:
--preset ultrafast --subme 9 would use everything in preset ultrafast but subme would be set to 9
--subme 9 --preset ultrafast would use just the preset with --subme 0
edit: dammit :p
J_Darnley
7th July 2009, 15:52
x264 always takes the last option you specify.
Examlpe:
--preset ultrafast --subme 9 would use everything in preset ultrafast but subme would be set to 9
--subme 9 --preset ultrafast would use just the preset with --subme 0
Not anymore.
nurbs
7th July 2009, 15:59
Oh, I just reread it, you are right. In the example I gave both should have the same result. Where you put the preset switch doesn't matter, the contents of the preset will be used as if it was at the beginning of your command line with everything else appended, but apart from that rightmost option still counts in case of duplicates, right?
St Devious
7th July 2009, 16:02
this is getting confusing.
So what should I do to get the fastest x264 settings.
Can somebody please post the commandline parameters ?
J_Darnley
7th July 2009, 16:11
Yes. It is still the case that if you specify subme (or any other option) twice the right-most one will used. But beware with the new options (preset, profile and tune), they don't all set the same options so you may get mixed and unexpected results. The first one will change the settings from the default, then the second will change the settings from the first and so on. For example: --preset placebo --preset ultrafast will not change merange back to 16
J_Darnley
7th July 2009, 16:12
this is getting confusing.
So what should I do to get the fastest x264 settings.
Can somebody please post the commandline parameters ?
I did
So something like:
x264 -o NUL in.file --preset ultrafast -B bitrate -p1
nurbs
7th July 2009, 16:22
You only need to tell x264 input file output file preset pass (if you do multipass) bitrate or crf value
Example for a twopass encode:
x264.exe --preset ultrafast --pass 1 --bitrate 1000 --output NUL "C:\input.avs"
x264.exe --preset ultrafast --pass 2 --bitrate 1000 --output "C:\output.mkv" "C:\input.avs"
or the short version (which does exactly the same thing, but I personally find the long options easier to read)
x264.exe --preset ultrafast -p 1 -B 1000 -o NUL "C:\input.avs"
x264.exe --preset ultrafast -p 2 -B 1000 -o "C:\output.mkv" "C:\input.avs"
edit:
As you can see in the thread I linked there are also the new --tune and --profile switches. The first tunes the encoder for anime/catoons or film, the second overrides options that don't conform to the selected profile (baseline/main/high). They are not important for your test since everything --tune changes is turned off with the ultrafast preset and --profile is mainly for enforcing hardware compatibility, but I thought I point them out in case you want to use them for real encodes in the future.
St Devious
7th July 2009, 19:10
I will actually be using MeGUI for encoding. I was actually looking to put the x264 settings in the commandline in the x264 settings GUI in it. I normally select automatic 2 pass turbo.
What do i need to put in commandline box in that settings GUI ?
nurbs
7th July 2009, 19:31
Download this: http://www.megaupload.com/?d=YD2DCPZF
Put it in your megui\allprofiles\x264 directory. Restart megui. Select ultrafast profile. Enter bitrate. Encode.
This is for the current version of megui and the x264.exe that ships with it and won't work with newer x264 versions because the names of some options changed. That is if you manually replace x264. I assume when megui is updated the profiles will be converted so they work with the new x264.
St Devious
7th July 2009, 20:59
Download this: http://www.megaupload.com/?d=YD2DCPZF
Put it in your megui\allprofiles\x264 directory. Restart megui. Select ultrafast profile. Enter bitrate. Encode.
This is for the current version of megui and the x264.exe that ships with it and won't work with newer x264 versions because the names of some options changed. That is if you manually replace x264. I assume when megui is updated the profiles will be converted so they work with the new x264.
i see. thanks.
btw its an xml file, is notepad++ the best way to view it ?
and what real world source would you suggest ?
LoRd_MuldeR
7th July 2009, 21:02
btw its an xml file, is notepad++ the best way to view it ?
I'd use my web-browser (namely Firefox) to look at the XML file. But the idea is that you don't need to interpret the XML code yourself, but let MeGUI do that for you ;)
nurbs
7th July 2009, 21:13
What Lord Mulder said.
When you copy it to the directory I told you it will show up in the dropdown where you select the x264 profiles in megui. Making the file was less complicated than explaining to you how to do it yourself.
I'm not sure about the source. I'd probably do a cartoon (I only have Futurama), something from dvd (downscaled to 640x360 or whatever is needed in hight to get a 1:1 AR) and a blu ray downscaled to 720p since that's what I encode to myself. For the real life source I would choose a clean but detailed one and another with some noise/grain to see how the encoders handle it.
Really with that profile you can't expect any quality, but it's as fast as it gets. There is probably some things you can change without too much speed loss that improve quality noticably. You should really take a look at the faster presets I linked in my first post on this thread and learn how to configure megui to use these options until it implements the --preset switch in a usable way.
Dark Shikari
7th July 2009, 21:20
I'd use something like a Blu-ray source or my standard Blackpearl test clip.
St Devious
7th July 2009, 21:23
how is this site for samples
http://www.w6rz.net/ ?
I have downloaded this clip from this site
1080p VBR Video Quality Test Streams
Sony HDW-F900 footage, 1080p@25, 18 Mbps average, 30 Mbps peak in a 35 Mbps Transport Stream (259,534,064 bytes)
I'd use something like a Blu-ray source or my standard Blackpearl test clip.
I don't have access to a Blu-Ray. Can I have the link to your Blackpearl test ?
Dark Shikari
7th July 2009, 21:46
Linkage (http://www.mediafire.com/?mymhmje0iki)
St Devious
7th July 2009, 21:57
Linkage (http://www.mediafire.com/?mymhmje0iki)
thank you. would that mediafire link be up forever ?
i noticed that the sample is only 720x480. do you have a Full-HD sample you recommend ?
What about the samples on the site i linked ?
Dark Shikari
7th July 2009, 22:26
thank you. would that mediafire link be up forever ?
i noticed that the sample is only 720x480. do you have a Full-HD sample you recommend ?
What about the samples on the site i linked ?Well the link's been up for a year already...
I keep some 720p clips here (http://mirror05.x264.nl/Dark/?dir=./x264clips).
St Devious
7th July 2009, 22:48
Well the link's been up for a year already...
I keep some 720p clips here (http://mirror05.x264.nl/Dark/?dir=./x264clips).
are those uncompressed ? any 1080p clips ?
Blue_MiSfit
7th July 2009, 23:15
I'd suggest a BluRay source, or if you want to take things too far - use the PNG sequences of Elephant's Dream or Big Buck Bunny. Google will reveal these torrents very quickly, and these are fully open movies.
~MiSfit
LoRd_MuldeR
7th July 2009, 23:17
I'd suggest a BluRay source, or if you want to take things too far - use the PNG sequences of Elephant's Dream or Big Buck Bunny. Google will reveal these torrents very quickly, and these are fully open movies.
~MiSfit
No need for torrents ;)
http://media.xiph.org/ED/ED-1080-png/
http://media.xiph.org/BBB/BBB-1080-png/
St Devious
7th July 2009, 23:26
No need for torrents ;)
http://media.xiph.org/ED/ED-1080-png/
http://media.xiph.org/BBB/BBB-1080-png/
Is there a way to make a movie out of all those images ? or do you just encode the image if that's even possible ?
Dark Shikari
7th July 2009, 23:27
Is there a way to make a movie out of all those images ? or do you just encode the image if that's even possible ?imagesource()
roozhou
8th July 2009, 05:32
Is there a way to make a movie out of all those images ? or do you just encode the image if that's even possible ?
mencoder mf://
St Devious
8th July 2009, 05:37
mencoder mf://
not familiar with commandline commands. please explain more or is there a GUI ?
Blue_MiSfit
8th July 2009, 06:48
Imagesource will let you load the PNGs into AviSynth. You can then continue to use MeGUI as you'd originally planned.
~MiSfit
roozhou
8th July 2009, 07:32
not familiar with commandline commands. please explain more or is there a GUI ?
suppose your PNGs are D:\bbb_00000.png ~ D:\bbb_14315.png, resolution is 1920x1080
mencoder mf://D:\%05u.png -mf fps=24 -vf format=i420 -ovc raw -of rawvideo -o - -really-quiet | x264 - 1920x1080 ...
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.