View Single Post
Old January 3rd, 2010, 01:16 AM   #3
Denaniel
Administrator
 
Denaniel's Avatar
 
Join Date: Dec 2006
Location: Rocinante Ops Deck
Posts: 13,915
Thanks: 114,759
Thanked 425,734 Times in 13,440 Posts
Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+Denaniel 1000000+
Default Instead of importing profiles...

Edit: this post is now out of date. The latest version of MeGUI has many new options and different standard settings and profiles than the older version that was available at the time I wrote this.

I will update this post when I get a chance, but for now it will probably only confuse you.

The final section titled "Using the bitrate calculator" is still useful, however.



If you want to manually tweak the settings yourself to get the best quality (without sacrificing a lot of speed for very little gain), here is a step by step guide. This will show you how to create the "slower" profiles from scratch, and you can learn a little about the MeGUI interface at the same time.

Another thing I've learned since I wrote the first post, is that if your source is standard def (SD), e.g. from a DVD or VHS source, you can lower the Level (from 4.1 to 4.0) and thus avoid using slices, and you can also raise the Max GOP Size. Both of these changes will increase the quality of your encodes.


Setting up Config the 1st time

I'm going to show you how to set up MeGUI to make the highest quality encodes using x264 if your source is standard def, i.e. SD not HD, and you want Blu-ray compliance.

After opening* MeGUI, click on Config to get to the x264 configuration dialog.
(if it opens too slowly, see tip at the bottom of this post)

At bottom left, under Presets, choose "p6 - Slower"

Click box next to "Advanced Settings"

You should now see this:

[IMG]http://i47.*******.com/5fka3n.jpg[/IMG]
We will come back to the Main tab after tweaking the settings on the other tabs. The command line settings in this pic are not what we want; notice how they change each time we switch to a new tab.

Misc tab

Under "Adjustments" click on the button "Preset Settings"

Under "Custom Command Line" type in (or paste) the following:

--aud --nal-hrd

[IMG]http://i48.*******.com/2il0mrm.jpg[/IMG]
Notice that --aud --nal-hrd now appears near the end of the command line, and that many of the other command line settings have changed.

Optional: If you want, you can also enter an adjustment for the aspect ratio. Instead of resizing your 720x576 or 720x480 DVD resolution (or a smaller cropped resolution), you can use any mod 4 resolution (width and height both must be a multiple of the number 4) without resizing if you adjust the "source aspect ratio" (SAR). Here is a chart with the proper setting depending on your source:

PAL 4:3 --sar 12:11
PAL 16:9 --sar 16:11
NTSC 4:3 --sar 10:11
NTSC 16:9 --sar 40:33

Note2: if you are using my profiles and you decide to resize to the proper aspect ratio, then you can simply remove the "--sar xx:yy" (xx and yy are numbers) from the custom command line.


Analysis tab

All of the settings are as they should be.

Optional: If your source is film (or DVD/video that was mastered from a film source, e.g. not shot on video or captured from TV), there is one change you should make on this tab:

Psy-Trellis Strength = 0.20

Otherwise, leave it at zero.

[IMG]http://i46.*******.com/10fxksx.jpg[/IMG]
Psy-Trellis Strength is set to 0.20 for film tuning only, otherwise leave it untouched.


Rate Control tab

VBV Buffer Size = 24000

Leave everything else untouched.

[IMG]http://i49.*******.com/nd2yxd.jpg[/IMG]
--vbv-bufsize 24000 is now included in the command line.

Frame-Type tab

Maximum GOP Size = 48 to 60, set to twice framerate*
Minimum GOP Size = 1
Number of Reference Frames = 6

*If your source is
NTSC (29.97 fps), set Max GOP = 60
PAL (25 fps), set Max GOP = 50
Film (24 fps), set Max GOP = 48
anthing else, set Max GOP = 2x frames per second

Optional: If your source is film (see note under Analysis tab, above) there are two more changes:

Deblocking Strength = -1
Deblocking Threshold = -1

[IMG]http://i47.*******.com/ets36x.jpg[/IMG]
Deblocking Strength and Threshold are set to -1 for film tuning only, otherwise leave them untouched.


Back to Main tab

AVC Level = Level 4

MeGUI won't let you make this Level setting until you set the VBV Max Bitrate to 15000 (which it did automatically when you set the VBV Buffer Size), so we have to come back to the Main tab again.

While you're here, you can change the crf (Const. Quality) setting, or you can elect to do a 2 pass or 3 pass encode.

The default setting is --crf 23, which is fine for some sources, and will probably give you relatively small file sizes. Best quality is --crf 18 (lower number equals higher quality plus larger filesize), but 18 will produce about 2.5 times the file size of 23. Personally, I like --crf 21, which is about 50% larger than 23, but also noticeably better quality in many cases. You can play around with encoding short clips and make your own decision.


Using the bitrate calculator

[IMG]http://i45.*******.com/292qm54.jpg[/IMG]
You set the framerate, the audio type and audio bitrate you want, the container (mkv or mp4), and the file size -- the calculator will then tell you what the average video bitrate should be.

You can use the bitrate calculator (in Tools menu) if you want to target a specific file size (700 MB or 1 GB, for example), and MeGUI will automatically enter the proper bitrate in the command line. The default option in this case is ABR (average bitrate), but I recommend selecting "Automated 2pass" instead, and then click the box marked "Turbo" to speed up the first pass.

[IMG]http://i48.*******.com/2re358n.jpg[/IMG]

It really isn't necessary to do a full quality first pass, because the idea of the first pass is just to get statistics that help the codec to calculate the bitrate distribution during the second pass. The Turbo option changes some of the settings during the first pass to speed it up a lot, but the second pass settings will stay as you set them.


*Tip: if you find that it takes a long time for your script to open in MeGui, you can speed this up by preventing the preview window from opening automatically each time you open a new script (it can always be opened afterward if you like).

You will find this under Options->Settings->Main then deselect “Open preview after AviSynth script selection". (Thanks, Porsche_fan.)
__________________

Please PM me if any of my links are dead.

Don't post your thanks, hit the "Thanks" button!



To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
...
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.
...
To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.

Last edited by Denaniel; January 12th, 2010 at 01:32 AM..
Denaniel is offline   Reply With Quote
The Following 16 Users Say Thank You to Denaniel For This Useful Post: