Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Well, Legally copied blu disks arn't legally copied anyway... for that matter.... i'll try setting constant quality for some reason since i downloaded the new handbrake a it still has the old presets this could be my problem
Ah so you are in the US? EU and everywhere else it is legal (I think):D

It does seem that you downloaded these though as I'm sure you would of gone back to the BD if you had ripped them yourself.
 
Yes, i am in the us...... which is the draw back ....damn copyright laws lol... thanks for you guys help though i've tried both ways from a blu ray disk and from a file and was successful on both
cheers
 
By default, "Add picture timing info" and "Continually insert SPS/PPS" were checked. The solution was to uncheck all options for the video stream in tsMuxeR.

This also resulted in HandBrake scanning those files a lot faster, 2-3 seconds (even with DTS).

Jedi, you may be onto something here - un-checking these options does appear to fix "slow scan" HB issue on tsMuxeR processed titles. I am yet to see if this causes any playback artifacts in the resulting M4V files, but so far so good.

Cave Man - this may be something worth updating the original guide with.
 
Personally still waiting for Handbrake to have more blu-ray features added (auto calc of screen ratio, inbuilt downmixing of lossless audio, and a specific ATV HD preset (as it sounds like 59% quality might not always give the desired results).

That said handbrake 0.93 is great and works well, it's just it's the first version to support blu-ray.
 
@Cave Man

I didn't have any issue with my first two encodes: V for Vendetta and Matrix Revolutions. Since I didn't have any problems, I didn't pay attention to what the tsMuxeR options were when I did these.

My next set had some issues. HB v0.9.3 was failing to auto-crop Transformers(True-HD), Master and Commander, Iron Man(True-HD), and The Last Emperor(DTS). They also took an unusually long time to scan. I also ended up with files that were two to three times bigger than the auto-cropped versions. These were all tsMuxeR'd with the 1080p video and main english audio stream through VMware on XP Pro.

Once I uncheck all the video options for the video stream, HB was able to scan and auto-crop the titles just fine.
 
Personally still waiting for Handbrake to have more blu-ray features added (auto calc of screen ratio, inbuilt downmixing of lossless audio, and a specific ATV HD preset (as it sounds like 59% quality might not always give the desired results).

That said handbrake 0.93 is great and works well, it's just it's the first version to support blu-ray.

auto calc of screen ratio
Not sure what you mean by this one. Can you explain what HB isn't doing?

inbuilt downmixing of lossless audio
It can already do this with Bluray sources using SVN code. It reads the AC3 substream included (for compatibility) with the Dolby TrueHD soundtrack... no downmixing necessary. I believe it also works with DTS-MA, but only to DTS (which currently cannot be shoved into the mp4 container).

a specific ATV HD preset
Quite a few of the mods/devs have been using the stock AppleTV preset with CQ 55-57% with very good results.
 
Not something I have tried yet, but seems like there are some extra steps and software other than HB & anydvd that would be needed (unlike for converting a DVD).

Not sure what you mean by this one. Can you explain what HB isn't doing?

Not something I have tried, but assuming from the guides you have to manually tell it the res needed for the ATV, or does it calc how to reduce the res from 1080p to 720p automatically? like it would for a DVD.


It can already do this with Bluray sources using SVN code. It reads the AC3 substream included (for compatibility) with the Dolby TrueHD soundtrack... no downmixing necessary. I believe it also works with DTS-MA, but only to DTS (which currently cannot be shoved into the mp4 container).

Ah, so the AC3 soundtrack is included anyway? can you just select this like for a DVD to? or is seperate software needed to extract it? my understanding is that what TS_muxer is needed for, can this functionality be built into handbrake?


Quite a few of the mods/devs have been using the stock AppleTV preset with CQ 55-57% with very good results.

Is there a setting to stop the max bitrate going over what the ATV can display? a little concerned that an action movie would drop a lot of frames?

Hopefully I am wrong on these points, and will be ordering a Blu-ray drive in the near future :D
 
Not something I have tried yet, but seems like there are some extra steps and software other than HB & anydvd that would be needed (unlike for converting a DVD).



Is there a setting to stop the max bitrate going over what the ATV can display? a little concerned that an action movie would drop a lot of frames?

Hopefully I am wrong on these points, and will be ordering a Blu-ray drive in the near future :D
There are advanced x264 options you can set to "cap" the maximum bitrate, vbv-bufsize and vbv-maxrate, but I haven't found a need for them yet with my current settings.
 
Once I uncheck all the video options for the video stream, HB was able to scan and auto-crop the titles just fine.

OK, for I, Robot:

1. I've finally been able to transcode it by making a .ts file with the unchecked video options.

2. Autocrop did not work in HB, so I have big black bars across the top and bottom and adding to the file size. Bummer.
 
There are advanced x264 options you can set to "cap" the maximum bitrate, vbv-bufsize and vbv-maxrate, but I haven't found a need for them yet with my current settings.

So with an Blu-ray action movie I should expect not to drop many frames with a CQ value of 57%, or the more action in the movie the more you'd tweak that down to say CQ of 55%?

is anyone else seeing many dropped frames in HD action sequences, or is it a small/non-existent issue?
 
What does handbrake lack in terms of Blu-ray functionality?

To ask a better question from those of you with Blu-ray drives, assuming you have Any-DVD HD and handbrake, what functionality does Handbrake lack/do badly in terms of converting from Blu-Ray to Apple-TV?

If the answer is none, or it's perfect I am ordering a drive today :) otherwise it would be interesting to know what improvements are needed and worth waiting for.
 
To ask a better question from those of you with Blu-ray drives, assuming you have Any-DVD HD and handbrake, what functionality does Handbrake lack/do badly in terms of converting from Blu-Ray to Apple-TV?

If the answer is none, or it's perfect I am ordering a drive today :) otherwise it would be interesting to know what improvements are needed and worth waiting for.
No subtitles, VC1 support is poor and from the looks of it the H.264 codec profile is crap Main@L3.1, I don't use all my encodes on Apple TV so I wouldn't mind something higher (Some encodes do look like cow pat tbh unless you go over the top with Bitrates).

Only other thing that is missing from the Mac side is a ripper that rips Blu-ray/HD DVD discs.
 
To ask a better question from those of you with Blu-ray drives, assuming you have Any-DVD HD and handbrake, what functionality does Handbrake lack/do badly in terms of converting from Blu-Ray to Apple-TV?

If the answer is none, or it's perfect I am ordering a drive today :) otherwise it would be interesting to know what improvements are needed and worth waiting for.

Chapter/subtitle support -- I think some preliminary work has been done on this front but nothing close to ready for primetime. BR audio/video codec support has gotten much better since .9.3 was publicly released.

Other than that, you're just limited by what the AppleTV can do.
 
OK, for I, Robot:

1. I've finally been able to transcode it by making a .ts file with the unchecked video options.

2. Autocrop did not work in HB, so I have big black bars across the top and bottom and adding to the file size. Bummer.

Strange. It did the exact opposite for me. After working with more titles, it looks like those options are only available and checked automatically for VC-1. They aren't there for h.264.

Also, I've been running a batch script with iCal to encode the mux'd m2ts's with HB and it is working great. I just encoded 4 titles overnight.

I'll post the shell script if there's any interest.
 
Log in

Yes, post the script. I'm sure some people will want to try it out.

I guess I need to figure out the manual crop on HB. I have the dimensions of the video (1280x544).

While I was trying to figure out my auto-crop issue, I found that HB was detecting the auto-crop correctly on the original m2ts stream (before tsMuxeR). If you scan the stream (-t 0) with HBCLI, it should give you back the numbers to manually set the auto-crop on your mux'd file.
 
Batch Encode m2ts Files

Yes, post the script. I'm sure some people will want to try it out.


Batch Encoding m2ts Files with HandBrakeCLI


Here are the scripts to batch encode m2ts files with HandBrakeCLI.

REQUIREMENTS:
  1. The m2ts files must already be mux'd with tsMuxer (really just to be able to select the right language for the audio tracks and combine branching streams).
  2. The m2ts files you want to convert need to have some sort of a search string to identify them as the files you want to convert (Example: Iron Man_BD.m2ts). The search string will be removed from the resulting m4v. You must also specify this search string (Example: "_BD.m2ts") in the batchEncodeHD.scpt.
  3. In order to execute, you need to set up the input, output and shell script paths in the batchEncodeHD.scpt. (Alternatively, you could execute the HandBrakeCLI-batchHD.sh shell script through terminal, but you have to change the default paths in the shell script.)
  4. I create an iCal alarm to execute the batchEncodeHD.scpt at midnight so when I wake up, Voila! m4v's!
  5. Most of this based on my post ""Automating DVD Backup with FairMount, HandBrake and iTunes"

    I'd suggest looking over the batch encoding with handbrake section if you aren't familiar with this process.
https://forums.macrumors.com/threads/600467/

Happy Encoding!



batchEncodeHD.scpt

Code:
---------- BatchEncodeHD.scpt ----------
---------- Updated: 01/16/09 ----------


global batchScript

---------- Properties ----------

-- Search String: This script's default search string is "_BD.m2ts".  Any .m2ts file name with this search string (located in the input directory) will be processed with HandBrake.
property searchString : "_BD.m2ts"

-- The input directory to process all m2ts files with a specified string appended to the filename. Default path is: ~/Movies/BatchRip.
property inputPath : "~/Movies/BatchRip"

-- The output directory for all output files. Default is: ~/Movies/BatchEncode.
property outputPath : "~/Movies/BatchEncode"

-- The path to your HandBrakeCLI-batchHD.sh script. Default is: ~/Movies/BatchScripts/HandBrakeCLI-batchHD.sh
property scriptPathHD : "~/Movies/BatchScripts/HandBrakeCLI-batchHD.sh"

-- Set your HandBrakeCLI encode settings.  Default is the AppleTV preset, 1280w, with quality set at 57%. For more info in setting parameters, visit http://handbrake.fr and read the CLI Guide Wiki. 
property encodeSettings : "-e x264 -q 0.56 -a 1,1 -E faac,ac3 -B 160,auto -R 48,Auto -6 dpl2,auto -f mp4 -4 -w 1280 -m -x level=30:cabac=0:ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:no-fast-pskip=1:me=umh:subq=7:analyse=all"

---------- Encode Script ----------

try
	createBatchScript()
	with timeout of 36000 seconds
		do shell script batchScript & "wait"
	end timeout
end try

---------- Sub-routines ----------

to createBatchScript()
	set searchName to " --searchString " & searchString
	set inputDir to " --input " & inputPath & "/"
	set outputDir to " --output " & outputPath & "/"
	set endScript to " & echo $!¬
   "
	set batchScript to scriptPath & inputDir & outputDir & searchName & encodeSettings & endScript
end createBatchScript


---------- End Script ---------




HandBrakeCLI-batchHD.sh

Code:
#!/bin/sh

#  UPDATED: 01-16-2009
#  HandBrakeCLI-batchHD.sh is a script to batch execute the HandBrakeCLI specifially for encoding m2ts files to m4v.

#############################################################################
# globals

# const global variables
scriptName=`basename "$0"`
skipDuplicates=1 	# if this option is off,
					# the new output files will overwrite existing files
E_BADARGS=65

# set the global variables to default
toolName="HandBrakeCLI"

# set path to HandBrakeCLI
toolPath="/Applications/$toolName"

# Set your HandBrakeCLI encode settings.  Default is the AppleTV preset, 1280w, with quality set at 57%. For more info in setting parameters, visit http://handbrake.fr and read the CLI Guide Wiki. 
toolArgs="-e x264 -q 0.56 -a 1,1 -E faac,ac3 -B 160,auto -R 48,Auto -6 dpl2,auto -f mp4 -4 -w 1280 -m -x level=30:cabac=0:ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:no-fast-pskip=1:me=umh:subq=7:analyse=all"

# The input directory to process all m2ts files with a specified string appended to the filename. Default path is: ~/Movies/BatchRip.
inputSearchDir="$HOME/Movies/BatchRip"

# The output directory for all output files. Default is: ~/Movies/BatchEncode.
outputDir="$HOME/Movies/BatchEncode"

# Search String: This script's default search string is "_BD.m2ts".  Any .m2ts file name with this search string (located in the input directory) will be processed with HandBrake.
searchString="_BD.m2ts"


#############################################################################
# functions

parseProcessInArgs()
{
	if [ -z "$1" ]; then
		return
	fi
	
	toolArgs=""
	
	while [ ! -z "$1" ]
	do
		case "$1" in
			-i) inputSearchDir=$2
				shift ;;
			--input) inputSearchDir=$2
				shift ;;
			-o) outputDir=$2
				shift ;;
			--output) outputDir=$2
				shift ;;
			--searchString) searchString=$2
				shift ;;
			*) toolArgs="$toolArgs $1" ;;
		esac
		
		shift
	done
}

verifyFindCLTool()
{
	# attempt to find the HandBrakeCLI if the script toolPath is not good
	if [ ! -x "$toolPath" ];
	then
		toolPathTMP=`PATH=.:/Applications:/:/usr/bin:/usr/local/bin:$HOME:$PATH which $toolName | sed '/^[^\/]/d' | sed 's/\S//g'`
		
		if [ ! -z $toolPathTMP ]; then 
			toolPath=$toolPathTMP
		fi
	fi	
}

displayUsageExit()
{
	echo "Usage: $scriptName [options]"
	echo ""
	echo "    -h, --help              Print help"
	echo "    -i, --input <string>    Set input directory to process all DVDs in it (default: /Movies/BatchRip)"
	echo "    -o, --output <string>   Set output directory for all output files (default: ~/Movies/BatchEncode)"
	echo "    --searchString <string>     Set the text appended to the filename of the .m2ts/s to encode (default: _BD.m2ts)"
	
	
	if [ -x "$toolPath" ];
	then
		echo "   $toolName possible options"
		mForkHelp=`$toolPath --help 2>&1`
		mForkHelpPt=`printf "$mForkHelp" | egrep -v '( --input| --output| --help|Syntax: |^$)'`
		printf "$mForkHelpPt\n"
	else
		echo "    The options available to HandBrakeCLI except -o  and -i"
		if [ -e "$toolPath" ];
		then
			echo "    ERROR: $toolName command tool is not setup to execute"
			echo "    ERROR: attempting to use tool at $toolPath"
		else
			echo "    ERROR: $toolName command tool could not be found"
			echo "    ERROR: $toolName can be install in ./ /usr/local/bin/ /usr/bin/ ~/ or /Applications/"
		fi
	fi
	
	echo ""
	
	exit $E_BADARGS
}

#############################################################################
# MAIN SCRIPT

# initialization functions
verifyFindCLTool
parseProcessInArgs $*
# see if the output directory needs to be created
if [ ! -e $outputDir ]; then
	mkdir -p "$outputDir"
fi

# sanity checks
if [[ ! -x $toolPath || ! -d $inputSearchDir || ! -d $outputDir || -z "$toolArgs" ]]; then
	displayUsageExit
fi

# find all the m2ts files in the input directory tree
find "$inputSearchDir" -type f -name "*$searchString" | while read i ; do

# set the bd movie name to output
echo "$i"
dvdName=`basename "$i" $searchString`

# execute handbrakecli and skip output files that already exist.  
if [[ ! -e  $outputDir/"$dvdName".m4v || skipDuplicates -eq 0 ]];
then
	$toolPath -i "$i" -o "$outputDir"/"$dvdName".m4v $toolArgs 	& wait


else
	echo "   Output file SKIPPED because it ALREADY EXISTS" & wait	
fi
done
 
Handbrake

BTW anyone involved in the development of Handbrake, please don't take my comments to mean anything along the lines of "handbrake sucks" because for DVD to ATV (or PSP) encoding it rocks! (not used it for anything else)

As Blu-Ray encoding is new to Handbrake there are bound to be improvements to be made down the line. On that note, are there any details on these? Can't see anything obvious in the trac roadmap.
 
BTW anyone involved in the development of Handbrake, please don't take my comments to mean anything along the lines of "handbrake sucks" because for DVD to ATV (or PSP) encoding it rocks! (not used it for anything else)

As Blu-Ray encoding is new to Handbrake there are bound to be improvements to be made down the line. On that note, are there any details on these? Can't see anything obvious in the trac roadmap.

What exactly are you looking for? x264 is already pretty darn good at handling BR/HD-DVD sources. If you're looking for chapter support, I think there was some initial work done by one of the devs, but nothing close to "working" yet. Besides chapter/subtitle support, I'm not quite sure what else is out there.
 
All I now would like to see if the codec profile be High@L5.1 (Or if Apple TV cannot handle it have the option to change it) as the current one makes some encodes look bad. Other than that everything it does is almost perfect Tweeksy (some kinks I am sure but not come across yet).
 
All I now would like to see if the codec profile be High@L5.1 (Or if Apple TV cannot handle it have the option to change it) as the current one makes some encodes look bad. Other than that everything it does is almost perfect Tweeksy (some kinks I am sure but not come across yet).

That would make the resulting file incompatible with the AppleTV, thus out of scope for this thread.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.