SOFTWARES / APPS
MOBILE APPS / GAMES
TV / MOVIE PACKS
Ale Torrenty Team
Free Tutorials & Courses
Encoding Tutorials > Video Encoding Using MeGUI x264 Encoder
Welcome to GloTorrents Forums!
View New Posts
Mark All Read
You are in:
Video Encoding Using MeGUI x264 Encoder
Posted at 2013-09-09 02:59:22(3 years ago )
--How to Setup & Encode Content with MeGUI x264 Encoder--
This tutorial will show you how to use MeGUI to create a MP4 or MKV file for your Media Center collection, from your legally owned DVD collection.
This tutorial will be in 2 parts:
Part 1: Installing,setting up,and configuring everything needed as well as the configuring the encoder itself.
Part 2: The actual encoding process.
Theres alot of info. to cover so lets get started.
Step 1: The Essential Tools & Utilities
1) Shark007's Codec pack (optional)
If you plan on using WMC for playback, and wish to use FFDshow as the decoder, you will need the 64bit add on as well.
However, for the purposes of MeGUI, only the 32bit package is needed.
You do not actually need any 3rd party Codecs such as FFDShow or Sharks codec pack. Both DVD and BluRay can be indexed and encoded with built in codecs.
Extracting BluRay video streams to MKV format is the easiest way to work with them.
You will need Haali splitter for these MKVs but if using Shark007s package, it is included.. You will need it only if you decide not to use this codec package.
This will be needed to create the Avisynth scripts required by the x264 encoder
-Required for MEGUI to funtion properly-
The GUI for the x264 encoder
4) Nero AAC Codec
An excellent quality AAC audio encoder capable of not only stereo AAC, but 5.1 surround as well
-Optional, but highly recommended-
So in short, if you do not wish to mess with any codecs:
You MUST have MeGUI, AVISynth for DVDs.
For BluRay you will need a MKV splitter such as Halli.
For both DVD and BluRay, you can use the file indexer.
Step 2: Installation & Setup
If you opt to use FFDshow or Sharks Codec package, here are some suggestions for setting it up to play nicely with MeGUI. If you do NOT wish to use 3rd party codecs, and are using indexing/MS codec skip this part and move on to step 2.
1) Install Shark007's codecs as you normally would
In the 32bit app, run it as administrator and make sure the following settings are set properly.
A. In the H264, make sure that "use FFDshow" is checked on the left and right Panel
B. In the swap tab, make sure "Use FFDshow"
C. Make sure use FFDshow forWVC1 in Direct Show players
--Swapping WVC1 and h264 allows for FFDshow to decode Bluray streams.
It is not needed for decoding DVD
D. Disable the DivX Splitter
3) If you will be working with BluRay or using MKVs, and you are NOT using Shark007s package:
install Haali Splitter now
4)Run & Update MeGUI
On first run, it will ask to update. Allow it.
When it is done, you will get a few pop ups (profiles) as well as a window asking to restart MeGUI.
-->>> Do NOT restart it just yet <<<--
Right click each of the profile windows and choose "import all"
If asked to overwrite a profile, say yes to all.
After all is imported, select yes to restart MeGUI.
At this point Browse to the Tools Folder in the MeGUI directory.
Create a new folder "Nero" and put the neroAacEnc.exe file in it.
(From the Nero zip package you downloaded in the Win32 folder)
--Step 3: Setup Defaults & External Sources--
1) Set Auto Encode Defaults
At the top click options, and then Settings.
Click the Extra config Tab.
Click the Auto Encode Defaults button.
Here you can set what MeGUI will default to when you use the Auto encode button in the encoder.
I would recommend either the MKV or MP4 container, and the "No target size" option.
This way, the encoder will not care about file size, but use your settings instead.
File size can be targeted however from within the encoder.
Keep in mind, the choice of conatainer is only what MeGUI defaults to when you choose Auto Encode. Even then, it can still be changed at any time.
** MP4 Containers are best used for files that are 4GB or less in size. MKV is best used for anything larger than 4GB.
2) Set External Program Directories
In the External Program Settings, choose the location of neros aac encoder, as well as Besplit if you chose to install it as well.
Step 4: Setting up the Encoder (x264):
Save your settings and return to the Main screen.
1) In the section "Encoder Settings" click the drop down box
a. IF you are dealing with HD content (BluRay or HD Camcorder) as a Source
and you wish to have the option of creating a AVCHD Disc:
choose x264 AVCHD (DVD 5/9)
b. For DVD content, or smaller resolutions, the
x264 Max Compatability (DXVA) is also an excellent choice.
((Keep in mind this will not be AVCHD compatable if for example you decide to upscale your DVD to 720P or 1080P))
The settings for DXVA will be basically the same. the only difference will be 5 ref. frames (if you choose) and a larger Video Buffer.
2) Then click the Config button, just to the right
This AVCHD setting is optimized for AVCHD playback, and primarily HD video.
However, its an excellent base to start from and can be used for DVD encodes as can also be used for DVD if you so choose.
Furthermore, the settings it uses will guarantee a smooth playback from most any source.
Some of the settings you can experiment with & fine tune to your liking.
I will try to highlight them the best I can, and give my own personal recommendation as to what I found works best for me.
Modes: Automated 2 Pass OR Const. Quality are really the only 2 worth looking at here IMHO.
Automated 2 Pass: First pass will make predictions along the way as how best to encoded the video. Where it can lower bit rate, where it needs more etc.
The second Pass will use this info to its advantage to encode the file.
The result will average the bit rate you choose. This is a excellent choice for those who wish to hit a particular file size, or accurately predict the final file size.
Constant Quality does 1 pass, attempting to keep a constant quality throughout with no regard to bitrate or file size.
Lower Values = Higher Quality Higher Values = Lower Quality
This one is faster tha a 2pass encode. the disadvantage is that it impossible to predict how large a file will be be, or what the avergae bit rate will be. Depending on your setting, x264 encodes the video while maintaining a percieved quality throughout.
I would recommend a Automated 2 Pass for most encodes. However, CQ encodes are faster with good quality. The downside is they are very unpredictable on files size from 1 video to another. But over a large number of video the avergae size per video is reasonable.
Constant Quality at a setting if 18-19 gives very good results.
If you want perfect quality you can try as low as 16, but likely not worth the effort.
Personally, I like 17-17.5.
File sizes and bit rates will vary dramatically video to video. But over quite a few encodes, it will start averaging out.
Presets: Adjust the encoder settings to a preset value. I would set this at Very Slow, then make a few tweaks as shown a bit later in this tutorial.
Bitrate: Likely the largest factor in the quality of the final product. In general, higher bit rates = better quality.
Bit Rate Recommendations for 2 Pass Encodes:
DVD-> Absolute Min: 1000 bitrate. Recommended 1500 - 2000
BD/HD-> Absolute MIN: (For 720P) 4000 bitrate (For 1080P) 8000 bitrate
Recommended: (720P) = 5400-6200 (1080P) = 11000 - 14000
Note: These are my own recommendations to produce high quality encodes. You may find lower bitrates are perfectly fine or these are overkill for your specific needs. I/E a mobile device can get by with lower bitrates as flaws will not show as it would on say a 60" Plasma. It depends on the intended use of the final encode. Bit rate can also be dependant on the source. If the source has little action, or lots of close ups etc. More action and busy scenes will require higher bitrates where as lots of closeups and simple scenes need less. Just experiment here, but these are good starting guidelines.
Personally, I would not recommend going below the absolute Min I have suggested, but its your call.
**Do not disable deblocking. Deblocking is a key feature of the x264 encoder and will not function correctly without it.
Higher values will deblock more (softening effect)
Lower Value less,and tend to produce a slightly sharper image.
I like the -1 setting. You can try -2,0, or +1 to see which you like the best.
If you want the target to be Bluray/AVCHD compatable, Ref Frames must be 4.
If you are using the DXVA profile for DVD, I would recommend either
4 or 5 Ref. frames. Any more than 5 will not really help anything.
In the analysis tab there are a couple key settings that not only help in overall quality, but impact encoding time as well. Some, Significantly.
ME RANGE: 16 is usually a good setting for DVD or lower resolution encodes, higher values do not seem help alot for DVD.
24 is a good setting for 720P or 1080P Material, and it does help slightly with HD material.
This setting also has a minor impact on encoding time.
I still prefer a setting of 24 over 16 for HD.
ME Algorithim & Refinement:
These settings have a significant impact on encoding time.
Algorithm should be set to HEX for best results.
Lower values can speed up encoding time, but produce lesser quality encodes.
Higher Values produce better results at a huge impact to encoding time.
Although, the quality improvement is very little to none, and does not justify the additional encoding time IMHO.
For refinement, the lower the setting, the faster the encode will be.
This also affects quality.
I have found a setting of 9 is a good balance between quality and speed. Although still a bit slow.
If your encoding time are too long for your tastes, you can try these settings:
(ME Range:16 -- Algorithm:Multi-Hex -- Subpixil Refinment: Lvl 7)
This will speed up the encoding process but with a loss in image quality. Although, the results should still be good. Personal preference here.
Psy Trellis Strength: Trellis attempts to sharpen the image a bit more than what Trellis already does. For the most part, Ive had good luck with a setting of .6 for HD content and .4 for DVD content. But in some causes it will cause holoing or ringing.
Safe bet is leave it at 0. The improvement isnt that much anyway.
No FastPskip Fast Pskip help decrease encoding time. It does however, occasionly produce some blocky results because of it.
I recommend not using Fast Pskip. Check it to disable it.
Its impact on encode time is minor.
Threads Input: leave this set to 0 (which is auto). MeGUI will assign the proper threads it needs. Messing with this will only produce negative results and will not speed anything up.
Slow First Pass: As mentioned earlier, in a 2 pass encode the encoder makes predictions, and determines the optimal way to encode a particular video.
It then uses the information collected, to make better desicions in the encoding process of Pass 2.
Slow first Pass means just that. It will take just as long to make a 1st pass as it does to make the second.
For example, if we have a 60min video.
Lets assume the 1st pass takes 1hr to complete. The second pass will as well.
This leaves a 2hr encoding time.
If this option is off, the 1st pass will take approx. 1/2 as long as the 2nd.
1st pass 30min, Second pass 1hr = 1 hr 30min encode time.
A slow 1st Pass will produce better results than a faster 1st pass. But its hardly noticeable.
Considering the impact on encoding time VS results, my opinion its best left off.
Your call here.
Please note the Custom Command Line. These are overides for any settings changed, to enforce AVCHD compatability.
If you wish to remove them and use all of your own settings, make & save a new custom profile.
Some of these settings you may wish to experiment with, and see what you like the best.
If you make changes to the original profile, you may wish to create your own custom profile rather than overwriting the original. In fact, I would recommend you do so.
At the bottom of the x264 Config. Window, you see a dropdown box labeled "Presets"
Click the NEW button the the right, and name your profile what ever you choose. This will then create a new profile with your desired settings and save it, keeping the original intact.
Please Note: If your content is HD content, and you have any plans on creating a AVCHD disc later (as a back up) it is extremley important certain key settings remain intact.
In the Misc Tab, these key settings are entered in the section "Custom Comand Line"
As you can see, settings such as Reference Frames, Key Int., and buffer size will override any setting you change in the encoder. This is done to keep the encode AVCHD compatable.
If you delete all thats in the Custom Command Line, any setting you specifically set will be used instead for these values.
Thats the basics of the x264 settings, and setting it up for use with FFDshow.
Now to encode something ...
Last edited by
on 2013-09-09 03:06:41
-- His Excellency --
Posted at 2013-09-09 03:07:51(3 years ago )
To be continued...
-- His Excellency --
Posted at 2013-09-09 05:55:19(3 years ago )
Location: United Kingdom
Thanks a lot very helpful but Handbrake is the best...
Posted at 2013-09-09 07:12:50(3 years ago )
Posted at 2013-09-09 08:31:53(3 years ago )
Great tutorial m8 thanks..
Posted at 2013-09-09 11:42:19(3 years ago )
Best 1 thanks!
Good Luck GLT!
Posted at 2014-01-21 18:53:23(3 years ago )
It's a pirates life for me
Posted at 2014-01-21 19:05:07(3 years ago )
Location: United Kingdom
Posted at 2014-01-22 02:52:18(3 years ago )
please, give a tutorial for multiple queue
Posted at 2014-01-22 06:37:01(3 years ago )
Thanks great tut...
Posted at 2014-01-22 16:36:01(3 years ago )
Posted at 2014-01-22 19:12:02(3 years ago )
Location: Hong Kong
Neroextreme its same just add the items you want to encode the settings will remain same but by my point of view if you are trying to encode a movie try to encode one by one this will be a good encode instead of adding on more queue.
Posted at 2014-09-22 07:15:28(2 years ago )
Thanks Great Tutorial
Posted at 2014-09-22 07:33:38(2 years ago )
I will finish this tutorial soon! I forgot all about it.. thanks for bringing it up...
-- His Excellency --
Posted at 2014-09-22 10:06:59(2 years ago )
Feel Free To PM Me !!!
Location: Gates of Hell
Thanks for the help.
Posted at 2014-09-28 01:11:22(2 years ago )
Posted at 2016-06-23 04:45:25(1 year ago )
Location: Hong Kong
Thanks again m8 nice thread, helped me alot, when i forget something behind, encoding is jiss lil complicate for me, but jiss a go through of this thread cleared me all thing +1, by the way need lil updation, nothing else...
Last edited by
on 2016-06-24 17:32:48
You are not permitted to post in this forum.
GloDLS - Page generated in 0.211149 -
DMCA Removal Request