PDA

View Full Version : Proper Multi-Pass Encoding Steps - X264


j7n
8th July 2006, 01:39
Forgive me this simple question. Finally convinced to say goodbye to VFW I am now using the command line encoder to do a 2-pass encoding. Should X264 output video data in the first pass (VFW never did) or am I doing something wrong here and haven't actually selected multipass encoding?
--keyint 500 --min-keyint 20 --bframes 3 --b-pyramid --ref 4 --nf -B 1888 --pbratio 1.25
--stats "c:\temp\x264_2pass.log" --analyse "all" --direct "temporal" --weightb --me umh --subme 7 --b-rdo
--mixed-refs --trellis 0 --bime --8x8dct --progress --pass 1
-o "f:\_Stargate_Atlantis_-_[02x03]_-_Runner-1pass.mkv" "d:\plugins\avisynth\myscript.avs"

berrinam
8th July 2006, 02:22
I recommend not directly manipulating the commandline, but using a GUI for the CLI encoder. You can find many on the MPEG Encoder GUIs subforum, such as MeGUI, StaxRip, RealAnime, etc...

Despite that, to your original question:
The first pass needn't output any video data, but x264 will by default. To turn this off, replace -o "f:\_Stargate_Atlantis_-_[02x03]_-_Runner-1pass.mkv" with -o NUL

alec_robertson
8th July 2006, 03:21
You can also speed up your first pass by using "--analyse none --me dia --subme 1 --no-psnr" and omitting "--8x8dct -B 1888" plus anything else that you don't need until the second pass...

berrinam
8th July 2006, 05:01
...and omitting "--8x8dct -B 1888"...It's all correct except for this: it's best to keep the bitrate in the first pass (which means leaving "-B 1888" in the commandline).

foxyshadis
8th July 2006, 05:35
It's always good to leave bitrate somewhere near your final bitrate. It isn't (usually) a quality killer if you don't, it just helps keep rate control a little more accurate.

If you ever need to do things guis won't let you (say, re-encoding of single gops or whole segments) it's good that you already know your way around, but it's usually helpful to get started

Here's megui's fast first pass:
x264.exe --pass 1 --bitrate 1000 --stats ".stats" --bframes 3 --b-pyramid --direct auto --filter -2,-1 --subme 1 --analyse none --me dia --progress --no-psnr --output NUL "stuff.avs"
You can change the bolded stuff, but it must be the same between the two passes or you'll get an error. The rest is malleable.

j7n
8th July 2006, 21:45
Thank you for your reply, Berrinam. The problem with GUI's I have tried is that they require NET Framework, which then requires Windows Installer 3. That's too much bloatware. For GUI functions, like bitrate calc or frame numbers I use VirtualDubMod.

Sirber
8th July 2006, 22:00
The problem with GUI's I have tried is that they require NET Framework, which then requires Windows Installer 3That's why I love Delphi (VCL). No crap, no bloat, only pure native code! :D

popper
9th July 2006, 03:10
Thank you for your reply, Berrinam. The problem with GUI's I have tried is that they require NET Framework, which then requires Windows Installer 3. That's too much bloatware. For GUI functions, like bitrate calc or frame numbers I use VirtualDubMod.

well you could always make your own GUI for any cli/shell encoder with some rebol/view scripting, infact i wish someone good at scripting would as we need far more example rebol/ view GUIs to get people started, then that one script could run on lots of platforms as is,probably on anything the encoder runs on.

you will not find anything lighter yet powerful anywere than rebol/view for your GUI's and tcp/ip in general.

latest /view
http://www.rebol.com/view-platforms.html

older but more platforms here
http://www.rebol.com/platforms-view.html

RebGUI - REBOL/View Graphical User Interface
http://www.rebol.net/article/0280.html

some fully working example code/scripts
http://www.rebol.org/cgi-bin/cgiwrap/rebol/search.r?find=gui&form=yes
http://www.rebol.net/plugin/tests/test.html
http://www.rebol.net/plugin/demos/

Rebol Programming For The Absolute Beginner
http://musiclessonz.com/rebol_tutorial.html