Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bob5731

macrumors regular
Original poster
Jun 27, 2008
120
1
I managed to get something working in applescript, but the problem is that it didn't display any type of status. I can see that it's running, but I can't tell where in the queue the handbrakeCLI currently is. So how to add a display progress bar to the applescript?

Code:
-- Find the title of the DVD

set DVD to do shell script "mount | grep read-only | awk -F' ' '{print $3}' | awk -F'/' '{print $3}'"

-- Tell the script where to send the Movies while ripping
set DEST to "/Users/bob/Movies/video"

-- Just some necessary variables to make the disc eject
set VOL to "/Volumes/"
set DISC to VOL & DVD
set EXPORT to "dvdbackup -i " & DISC & "-I >> " & DEST & DISC & ".txt"

-- Tell the script where your HandBrakeCLI executable file is.
set HANDBRAKE to "/applications/HandBrakeCLI"

-- Rip command.
do shell script HANDBRAKE & " -i 'x264 Unparse: vbv-maxrate=25000:level=4.0:vbv-bufsize=31250' -i " & DISC & "/VIDEO_TS -o " & DEST & DVD & ".mp4" --keep-display-aspect --decomb

-- Eject the DVD after the rip.
tell application "Finder"
do shell script "drutil eject"
end tell

--Change the change the file's destination folder to the final destination of your movies
do shell script "mv " & DEST & DVD & ".m4v /Users/bob/Movies/"

-- Again, this is only useful if you need to be specific on the title to rip.
do shell script "rm " & DEST & DISC & ".txt"

-- Just an auditory indication that you're ready to rip another DVD.
say DVD & "has been converted. Please give me another disc to rip."
 
Last edited:
I fixed it for ripping for now

It will not use

Code:
--Change the change the file's destination folder to the final destination of your movies
do shell script "mv " & DEST & DVD & ".m4v /Users/bob/my video/"

-- Again, this is only useful if you need to be specific on the title to rip.
do shell script "rm " & DEST & DISC & ".txt"

-- Just an auditory indication that you're ready to rip another DVD.
say DVD & "has been converted. Please give me another disc to rip."
 
Last edited:
I got something to work. But It only makes a video that is not the full movie.

Code:
-- Find the title of the DVD
set DVD to do shell script "mount | grep read-only | awk -F' ' '{print $3}' | awk -F'/' '{print $3}'"

-- Tell the script where to send the Movies while ripping
set DEST to "/Users/bob/Movies/video"

-- Just some necessary variables to make the disc eject
set VOL to "/Volumes/"
set DISC to VOL & DVD

(*
set EXPORT to "dvdbackup -i " & DISC & "-I >> " & DEST & DISC & ".txt"
*)

-- Tell the script where your HandBrakeCLI executable file is.
set HANDBRAKE to "/applications/HandBrakeCLI"

activate application "Terminal"
tell application "Terminal"
  do script HANDBRAKE & " -i 'x264 Unparse: vbv-maxrate=25000:level=4.0:vbv-bufsize=31250' -i " & DISC & "/VIDEO_TS -o " & DEST & DVD & ".mp4" & "&" --loose-anamorphic --keep-display-aspect -e x264 -q 17 -b 1800 -r 29.97" 
  activate
end tell

-- Eject the DVD after the rip.
tell application "Finder"
  do shell script "drutil eject"
  say DVD & "has been converted. Please give me another disc to rip."
end tell

--tell application "System Events" to keystroke "w" using {command down}
--quit application "Terminal"
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.