Which I have now found out from some other guy at HB forums.
I saw your post in both places, and chose to answer here.
Which I have now found out from some other guy at HB forums.
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.
I suppose i'm finding it hard to understand why the additional steps (BDinfo and tsmux) are necessary, and why this functionality couldn't be built into HB. Of course this could be more about my understand then how HB handles Blu-ray sources!
Just hoping for it to be as simple as transcoding a DVD with HB, where I only need to rip the disk and HB can do all the rest. Chapter support would also be good, as it's annoying to have titles without it on ATV due to it's limitations in FFwd'ing movies.
I'm sure that is where it will eventually get... at least one of the devs seems to be really interested in bluray encoding.
@echo off
:: tsMuxeR_metaFile.cmd - UPDATED: 01-23-2009
:: This script uses the command line extension Clipboard. This allows the tsMuxeR metadata copied to the clipboard to be accessed via command prompt. It can be found at http://www.steve.org.uk/Software/clipboard/clipboard.zip
:: Until someone can point out a better way to do this, you will need to edit the commands below to create the metafile in the right location with the right filename. In the second FOR command, you need to include the number of tokens "\" in your directory tree to obtain the path to your BD folders and get their names, in my case this would translate to Z:\MyDisk\BatchRip\Iron_Man\. The tokens=1,2,3,4 for my file path. You will also need to specify each token in the output command at the end: %%n\%%o\%%p\%%q\%%q_BD.meta would create the metafile in Z:\MyDisk\BatchRip\Iron_Man\Iron_Man_BD.meta. As you'll notice the BD rip's parent folder token is entered twice to name the file with the BD's name followed by a search string. I know this is complicated, but I'm a Mac guy and I'm surprised I even got this far.
clipboard | for /f "skip=1 eol=# delims=, tokens=2" %%i in ('findstr "BDMV"') do echo %%i | for /f "delims=\ tokens=1,2,3,4" %%n in (%%i) do clipboard > %%n\%%o\%%p\%%q\%%q_BD.meta
:: endscript
:: run_batchtsmuxer.cmd UPDATED: 01-23-2009
:: this script is used in conjunction with batchtsmuxer.cmd
@echo off
:: set your input directory to process the specified meta files
set batchfolder="C:\Documents and Settings\userloginname\My Documents\Batch Rip"
cd /d %batchfolder%
:: set the search string appended to the filename of the meta file ex. "*_BD.meta"
for /r %%i in (*_BD.meta) do set metafile="%%i" & call batchtsmuxer.cmd
:: endscript
:: batchtsmuxer.cmd UPDATED: 01-23-2009
:: place this file in your batch folder
:: this script is used in conjunction with run_batchtsmuxer.cmd
for /f "delims=." %%n in ("%metafile%") do set outfile="%%~dpnn.m2ts"
if exist %outfile% (
echo Output file SKIPPED because it already exists
) else (
echo "Creating %outfile% from %metafile%"
"C:\Program Files\tsMuxeR\tsMuxeR.exe" %metafile% %outfile%
echo " - - - - - - - - - - - - - - - -"
)
:: endscript
---------- BatchEncodeHD.scpt ----------
---------- Updated: 01-22-2009 ----------
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"
---------- Optional Properties ----------
-- Setup Growl Support: Set useGrowl to yes and set the path to the GrowlNotifyLib.scpt.
property useGrowl : no -- If you have growl, set to yes.
property growlTitle : "Batch Encode"
property growlMessage : "Your HandBrake Encodes Are Done!"
property growlLibraryPath : POSIX file "Users/userloginname/Movies/BatchScripts/GrowlNotifyLib.scpt" -- Set the path to the GrowlNotifyLib.scpt.
---------- Encode Script ----------
try
if useGrowl is yes then setGrowl(growlTitle) of (load script growlLibraryPath)
end try
try
createBatchScript()
mkDir(outputPath)
with timeout of 36000 seconds
doScript()
growlMe(growlTitle, growlMessage) of (load script growlLibraryPath)
end timeout
end try
---------- Sub-routines ----------
to doScript()
tell application "Terminal"
activate
tell application "System Events" to keystroke "n" using {command down}
do script batchScript in tab 1 of window 1
repeat until tab 1 of window 1 is not busy
delay 4
end repeat
end tell
end doScript
to setInput(batchFolder)
set inputDir to quoted form of batchFolder
end setInput
to createBatchScript()
set spc to " "
set inputDir to setInput(inputPath)
set logFile to " | tee " & escapePath(outputPath)
set outputDir to quoted form of outputPath
set batchScript to escapePath(scriptPathHD) & spc & inputDir & spc & outputDir & spc & quoted form of searchString & spc & quoted form of encodeSettings & logFile & "/BatchEncodeHD.log" & " wait"
end createBatchScript
on escapePath(outputPath)
set the search_string to " "
set the replacement_string to "\\ "
set AppleScript's text item delimiters to the " "
set the text_item_list to every text item of the outputPath
set AppleScript's text item delimiters to the replacement_string
set the new_item_name to the text_item_list as string
set AppleScript's text item delimiters to ""
set the outputPath to new_item_name
end escapePath
on mkDir(somepath)
do shell script "mkdir -p " & escapePath(somepath)
end mkDir
---------- End Script ---------
#!/bin/sh
# UPDATED: 01-22-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"`
scriptVers="2.0"
scriptPID=$$
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"
toolPath="/Applications/$toolName"
toolTrackArgs="-t 0" # scans dvd title list for all tracks
inputSearchDir=$1 # set input search directory: "~/Movies/Batch Rip"
outputDir="$2" # set output directory: "~/Movies/Batch Encode"
searchString="$3" # Search String: Any .m2ts file name with this search string (located in the input directory) will be processed with HandBrake (Example: "_BD.m2ts").
toolArgs="$4" # set handbrakecli encode settings: "-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"
#############################################################################
# functions
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 " arg1: inputSearchDir=<string> Set input directory to process all m2ts files in it (default: /Movies/BatchRip)"
echo " arg2: outputDir=<string> Set output directory for all output files (default: ~/Movies/BatchEncode)"
echo " arg3: searchString <string> Set the text appended to the filename of the .m2ts/s to encode (default: _BD.m2ts)"
echo " arg4: toolArgs=<string> Set the HandBrakeCLI encode settings (example: -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) "
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
}
makeFullPath()
{
aReturn=""
currentPath=`pwd`
if [ $# -gt 0 ]; then
inPath="$*"
# put full path in front of path if needed
aReturn=`echo "$inPath" | sed -e "s!~!$currentPath/!" -e "s!^./!$currentPath/!" -e "s!^\([^/]\)!$currentPath/\1!" -e "s!^../!$currentPath/../!"`
# remove ../ from path - only goes 4 deep
aReturn=`echo "$aReturn" | sed -e 's!/[^\.^/]*/\.\./!/!g' | sed -e 's!/[^\.^/]*/\.\./!/!g' | sed -e 's!/[^\.^/]*/\.\./!/!g' | sed -e 's!/[^\.^/]*/\.\./!/!g'`
# cleanup by removing //
aReturn=`echo "$aReturn" | sed -e 's!//!/!g'`
fi
echo "$aReturn"
}
#############################################################################
# MAIN SCRIPT
# initialization functions
verifyFindCLTool
# fix input and output paths to be full paths
inputSearchDir=`makeFullPath "$inputSearchDir"`
outputDir=`makeFullPath "$outputDir"`
# 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
# display the basic setup information
echo "$scriptName $scriptVers"
echo " Start: `date`"
echo " Input directory: $inputSearchDir"
echo " Output directory: $outputDir"
echo " Search string: $searchString"
echo " Tool path: $toolPath"
echo " Tool args: $toolArgs"
echo " - - - - - - - - - - - - - - - -"
# 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
# END SCRIPT
Macrazee it isn't all HandBrakes issue, the Mac in general sucks with BD support for playback/ripping so until other Mac programs are sorted for BD Ripping it won't be as ease to rip as DVD's are at the moment.
Yeah, I understand the Mac's issues with Blu-Ray video. But it appears you need to go through a lot of hoops and use third-party software even on the Windows side...
Anyone know?I have a BD with Presentation Graphics, if I encode using HandBrake will they still be included?
Also what are they? I haven't come across them before which is why I ask.
You can skip part 4 on windows and change 6 from SubCleaner to Jubler which I found better personally but it comes down to taste.