View Single Post
Old January 2nd, 2010, 02:49 AM   #1
Denaniel
Administrator
 
Denaniel's Avatar
 
Join Date: Dec 2006
Location: Rocinante Ops Deck
Posts: 13,914
Thanks: 114,758
Thanked 425,703 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 Encoding DVD to x264 [Updated: 06-12-2010]

Note: I have updated this tutorial to reflect recent changes in MeGUI and x264. Important changes are marked in dark red type.

Links to other posts in this thread:

Custom bluray profiles for MeGUI

How to use the bitrate calculator
(scroll down to the section "Using the bitrate calculator")

How to extract and remux MP4 files
(including how to mux video and audio to create MP4 files)

How to correct faulty aspect ratio

How to encode audio to AAC


I used to encode with XviD. It worked great for me and I had very good results for several years, while constantly tweaking the settings and playing around with the filesize vs. quality balance. I had heard about H.264/x264 but I resisted trying it for a long time because I wanted my rips to be playable on standalone players as well as PC's and Macs. I finally made the switch when I learned about bluray compatible settings in x264, and now I'm a total convert.

There are many free programs available for converting from DVD or Blu-ray to mp4/mkv with x264. You can find a list here:

http://forum.doom9.org/showthread.php?t=129748

I recommend MeGUI for encoding. It is not the simplest option available, but it is fairly easy to use, and works well for beginners and advanced users. You'll find a tutorial and more info here:

http://mewiki.project357.com/wiki/Guides/Basic_Guide
http://forum.doom9.org/showthread.php?t=96032
http://sourceforge.net/projects/megui/

[IMG]http://i50.*******.com/2h6wnco.jpg[/IMG]

This post is not a tutorial on MeGUI -- that has already been done, and the link is above. This is about how to use MeGUI (or any other GUI) to make vids that can be played on standalone Blu-ray players.


How to make your vids bluray compliant

If you are using MeGUI, the latest version comes with a recent patched build of x264, which allows bluray settings that are not available with the regular builds.

If you are going to use MeGUI, then read the next post (#2), and skip the rest of this post.


If you don't use MeGUI...

If you use another GUI to do your encoding, and you want your vids to be bluray compatible, so they will play on the new standalone bluray players, you need to grab a build of x264 that is "patched" with the proper features, and you need to use some very specific settings that are not part of the standard profiles.

You can get the latest patched version of x264 here:

http://x264.fushizen.eu/

Be sure to avoid the "unpatched build" and choose either 32 bit or 64 bit depending on your OS.

You need to put the x264.exe file in whatever folder your GUI places it by default. If you can't find that folder, then do a search for x264.exe and find the original version that came with your GUI. You may need to find the configuration or options menu in your GUI and point the program to wherever you put x264.exe.


Command line options

You need to include the following in your command line, or figure out how to get whatever GUI you are using to include the following settings in the x264 command line:

--level 4.1 --bframes 3 --ref 4 --slices 4 --keyint 24 --min-keyint 2 --vbv-bufsize 30000 --vbv-maxrate 40000 --aud --nal-hrd

Notes:

1. --ref 4 is for 1080p; if your source is 720p or SD (720x576 or smaller), use --ref 6

2. --keyint should be between 24 and 30 if the maximum bitrate is over 1.5 Mbit/sec; set it to equal the framerate. If max bitrate is less than or equal to 1.5 Mbit, you can set --keyint to twice the framerate (48 to 60).

3. if you are using SD material, you can set the level to 4.0 instead of 4.1, and avoid slices. This will improve the quality. But you also have to lower the vbv-maxrate. Here is the new command line for standard def:

--level 4.0 --bframes 3 --ref 6 --keyint 48 --min-keyint 2 --vbv-maxrate 15000 --aud --nal-hrd
[Note: no need to set vbv-bufsize for SD material]

(--keyint 50 for PAL, --keyint 60 for NTSC without decimation; --keyint 48 is for 24 fps film)


About using presets

If you want bluray compatibility, then the slowest preset that really makes sense IMHO is "slower". Because of bluray's requirement of maximum 3 bframes, the benefits of the other settings in "very slow" and "placebo" (without also increasing bframes) are negligible and they will only slow down your encodes for naught.

If you are using one of the faster presets, (medium, fast, faster), then a few of bluray's custom command line settings will overrule the preset needlessly. For example, in the fast preset, the number of reference frames is 2. If you include --ref 6 in the command line, this will slow down the encode dramatically. The --ref 6 is a maximum, which is needed if your preset is "slower", which normally sets --ref 8. But you don't need --ref 6 for "slow" (= --ref 5) or anything faster.

Likewise, --bframes 3 is a maximum that is not needed for "medium" or anything faster.
__________________

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; June 13th, 2010 at 01:02 AM.. Reason: added two new posts and links in first post
Denaniel is online now   Reply With Quote
The Following 32 Users Say Thank You to Denaniel For This Useful Post: