BD/AVCHD Compliant h264 Output / Presets

Archive of historical feature requests.
Please use the GitHub link above to report issues.
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: BD/AVCHD Compliant h264 Output / Presets

Post by mduell »

Shane wrote:@mduell: Here's the problem. I live in NTSC land (23.97, 24, and 29.97 only). If I want to take a video from my Panasonic camera and burn it to blu ray, I have to convert it from it's native 25fps to 29.97fps.
The whole NTSC vs PAL notion is entirely outdated; I'd be amazed if you could buy a BR player that could play NTSC but not PAL.

We're not in an analog world anymore, and products are made for the global market, there's no reason to convert the framerate for BR.
Shane
Novice
Posts: 57
Joined: Thu Aug 25, 2016 2:47 am

Re: BD/AVCHD Compliant h264 Output / Presets

Post by Shane »

mduell wrote:
Shane wrote:@mduell: Here's the problem. I live in NTSC land (23.97, 24, and 29.97 only). If I want to take a video from my Panasonic camera and burn it to blu ray, I have to convert it from it's native 25fps to 29.97fps.
The whole NTSC vs PAL notion is entirely outdated; I'd be amazed if you could buy a BR player that could play NTSC but not PAL.

We're not in an analog world anymore, and products are made for the global market, there's no reason to convert the framerate for BR.
Well, be prepare to be amazed then.

NTSC (Region A) Blu Ray players are locked to only play back certain frame rates, 25fps is not one of them. If you want to take a 25fps video and burn it to an authored blu ray and play it in a Region A (NTSC) player, you must convert it to 23.97, 24, or 29.97 fps.

Read up on it.
Shane
Novice
Posts: 57
Joined: Thu Aug 25, 2016 2:47 am

Re: BD/AVCHD Compliant h264 Output / Presets

Post by Shane »

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.

Code: Select all

--pad width=1920:height=1080
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.

Code: Select all

--rate 29.97 --cfr
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>.

Code: Select all

--no-decomb --detelecine
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
Last edited by Shane on Sun Sep 18, 2016 5:39 pm, edited 13 times in total.
mduell
Veteran User
Posts: 8198
Joined: Sat Apr 21, 2007 8:54 pm

Re: BD/AVCHD Compliant h264 Output / Presets

Post by mduell »

Shane wrote:Well, be prepare to be amazed then.

NTSC (Region A) Blu Ray players are locked to only play back certain frame rates, 25fps is not one of them. If you want to take a 25fps video and burn it to an authored blu ray and play it in a Region A (NTSC) player, you must convert it to 23.97, 24, or 29.97 fps.

Read up on it.
https://forums.adobe.com/thread/1485805 suggests we're both wrong: a number of players will play any framerate, but some crap ones on the US market will not play 25fps.

Also discs you author yourself should be region-free, not region-locked.
Shane
Novice
Posts: 57
Joined: Thu Aug 25, 2016 2:47 am

Re: BD/AVCHD Compliant h264 Output / Presets

Post by Shane »

mduell wrote:
Shane wrote:Well, be prepare to be amazed then.

NTSC (Region A) Blu Ray players are locked to only play back certain frame rates, 25fps is not one of them. If you want to take a 25fps video and burn it to an authored blu ray and play it in a Region A (NTSC) player, you must convert it to 23.97, 24, or 29.97 fps.

Read up on it.
https://forums.adobe.com/thread/1485805 suggests we're both wrong: a number of players will play any framerate, but some crap ones on the US market will not play 25fps.

Also discs you author yourself should be region-free, not region-locked.
There is no U.S. (Region A) player that will play a 25fps commercial blu ray unless the player has been unlocked by a third party which voids the warranty. There have been rare instances where some have slipped through the cracks but they are always corrected by firmware updates. That's why you should never do firmware updates unless something is completely broken.

You cannot buy a Region Free player directly from a manufacturer. Even Oppo doesn't do it, but you can get an RS232 adapter on eBay that plugs in to the back of them from an anonymous source (n.n.w.w.) that unlocks them and corrects the frame rate speed. Not all Region Free players will play a disc that has a 25fps encoded file. The cheap ones will just display a black screen.

Every player will play any fps file you throw at it via the usb port or even burned to a UDF 2.50 file system disc. Where the lock down comes is when playing a commercial disc or a disc you author yourself that contains a 25fps file.

You can specify a region in AW5, but I don't know if it encodes the region if that makes sense. When I start a project I have to select NTSC or PAL. It throws all kinds of red flags if I throw a 25fps file in an NTSC project. I've tried. I've even used region free software that re-authors ripped files for you and they never work in my player when I use my 25fps rip. The menu's load, but when I click play the screen goes black.

I'm a huge horror movie fan and there are a lot of them we can't get here that were made here, but they can get them in Europe for some odd reason. Some of them are 23.97 and work fine when ripped, some are 25 and won't play for love or money from an authored disc yet play perfectly fine from a usb drive or an unauthored UDF 2.50 file system disc.

It's all one big scam if you ask me.
Post Reply