Thursday , 24 April 2014
Home / How To Do ? / How To Encoding, Editing of x264 Mkv movies using Megui, Mkvmerge

How To Encoding, Editing of x264 Mkv movies using Megui, Mkvmerge

This guide to encoding of small size x264 mkv movies.

This guide is splitted into following parts:
1.) Setting up Encoder.
2.) Encoding.
3.) Editing of Output file

1.) Setting up Encoder

You Must Have Following 5 Files First

(a) Megui.
http://sourceforge.net/project/downloading.php?group_id=156112&use_mirror=jaist&filename=megui-0_3_1_1014.exe&a=6828498

(b) Avisynth.
http://sourceforge.net/project/downloading.php?group_id=57023&use_mirror=nchc&filename=Avisynth_258.exe&a=41520716

(c) Profiles.
http://rapidshare.com/files/204452745/allprofiles.rar

(d) Nero AAC Codec.
http://rapidshare.com/files/204452928/neroaac.rar

(e) Mkvtoolnix
http://www.bunkus.org/videotools/mkvtoolnix/win32/mkvtoolnix-unicode-2.5.1-setup.exe

After downloading the above files follow these steps :-

1. Install Megui, Avisynth and Mkvtoolnix.
2. Copy all 3 Nero AAC files to the Megui directory
By Default – “C:\Program Files\megui”
3. Run Megui and update it.

How To Encoding, Editing of x264 Mkv movies using Megui, mkvmerge

4. Close Megui.
5. Copy the “allprofiles” folder and paste it in Megui directory
By Default – “C:\Program Files\megui”. Replace the allprofiles folder with new one.
6. Now run Megui and we are ready to encode some movies.

How To Encoding, Editing of x264 Mkv movies using Megui, mkvmerge

2.) Encoding

1. Run Megui and click file–>open and browse to the source video file.
2. Wait few seconds and then avisynth will open with video previewer (see images below).

How To Encoding, Editing of x264 Mkv movies using Megui, mkvmerge

How To Encoding, Editing of x264 Mkv movies using Megui, mkvmerge

3. Enter the desired output resolution (must be mod 16)*
*mod 16 resolution – Both height and width pixels must be completely divisible be 16. Example – Here 720×352 resolution is used and 720/16 gives remainder as 0 and also 352/16 gives rem. 0 so that means it’s a mod 16 resolution.

4. You can crop screen if u see black borders (in our case we don’t need it).

5. Click Save and you will be returned back to megui.

How To Encoding, Editing of x264 Mkv movies using Megui, mkvmerge

6. In video section select one video profile. For best result use “x264: HQ-Slow” or “x264: Unresteicted 2pass HQ”.
7. Select file format as MKV.
8. In audio section select audio profile”Nero AAC: NDAAC-HE-64kbs”.

How To Encoding, Editing of x264 Mkv movies using Megui, mkvmerge

9. Click config and check the “adaptive bitrate” and set it to @35kbps. You can also use 40kbps but 35kbps works fine for me.

How To Encoding, Editing of x264 Mkv movies using Megui, mkvmerge

10. Click “Auto Encode” and a new window will apppear.
11. Select conatiner as “MKV” and enter “average bitrate” as per the desired output file size (Remember 30minutes = 100mb). When done click “Queue”.
12. Now click “Queue” tab at top of the encoder and click start.

How To Encoding, Editing of x264 Mkv movies using Megui, mkvmerge

13. Now comes the most difficult part which is to wait Mr. Green . Encoding process has now begun so be patient. Time taken in encoding depends on many factors such as your pc’s config., source’s resolution, output file’s resolution, o/p file size etc. On my pc a normal dvdrip takes an average time of 4-5 hours.

3.) Editing

TO EDIT MKV FILES I USE MKVMERGE.

In this section I will tell you how to:-

(a) Add or remove subtitles.
(b) Making samples/splitting a file.
(c) Join files.
(d) How to sync. an mkv file.

but before that run mkvmerge.

(a) Add or remove subtitles.

How To Encoding, Editing of x264 Mkv movies using Megui, mkvmerge

Adding

1. Click “add” button to add a video file.
2. Now simply drag the subtitle file to the “tracks” box in mkvmerge or click the add button to add sutitle file.
3. Select output folder.
4. Click “start muxing”.

Removing

1. Add your file.
2. Uncheck the subtitle file from the “tracks” box.
3. Select output folder.
4. Click “start muxing”.

(b) Making samples/splitting a file

How To Encoding, Editing of x264 Mkv movies using Megui, mkvmerge

1. Add the file that you want to split.
2. Now click “Global” tab at the top of the mkvmerge.
3. Tick the “enable splitting” option and choose the way* you want to split it.
*Take the cursor above each box for more info about it.

(c) Join files

Now if you want to join two or more splitted files into a single file then add the first part of file and then click “append” to add 2nd part and so on you can append a no. of files. Select o/p folder and click “start muxung”.

(d) How to sync. an mkv file.

One common problem that arises after encoding a movie is that sometimes we gets file at output which is a bit out of sync. So, we can make it in sync using mkvmerge.

How To Encoding, Editing of x264 Mkv movies using Megui, mkvmerge

Suppose that in our movie the sound is lagging behind video with duration 300ms. Then,

1. Add your file.
2. In “track” box click on video file and then “Format specific options”. In “Delay (in ms)” enter 150.
3. Now in “track” box click on audio file and then “Format specific options”. In “Delay (in ms)” enter -150.
4. Select o/p folder and click”start muxing”

Similarly, if video is lagging behind audio then in that case we would use -ve value for video file and +ve value for audio file.

This is how process goes:

How To Encoding, Editing of x264 Mkv movies using Megui, mkvmerge

This guide has been tested for as per use on windows xp 32 bit and works. You may face some problems if you are using some other operating system. PLZ give your feedbacks about this tutorial and if you note some mistake then plz reply with it here. If you are confused about something then you can ask about it in this post but plz do not pm me for it

Guide By:coolvinay

3 comments

  1. AVS Video Editor

    I can’t set 720×352. Every time I try to set the program automatically resets back to 352×288. I guess the new version of megui does not allow more than 352×288.

    Can I have your Program files megui folder. Upload and give the link. Thanks for the tutorial.

  2. I have tried these type of files:

    .flv is the fastest type of video file to upload that I know for now.
    .wmv is good too
    .mp4 takes more time than .wmv
    .mpg takes more time compared to .mp4
    .avi could takes an hour or more.

    Any time of video file that you can recommend to me for faster uploading on Youtube?

  3. I’m using Windows movie maker to edit my videos. I want to edit a video I recorded with my iPod, but it’s saying that the file type isn’t supported so it cannot be imported. Is there any way I can convert my iPod videos to a file type that can be imported with Windows Movie Maker for free?

Leave a Reply