If this is your first time here please read our FAQ and Rules pages. They have some useful information that will get us all off on the right foot. More details on our policies, especially our Own the Source rule are available here. If you do not understand any of these rules send a private message to one of our staff for further details.

JULY 2018 FEOTM - Every month we ask the community to vote on their Favorite Fanedit of the Month. To view the nominees and vote visit this thread.

Captain Khajiit's Quick Guide to Encoding a BD via the Command-line
#1
This is a very short guide devoted to answering a single question:

How do I encode a BD via the command-line?

Assuming 1920*1080p@23.976fps input, I do it like this.

Code:
"x264.exe" --pass 1 --bitrate XXXXX --bluray-compat --level 4.1 --preset veryslow  --tune film --keyint 24 --sar 1:1 --slices 4 --vbv-bufsize 30000 --vbv-maxrate 40000 --b-pyramid none --weightp 0 --colorprim bt709 --transfer bt709 --colormatrix bt709 --merange 24 --stats ".stats" --output NUL "whatever.avs"
"x264.exe" --pass 2 --bitrate XXXXX --bluray-compat --level 4.1 --preset veryslow  --tune film --keyint 24 --sar 1:1 --slices 4 --vbv-bufsize 30000 --vbv-maxrate 40000 --b-pyramid none --weightp 0 --colorprim bt709 --transfer bt709 --colormatrix bt709 --merange 24 --stats ".stats" --output "whatever.264" "whatever.avs"

Feed your rendered video to x264 via AviSynth.  (My decoding guide has instructions for writing a basic script.) Use a bitrate calculator to determine the average bitrate.

Closing GOPs and setting b-pyramid to none and weightp to 0 are measures that promote compatibility with older chip-sets (and can help with fussy authoring programs) but are not strictly required by the BD spec, which looks like shon3i's excellent post here. If you are encoding anything other than 1920*1080p@23.976fps, I suggest that you follow the command-lines given on this site but adjust them to include the three compatibility measures given above (i.e. by adding --b-pyramid none and --weightp 0 and removing --open-gop in order to close the GOPs).


Tools

x264
AviSynth (I always recommend the latest non-MT version.)
Bitrate Calculator

I always use a 32-bit workflow because the 32-bit versions of tools are usually more up to date, but you can use a 64-bit workflow if you like.  N.B.  You must use like with like i.e. you cannot use the 32-bit version of AviSynth with the 64-bit of x264 (and vice versa).  If in doubt, keep everything 32-bit and you will not go wrong.

N.B. I do not intend to turn this into a thread about using or troubleshooting the various GUIs that are available (e.g. MeGUI).  Please start separate threads in you want to discuss those.

N.B. Questions about colorspace conversions and levels issues are beyond the scope of this guide.
Non sum qualis eram.

Captain Khajiit's Basic Guide to Decoding Video and Audio
Captain Khajiit's Quick Guide to Encoding a BD via the Command-line
Captain Khajiit's Basic Guide to Encoding with HCenc

For tech support, PM me (politely) or use the @+username function: I rarely read through threads these days.
Reply
#2
FAQ

reserved
Non sum qualis eram.

Captain Khajiit's Basic Guide to Decoding Video and Audio
Captain Khajiit's Quick Guide to Encoding a BD via the Command-line
Captain Khajiit's Basic Guide to Encoding with HCenc

For tech support, PM me (politely) or use the @+username function: I rarely read through threads these days.
Reply
#3
Fastastic, thanks for making this thread
--------------------------: My Fanedits :--------------------------
Because You Were Home (the Strangers)

-------------------------: Consecutions :-------------------------
Reply
#4
For blu-ray authoring in DVDarchitect, I would like to recommend changing:

"--vbv-maxrate 40000"

to

"--vbv-maxrate 38000"

When using your settings, or GeminiGod's settings in the other thread, DVDarchitect would always want to recompress my video tracks. No combination of open/closed gop, bpyramid, weightp, or a number of other iterations with other settings I tried made any difference. BUT lowering this maxrate by a marginal amount made it work.


My very poor guess as to why this may be the case is that if the video alone is using the maxbitrate, then once DVDarchitect adds in the audio, the new video/audio combination may exceed the bluray spec limit. So this lowers the max by an amount that allows the audio to be added in, and still remain below the 40k limit.

Whether this is intended, a bug, a coincidence, or I'm just completely wrong, I cannot say.

But it works. DVDarchitect does not require recompressing the video track with this lower vbv-maxrate.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)