PDA

View Full Version : How to automate h264 & ac3 to MKV Encoding


xbox360
12th May 2008, 05:11
Tools needed:

1. x264.exe at http://x264.nl/

2. Aften.exe at http://win32builds.sourceforge.net/aften/index.html

3. mkvmerge.exe at http://www.bunkus.org/videotools/mkvtoolnix/

4. AviSynth at http://sourceforge.net/project/showfiles.php?group_id=57023

First put all the files in one folder including the audio file that is renamed to aud.wav, like this :

http://i129.photobucket.com/albums/p229/MartinJunior/Part1.jpg

Whats in x264.avs ?
LoadPlugin("c:\Program Files (x86)\AviSynth 2.5\plugins\DGDecode.dll")

MPEG2Source("D:\Encoding Stuff\VR_MOVIE.d2v")
So whats in the Start MP4 Creator.bat you ask ?
It's the code to automate the whole process !

This is a 2 pass
START /w D:\x264\AllEncoder\x264.exe x264.avs --output video.264 --fps 25 --bitrate 1500 --progress --pass 1

START /w D:\x264\AllEncoder\x264.exe x264.avs --output video.264 --fps 25 --bitrate 1500 --progress --pass 2

START /w D:\x264\AllEncoder\aften.exe -acmod 2 -b 192 aud.wav out.ac3

START /w D:\x264\AllEncoder\mkvmerge.exe -o complete.mkv video.264 out.ac3


This is a 1 pass
START /w D:\x264\AllEncoder\x264.exe x264.avs --output video.264 --fps 25 --bitrate 1500 --progress

START /w D:\x264\AllEncoder\aften.exe -acmod 2 -b 192 aud.wav out.ac3

START /w D:\x264\AllEncoder\mkvmerge.exe -o complete.mkv video.264 out.ac3


As you can see it is a no brainer when using .bat to it's fullest potential ! This tutorial was made to stop people from using Divx & Xvid which are teribly outdated !

x264 latest profiles:

http://mirror05.x264.nl/Sharktooth/?dir=./MeGUI/profiles

nm
12th May 2008, 10:37
Some suggestions:

1. Add AviSynth to the requirements.

2. You might want to drop the full path from the command lines so that the script works out-of-the-box in other locations.

3. Perhaps use variables for the common settings in multi-pass scripts so that the settings only need to be changed in one place.

4. Perhaps you could provide template scripts for different encoding quality levels (and speeds), or at least provide a link to some in-depth x264 guide.

xbox360
12th May 2008, 11:38
Dear nm please edit your post & fill in the thing that I have missed out, I already fixed my first post.

RickA
20th May 2008, 15:21
Greets,

Nice little write up. Thanks.

Cheers,
Rick

Atak_Snajpera
21st May 2008, 00:41
--fps 25
How do you know that your every movie will be always 25fps :)

xbox360
21st May 2008, 02:07
Because I record from a DVB-T.