Updated 9-18-16
This CL is for the CLI version of HB only. This example allows you to upscale source files (for example oddball small files from youtube), set your custom size in a 16:9 pad, and make the output file Bluray Compliant. See bottom of this post for Bluray Compliant settings in the GUI version. Note: Upscale and padding cannot be done in the GUI version.
I use TMPGEnc Authoring Works 5 to author Bluray's. To be br compliant in AW5 the fps and pad settings must match on all the video's on a single track in your project, therefor some video fps may have to be converted. Depending on the Blu Ray Region you live in (A, B, C) you may have to alter the frame rate to work in your blu ray player from an authored disc. For example, a 25fps video will not play from a Region A authored NTSC Blu Ray disc.
Set pad aka padding. This cannot be done in the GUI version.
Set custom width and height or upscale. Upscale cannot be performed in the GUI version. Also, you must set the Anamorphic type or the --width and --height settings will not work. You can leave out the Custom Anamorphic settings and the padding will be applied to the original W x H.
In this example the original video is 480 x 360 @ 25fps. I raised the W x H by an equal amount and had to convert the fps.
Code: Select all
--custom-anamorphic --width 700 --height 580
I always use constant frame rate. You have to set --rate and --cfr together. Even if I'm not changing the fps I will enter the rate and enable cfr. If you do not set a rate but still turn cfr on, hb does not recognize that you did so and defaults to variable frame rate. Note: I always set a cfr to make it easier to achieve a br complaint file for the authoring software I use (AW5). Other software may work differently and you may be able to leave this section out so it defaults to vfr at the original fps.
When changing framerate I turn off decomb and turn on detelecine. There are no options for detelecine. It's either on <--detelecine> or off <nothing>.
You must specify all of the
--encoder settings below with Level being set to 4.1. You can leave the
--encoder settings out causing hb to default to x264 with it's preset set to medium but you must add
:level=4.1 to the CL after
--encopts. I prefer to use the veryslow preset so I include all the
--encoder settings. You can however set Constant Quality to whatever you like with or without encoder settings. This settings varies depending on the quality of the original and how many clips/movies you want to fit on a single blu ray. The higher the CQ value the lower the quality and file size but the quality of the source greatly effects this. A higher number works well for low quality sources files.
Code: Select all
--encoder x264 --encoder-preset veryslow --encoder-level 4.1 --quality 25
There are other options to make a bluray compliant file and those don't normally change but are contained in the full CL below. This makes a Bluray Complaint file with a converted framerate, upscaled video size, and a 16:9 pad that works in AW5. You can change
:vbv-bufsize and
vbv-maxrate to match files you have that are already br compliant that you do not want to run through hb.
Code: Select all
handbrakecli -i test.mp4 -o test.mkv --pad width=1920:height=1080 --custom-anamorphic --width 700 --height 580 --rate 29.97 --cfr --no-decomb --detelecine --encoder x264 --encoder-preset veryslow --encoder-level 4.1 --quality 25 --encopts bluray-compat=1:vbv-maxrate=40000:vbv-bufsize=30000:keyint=24:open-gop=1:slices=4:colorprim=bt709:transfer=bt709:colormatrix=bt709
The only thing I had to change in AW5 was the Aspect Ratio setting. In the example above, due to the changes I made to W x H, it shows up as "Other (Pixel 853:720)" in AW5. There are a few settings in AW5 you can change to make a video BR Compliant without having to re-render them and Aspect Ratio is one of them. Setting AW5 to 1:1 or 16:9 resolved the problem. Note: AW5 gave me an error saying the max bitrate was wrong until I set the Aspect Ratio properly.
I use VLC to view files. If you have it set to 'Always Fit Window' it somehow knows what the original W x H was and displays it that way. This threw me off for quite a while. If you turn it off you will see the up-scale version.
I've tested this with several movies and video clips and it worked every time in AW5. YMMV.
If you are working with a 1920 x 1080 file and don't need to upscale, you can create a br compliant file by adding the following CL in the GUI version under Video - Extra Options and set everything else through the GUI. You cannot upscale and add padding via the GUI.
Code: Select all
bluray-compat=1:vbv-maxrate=40000:vbv-bufsize=30000:keyint=24:open-gop=1:slices=4
Thanks to everyone who helped with this. I hope it proves to be valuable. If there is any wrong information please let me know and I will correct it.
Shane