MeGUI: Part Two — The Conclusion

Filed in diy , guide , hdtv , windows 0 comments

Okay, first things first: sorry about the delay.  Unfortunately, I was more than 4,000 miles away from the computer I was writing this guide on so it was impossible to finish it and get it out there when it should have been out there.

The second thing is that I bought a new bass guitar along with amp and effects board so I might have been procrastinating slightly.  The posts to the ‘blog’ should come a bit more regularly for the next while so expect big* things.

* – Well, maybe not mind-blowingly big, but it’s a point-of-view issue.

Part 3.  Processing the Audio

When we left off, we had a folder/directory with five files in it.

Files After Step 2

Now, lets take a look at the file called VTS_01_01 T01 2_0ch 192Kbps DELAY 0ms.ac3.  This is what DGIndex stripped from the files we grabbed from the DVD.  It is an AC3 file, which is a lossy format that was created by Dolby to encode sound.  For us, this isn’t too much of a big deal because it is a two-channel audio file.  You could, if you wanted, mux or combine this directly into the resulting file but I think that for a TV episode, you’re not looking for amazing fidelity (especially considering the people who created this DVD didn’t care either).

Now, I personally use BeLight/BeSweet to convert audio from one format to another format, and I use Nero Digital HE-AAC to encode audio.  For TV episodes, the HE-AAC codec (encoder and decoder) to get my bitrate down to around 96Kbps.  This means that there are more one’s and zero’s left for the video (which can mean a slight increase in quality).  However, you can use any audio codec that you would like.  The format that we’ll be using doesn’t care that much about which one you use ultimately.

Now, open BeLight.  You should be presented with a screen that looks like this.

A simple overall capture of BeLight\'s layout.

All you have to do is go to File -> Add Files and navigate to where that audio file is.  Click on it, and select ‘Open’.  It will show up at the top of the BeLight window.

Once you open the file into BeLight, it shows up in the \'file window\'

Now, to get the audio from where it is to where you want it (quality-wise that is).  First, select the AAC tab.  The first time you open it up it should be pretty close to what we’re looking at first of all.  We’ll run through the settings quickly.

  1. Output Channels – There are two options: ‘Stereo’ and ’5.1′.  Since this is a stereo track, we’ll keep that checked.
  2. Encoder Engine - This should be Nero Digital – CLI.  I’m using this due to the fact that I believe it’s one of the best HE-AAC encoders out there.
  3. Target – I am going to select ‘Bitrate’ due to the fact that I want to precisely control how big this file gets and the best way is for me to set exactly how much space the encoder will use per second of audio.
  4. Quality – After you’ve selected ‘Bitrate’ under target, it should be grayed out.
  5. Bitrate – I’m going to slide this to 96Kbps.  You can slide this to whatever you’d like, but as a warning: it won’t do you any good to select anything above what your source is encoded to.  My stereo file is at 192Kbps.  If I slide it to anything at that or higher, I get a slight hit on quality, and the file is bigger than I started out with.
  6. Options – I am going to select the ‘HE’ profile.  It is a matter of personal taste to some degree.

To the right are some other settings that I will gloss over.

  1. Azid Settings – Dynamic Compression.  I usually leave it selected.  This, again, is personal taste.  If you don’t know what dynamic compression is, take a look here and read up a touch.
  2. SSRC - Shouldn’t have to worry about this.
  3. Boost – You can use this to adjust the volume levels on what you’re converting.  From doom9.org:  “BeSweet offers different ways of increasing the volume of the output, so you won’t have to turn the volume knob on your stereo when watching one of your DVD backups, and wake up all your neighbors if you forget to turn the volume back and putting in an audio CD after watching a movie. One of those options is using Boost.”
  4. BeSweet OTA - This is the best way to get the audio-leveling and delay done.  Sometimes, when you strip or demux the audio from the VOB files, the audio will be offset from the video by some amount of time (measured in milliseconds).  DGIndex has already determined what this amount is, and BeSweet will automagically put the correct value in since it is part of the name of the file.  I also recommend using HybridGain to properly do some good audio normalizing. YMMV however.

Now, there are some advanced settings that you can tweak.  If you’d like to go a bit more indepth about BeLight/BeSweet, head over to the Doom9 forums and take a look at this.  They are a great resource for converting anything to anything.

Now, with everything selected, you can click on ‘Start Processing’ at the bottom of the screen and let BeLight convert the audio with a great deal of happiness.

\

Now, we can close BeLight, and start in on the Video.

Part 4.  Processing the Video

Now we can open up MeGUI and bathe in it’s glory.  Go ahead and double click on MeGUI and let’s get started.

The inital screen of MeGUI\'s conglomeration of open source tools.

First things first, click on Tools -> AviSynth Script Creator (or simply press Ctrl-R).  This is where we will start processing the video and telling MeGUI exactly what we want to do with it.  There are more than a few options, but the basics are fairly simple.

The first step in getting the video in shape...

Now, in the Video window, click on the ‘…’ button across from ‘Video Input’.  From there, we will tell MeGUI where we put the .d2v file at that DGIndex created for us.  This should open up yet another window with a picture of your video in it, kinda like this:

The pop-up window after you select a .d2v file.

Now, back to the window where you opened up your d2v file in.  There are really only three buttons we need to worry about at this juncture (under the ‘Options’ tab).  The first is Input DAR.  If your TV show is 4:3 NTSC, then you should select it if it hasn’t been done already.  If your TV show/Movie is 16:9, then make sure it is selected.

Next is ‘Crop’.  Go ahead and let it try to autocrop before you start tweaking the settings.  It gets close even when it misses which means less work for you.

Finally, you should see that there is a need to resize.  In the frame shown above, the characters seem a bit streched horizontally.  To get it back in ‘square’, all you need to do is click on the ‘Suggest Resolution’ button across from the ‘Resize’ label.  To change the overall resolution of the video, just click on the up/down arrows on the horizontal resolution and MeGUI will automagically adjust the vertical to maintain the aspect ration of the video.

This should be what you are aiming for when your crop and aspect ratio are right.

Next, click on the ‘Filters’ tab.

This is the filters tab...

Go ahead and click on the ‘Analyse’ button on the top right-hand corner of the window.  This will let MeGUI go through the video and try to figure out the best way to handle it (interlaced/non-interlaced, etc.).  This will take a few moments so be patient at let it do its work.

Now, in the first part of the guide, I mentioned that DGIndex told me that my video was Interlaced with the top field being first.  MeGUI has other ideas:

Not 100% on the mark it seems.

This doesn’t sync.  Lets change this to match what DGIndex is.  The source type is ‘Interlaced’.  Next, in ‘Field Order’ select which field is first.  As a heads up: if your source is different, use those settings instead of mine.  This is more about the process than it is about specific settings.  Keep that in mind as we proceed!

This changes our options for ‘Deinterlace’.  I am going to use “Yadif” for this one because this is a cartoon, it won’t improve the quality that dramatically to use one of the more processing-intensive deinterlacers like TDeint (with EDI)*.

* – TDeint with EDI is a great deinterlacer but it stresses even my rig which is not that much of a slouch.

Next is the ‘Filters’ subblock.  The resize filter has alot to do with how the video will end up looking.  For my source, I am going with ‘Bicubic (Neutral)’.  It is a personal favorite of mine for early American animation and it works well.  For things like ’24′ or ‘CSI’ I would probably use ‘Lanczos4′ for something sharper.  Again, it’s all up to personal tastes.

What is next...

At this point, if you feel confident about what you have created (and you should), click on ‘Save’.  It will ask you for a file name so name it something akin to what you’d want the name of your video to be, then hit ‘Save’.

Also, something I have forgotten to mention.  If you want to preview what your AviSynth script (which is what we have been creating up to this point) at any time, click on the ‘Preview AVS Script’ button.

The MeGUI Avisynth Creator window will go away, but the final look of your video will still be open.  Don’t close it.  I keep it as a reminder of what the finished product will look like.  Kinda like a final goal.  Now, we need to tell MeGUI how large this episode will be after it is done so it knows what kind of target it has to hit.

Click on Tools -> Bitrate Calculator (or Ctrl-B) and open up the Bitrate Calculator.

This is where we tell MeGUI what target to hit.

It should have all the necessary information in it before we get started such as time of the film/video, number of frames, and framerate.  If you notice something is not right, it’s probably because you didn’t do your homework.  Double check before you change any of those.

Now, lets start in on the Audio Tab.  Click on ‘Type’ and select the correct type of audio.  Since I’m using HE-AAC, I will be selecting the MP4-AAC option.  This is because I converted the AC3 file into a MP4 file with AAC audio in it.  This will let MeGUI know how much space the audio track will take up.

Next, I will adjust the bitrate to match the bitrate of the audio track, which is 96Kbps.  This should end up yeilding something close to the size of the file you converted (if done correctly).

Now to the Codec block.  I’m using the x264 codec for my video, and the Matroska (MKV) container to hold the audio/video tracks so I’m selecting ‘x264′ and ‘MKV’ respectively.

To the Total Size block.  For a half-hour TV episode, I aim for around 175MB.  For a full hour-long episode, I shoot for exactly twice that (350MB).  This is where you put this in at.  After you select this, you can click on ‘Apply’.  We are almost done with the video part at this point.  If you smoke, just wait a few more minutes.

The final thing is to set the ‘Video Profile’ in the Video Encoding block on the main MeGUI window.  I like to use HQ-Insane on occasion to really get some good quality encoding, but it will break your machine down.  This time, I’m going with HQ-Slow which will yeild good results in not-quite-an-eternity.  YMMV depending on your setup.

After all of this, click on ‘Enqueue’.

Now, click on the ‘Queue’ tab on the main page and it should look something like this:

The last step is \'engage\'...

Now, all that is left for the video processing part is to click on ‘Start’.  This will throw up an error about workers (which I just found out myself).  Click on ‘Yes’ to start a new worker and let MeGUI do some serious video encoding.  You should have some amazing free time ahead of you so take a well deserved break.

Step 5.  Muxing the Audio and Video into the Matroska Container

After MeGUI finished the encoding of your video, you are going to open up ‘mkvmerge GUI’ located on your desktop (if you let mkvtoolnix install it on there.)  This should open up the muxing window.  MKVMerge is not part of MeGUI so you can go ahead and close MeGUI.  This is the final step other than playing the video.

MKVMerge GUI for piecing it together.

Now, you can either drag your audio and video files into the ‘Input file’ box, or you can click on the ‘add’ button to the right and select them to have MKVMerge add them.  Either way works.  I recommend adding both of them, then we will proceed to the next step.

Once you add them, you should see something very similar to this in the ‘Tracks’ box:

What you should see is...

For both the audio (mp4a) and video (avc1) tracks, you can tag information into them.  For the video track, I typed in Episode 101 into the Track name, changed the language to English and did the same for the audio.  The only change for the audio track was to label it stereo.

After you are done with this step, make sure you’ve got a good name for the video in ‘Output filename’ and click on ‘Start Muxing’.  This should take less than a minute.  After this is done, you now have the finished product.

This is a very simple Matroska file.  There are so many things that you can do with the container format such as adding subtitles, chapters, multiple audio streams…almost endless.  Google can help you out with all of these.  This guide shows you how to do steps individually because it will allow you to add your own steps to deal with subtitles et al.

Step 6.  Playing your file

Windows doesn’t have native support for this container. I recommend either downloading the CCCP or installing VLC Player for Windows.  Both will allow you to play your newly created file.

So, the entire process seems very complex, but after you do this a few times, you’ll realize that you have immense control over everything.  It’s a good way to get exactly what you want when you do it this way.  If you feel that this is a bit too complicated, then I recommend using something like Handbrake to get the results you are looking for.

Posted by jamesthebard on 16 May 2008
Tags : , , , , ,

0 Comments

No comments yet. Be the first to leave a comment !
Leave a Comment

Previous Post
«
Next Post
»
Zionn designed by ZENVERSE  |  In conjunction with Reseller Hosting from the #1 Web Hosting Provider - HostNexus.

Bad Behavior has blocked 68 access attempts in the last 7 days.