Encoding MKVs and MP4s using AutoGK (Part One).
I started writing a guide to using AutoGK to encode file types is doesn't natively handle (mainly focused on MP4 & MKV). It's still rough as I never got around to finishing it properly but I thought I'd post it here. It might help give AutoGK a bit more longevity for some people, which would be nice as it's a great program. I still use it this way regularly.
I've divided the guide into two posts. The first is the annoying "one time only" stuff which needs to be installed and configured. This is the stuff which eventually makes it fairly easy to set up an AutoGK encode of an MKV or MP4 file. Many seasoned video encoders will already have much of it installed.
The second post is the fun stuff, which explains how to take an MKV or MP4 file and convert it with AutoGK. Once the following software is installed and configured and you've done it a few times, setting up an encode of an MKV or MP4 file only takes a minute or two.Encoding MP4 and MKV files using AutoGK.
This guide explains how to use an AVISynth script to allow AutoGK to encode file types it doesn't natively support. Almost any type of video you can play on your PC can be converted using AutoGK with a little preparation. This guide assumes you're familiar with AutoGK, ffdshow and the Haali media Splitter. It doesn't matter if you're not familiar with the latter two, just Google, download and install them. We'll also be installing and configuring a few extra utilities which let us create an AVISynth script and then an AVI for AutoGK to convert (for those who aren't familiar with doing it the "manual" way).
When it comes to audio AutoGK supports AC3, DTS and MP3 but not AAC. If the original video file contains any of the first three we can use AutoGK to convert it, if not it needs to be converted "manually". The audio side of converting won't be covered too extensively here, but for the most common video file types (MP4 and MKV) we can simply extract supported audio streams from the original file and add them to the AVI we're going to create for AutoGK to convert.
The most common "problem" audio type you're likely to meet will be AAC. I convert it using foobar2000 (http://www.foobar2000.org
) as it'll open, play and convert the audio inside MKV and MP4 files directly. It'll also mix multichannel audio down to stereo while converting (which you need to do if converting to MP3). Foobar2000 requires the installation of third party encoders, the most common being the LAME MP3 encoder, AFTEN AC3 encoder and Nero AAC encoder. It also requires additional third party plugins to decode some audio types, but once it's set up, foobar2000 makes converting the audio easy. It is though, a different topic, so I won't cover using foobar2000 here.
This guide will assume you're converting either MP4 or MKV files. It'll assume the audio tracks are of a type AutoGK can convert. It'll assume if the original audio is an unsupported type such as AAC, you've converted it manually to either AC3 or MP3. Any video type can be converted using this method.... for more exotic container types it's actually handling the audio which gets trickier, so we'll primarily look at converting video using AutoGK while including audio types it does support.Required software:
ffdshow tryouts (http://ffdshow-tryout.sourceforge.net/
Haali Media Splitter (http://haali.su/mkv/
For converting MKV files:
) (required for MKVCleaver to work)
For converting MP4 files:
)Installing and configuring the additional software:
Installing AVISynthesizer is just a matter of running the exe. Once it's installed navigate to the installation folder, then the templates folder. We're going to make two addition templates for creating AVISynth scripts.
Open notepad. Copy and paste the following:
#ASYNTHER DirectShowSource - no audio
Save the notepad document as "DirectShowSource - no audio.avst". Make sure it's extension is avst rather than txt. Move the new template to the AVISythesizer templates folder.
Now repeat the process for creating a second template. This time copy and paste the following into notepad:
#ASYNTHER DirectShowSource Colour Convert - no audio
ColorMatrix(mode="Rec.709->Rec.601", clamp=0)You'll need to modify the LoadPlugin path according to where AutoGK is installed on your PC
Save the template as "DirectShowSource Colour Convert - no audio.avst". This template will be used when converting high definition sources to standard definition AVIs as to do it correctly, color correction usually needs to be employed. For other conversions (SD to SD, HD to HD) the first template will be used.
We've now finished setting up our templates for creating basic AVISynth scripts.
Next we need to install AVS2AVI. To install AVS2AVI simply unzip the downloaded zip file, right click on avs2avi.inf and select "install".
Installation of MKVCleaver, MKVToolnix and YAMB should require no explanation and don't require any configuring (with the exception of MKVCleaver which requires you to tell it where MKVToolnix is installed the first time you run it or it won't work).
For those who are unfamiliar with using VirtualDubMod, if you've used AutoGK you'll have no doubt seen it running as AutoGK converts your video. We need to use it manually while setting up our conversion. Ideally the version of VirtualDubMod which installs with AutoGK should be upgraded to the last available version (18.104.22.168). I won't bother with the details for doing so here, the version which installs with AutoGK will suffice, it's just a bit slower at preparing our AVI than the last version.
For convenience navigate to your AutoGK installation folder, then the VirtualDubMod sub-folder and create a shortcut to VirtualDubMod.exe. Move the shortcut to your desktop or somewhere it's easy to access.
That's all the installing and setting up taken care of. All of the above is a "one time only" thing which simplifies the process of actually converting the video. Next I'll explain how to prepare a video file for converting. It's a fairly quick and straightforward process once you've done it a few times.