How to telling Terminal to run and display the output in Terminal.
If I do the code like but Terminal will not open.
tell application "Terminal"
activate
do shell script HANDBRAKE & " -i 'x264 Unparse: vbv-maxrate=25000:level=4.0:vbv-bufsize=31250' -i " & DISC & "/VIDEO_TS -o " & DEST & DVD & ".mp4" & "&"
end tell
Last login: Tue Jan 16 14:55:03 on ttys000
iMac:~ bob$ /applications/HandBrakeCLI -i 'x264 Unparse: vbv-maxrate=25000:level=4.0:vbv-bufsize=31250' -i /Volumes//VIDEO_TS -o /Users/bob/Movies/video.mp4&
[1] 5529
iMac:~ bob$ [14:55:49] hb_init: starting libhb thread
[14:55:49] thread 700000081000 started ("libhb")
HandBrake 1.0.7 (2017040900) - Darwin x86_64 - https://handbrake.fr
2 CPUs detected
Opening /Volumes//VIDEO_TS...
[14:55:49] CPU: Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz
[14:55:49] - logical processor count: 2
[14:55:49] hb_scan: path=/Volumes//VIDEO_TS, title_index=1
disc.c:274: failed opening UDF image /Volumes//VIDEO_TS
disc.c:352: error opening file BDMV/index.bdmv
disc.c:352: error opening file BDMV/BACKUP/index.bdmv
[14:55:49] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
libdvdread: Can't stat /Volumes//VIDEO_TS
No such file or directory
libdvdread: Could not open /Volumes//VIDEO_TS
libdvdnav: vm: failed to open/read the DVD
[14:55:49] dvd: not a dvd - trying as a stream/file instead
[14:55:49] hb_stream_open: open /Volumes//VIDEO_TS failed
[14:55:49] scan: unrecognized file type
[14:55:49] libhb: scan thread found 0 valid title(s)
No title found.
HandBrake has exited.
If I do the code like but Terminal will not open.
Code:
tell application "Terminal"
do shell 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"
end tell
tell application "Terminal"
activate
do shell script HANDBRAKE & " -i 'x264 Unparse: vbv-maxrate=25000:level=4.0:vbv-bufsize=31250' -i " & DISC & "/VIDEO_TS -o " & DEST & DVD & ".mp4" & "&"
end tell
Code:
-- 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"
end tell
-- Eject the DVD after the rip.
tell application "Finder"
do shell script "drutil eject"
end tell
say DVD & "has been converted. Please give me another disc to rip."
(*
tell application "System Events" to keystroke "w" using {command down}
quit application "Terminal"
*)
Last login: Tue Jan 16 14:55:03 on ttys000
iMac:~ bob$ /applications/HandBrakeCLI -i 'x264 Unparse: vbv-maxrate=25000:level=4.0:vbv-bufsize=31250' -i /Volumes//VIDEO_TS -o /Users/bob/Movies/video.mp4&
[1] 5529
iMac:~ bob$ [14:55:49] hb_init: starting libhb thread
[14:55:49] thread 700000081000 started ("libhb")
HandBrake 1.0.7 (2017040900) - Darwin x86_64 - https://handbrake.fr
2 CPUs detected
Opening /Volumes//VIDEO_TS...
[14:55:49] CPU: Intel(R) Core(TM)2 Duo CPU T7700 @ 2.40GHz
[14:55:49] - logical processor count: 2
[14:55:49] hb_scan: path=/Volumes//VIDEO_TS, title_index=1
disc.c:274: failed opening UDF image /Volumes//VIDEO_TS
disc.c:352: error opening file BDMV/index.bdmv
disc.c:352: error opening file BDMV/BACKUP/index.bdmv
[14:55:49] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 5.0.1
libdvdread: Can't stat /Volumes//VIDEO_TS
No such file or directory
libdvdread: Could not open /Volumes//VIDEO_TS
libdvdnav: vm: failed to open/read the DVD
[14:55:49] dvd: not a dvd - trying as a stream/file instead
[14:55:49] hb_stream_open: open /Volumes//VIDEO_TS failed
[14:55:49] scan: unrecognized file type
[14:55:49] libhb: scan thread found 0 valid title(s)
No title found.
HandBrake has exited.
Last edited: