Thursday 14 January 2010

[TUT] X264 Encoding

* X264 Encoding Tutorial from HD Source
o 1. Demux (extract video, audio)
Purpose: extract video and audio separately then we can work out on each at ease.
Software: MKVtoolnix +MkvetractGUI
Procedure:
+ Start MkvextractGUI
+ At Input, browse for the source file
+ Wait for loading, and then at the content box, check all of the content
+ Click Extract to start
+ After about 5’ , done!

o 2. Encode audio
Software: Foobar2000 + foo_ac3.dll + NeroAacenc.exe
Procedure:
+ Copy foo_ac3.dll to your component directory of Foobar2000
+ Start Foobar2000
+ Add your source audio file that you has just extracted.
+ Right click on it and looking for Convert Convert to the same folder
+ A dialog appeared asking for the encoding option
+ In the dropdown menu, select MP4(Nero), then click … to select the bitrate
+ Select Mode: ABR and quality of 192kbps or higher if you need better quality then OK 2 times
+ If the transcode warning showed up, just click yes
+ If it asks for the neroaacenc.exe, browse to that file on your hard drive then click ok
+ The transcoding takes about 5-10 minutes depend on your system and the length of you audio file

o 3. Encode Video
Software: meGui + Avisynth
Procedure:
+ Start meGUI
+ Go to Tools  Avisynth script creator
+ In the new window, browse to your video file that you extracted off from Task 1
+ A window preview of your video will appeared then.
+ If you see a black border, click on Autocrop to crop it, this will help saving the bitrate for the content
+ In the resize option, it depend on your needs, here I do m-HD then I resize to 720x480 (for 16/9 AR of source file)
# The resize option that from hdtv-fan's x264, mkv help thread for anamorphic m-HD
1280x720 => 720x480
1280x528 => 720x352
1280x544 => 720x(~)362
1280x688 => 720x(~)458
+ Make sure you check “On Save close and load to be encoded”
+ Save avs file and it will be automatically load on in your Video input
+ Select Codec x264, file format mkv
+ Select the profile, here I recommend HQ-Slower for better quality still it takes a bit long time to encode.
+ Go to config, in the tab Zones, type “--sar 40:33” in Custom command line Options. This option is for anamorphic encoding
+ Next, go to Tools  Bitrate calculator to get the extract bitrate so that the file size is as your need.
+ At Audio section, select the audio file that you already encoded in taks 2 (format of mp4)
+ In total size, input your desire file size of your movie after encoding, then the result bitrate will be calculated and showed in the below section.
+ Click apply to finish Bitrate calculator
+ Click enqueue to get your file ready to be encoded.
+ Now you almost get to the point but don’t start if you want to do a batch encode. Follow all the same instructions before to your another video files and click enqueue when you done with each
+ When you finish with configuration all your files, now click on tab Queue to start the job
+ Click start, if it asks something for a worker, type anything and Ok
+ Now, go to sleep or go watching movie while your PC does its jobs.
+ The average time is about 5-6 hours of 1 hour HD video if you have a fast CPU. Maybe damn slower if your CPU suck :P. Be patient, then you can have the best quality.

o 4. Mux
Purpose: to multiplex your encoded audio and video and even subtitle to only 1 file ( container)
Tools: MKVtoolnix
Procedure:
+ Start Mkvmerge GUI
+ Add the encoded video, audio and subtitles of your movies
+ In the track box, edit information if you want or you can leave it as
+ At Output file name, put a name for your new movie file. Be sure that the name not the same with the encoded video file , otherwise it will overwrite while you still need that file to multiplex. Such a disaster!!!

mkvtoolnix

http://www.bunkus.org/videotools/mkvtoolnix/downloads.html#windows

Foobar2000 + foo_ac3.dll + NeroAacenc.exe

http://www.foobar2000.org/download.html

http://kode54.foobar2000.org/foo_ac3.zip

http://www.nero.com/eng/down-ndaudio.php

meGui

http://www.sf.net/projects/megui

MkvExtractGUI

http://www.videohelp.com/tools/MKVExtractGUI

Avisynth

http://sourceforge.net/projects/avisynth2/files/

K-Lite Codec Pack 64-bit
http://www.codecguide.com/klcp_64bit.htm

Saturday 2 January 2010

Joining multiple .001 files

Batch joining multiple .001 files
 

I just use hjjoin http://www.freebyte.com/download/hj-join.zip
Run join32 in the same directory as all your .001 files and it should automatically join them. Works good for me. :)