Page 1 of 1

What to pass for input to scan DVD Disk with CLI

Posted: Sat Mar 28, 2020 1:48 am
by iansul
Description of problem or question:
Trying to understand what to pass for -i when scanning disk from command line. When I scan with the GUI, the activity log shows it scanning correctly, but when I try to scan with CLI it says "No title found". CLI docs are vague on what to actually pass for input
-i, --input <string> Set input file or device ("source")

I've also tried /dev/disk4 and /dev/rdisk4 none work. :(

Steps to reproduce the problem (If Applicable):

Code: Select all

$ HandBrakeCLI -i "/Volumes/FOO_DVD" -t=0 -v=9
[18:35:51] hb_init: starting libhb thread
[18:35:51] thread 70000d65e000 started ("libhb")
HandBrake 20200318211211-9541cab-master (2020032801) - Darwin x86_64 - https://handbrake.fr
4 CPUs detected
Opening /dev/disk4...
[18:35:51] CPU: Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz
[18:35:51]  - Intel microarchitecture Haswell
[18:35:51]  - logical processor count: 4
[18:35:51] hb_scan: path=/dev/disk4, title_index=0
disc.c:323: failed opening UDF image /dev/disk4
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2585: nav_get_title_list(/dev/disk4/) failed
[18:35:51] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
libdvdread: Could not open /dev/rdisk4 with libdvdcss.
libdvdread: Can't open /dev/rdisk4 for reading
libdvdnav: vm: failed to open/read the DVD
[18:35:51] dvd: not a dvd - trying as a stream/file instead
[18:35:51] hb_stream_open: open /dev/disk4 failed
[18:35:51] scan: unrecognized file type
[18:35:51] libhb: scan thread found 0 valid title(s)
No title found.
HandBrake version (e.g., 1.0.0):
1.3.1



Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):
macOS 10.15.3



HandBrake Activity Log ***required*** (see How-to get an activity log)
This is the log from GUI of successful scan of exact same DVD

Code: Select all

[12:36:18] macgui: ScanCore trying to open a physical disc at: /Volumes/FOO_DVD
[12:36:18] macgui: ScanCore library found for decrypting physical disc
[12:36:18] macgui: ScanCore scanning titles with a duration of 10 seconds or more
[12:36:18] CPU: Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz
[12:36:18]  - Intel microarchitecture Haswell
[12:36:18]  - logical processor count: 4
[12:36:18] hb_scan: path=/Volumes/FOO_DVD, title_index=0
[12:36:18] thread 70000a327000 started ("scan")
disc.c:424: error opening file BDMV/index.bdmv
disc.c:424: error opening file BDMV/BACKUP/index.bdmv
bluray.c:2585: nav_get_title_list(/Volumes/FOO_DVD/) failed
[12:36:18] bd: not a bd - trying as a stream/file instead
libdvdnav: Using dvdnav version 6.0.1
libdvdread: Attempting to use device /dev/rdisk4 mounted on /Volumes/FOO_DVD for CSS authentication
libdvdnav: Can't read name block. Probably not a DVD-ROM device.
libdvdnav: vm: dvd_read_name failed
libdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 1 2 3 4 5 6 7 8

libdvdread: Attempting to retrieve all CSS keys
libdvdread: This can take a _long_ time, please be patient

libdvdread: Get key for /VIDEO_TS/VIDEO_TS.VOB at 0x00000139
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_0.VOB at 0x00000dfe
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_01_1.VOB at 0x000042d0
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_02_1.VOB at 0x001cb2ca
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_03_1.VOB at 0x0022497c
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_04_0.VOB at 0x00229a15
libdvdread: Elapsed time 0
libdvdread: Get key for /VIDEO_TS/VTS_04_1.VOB at 0x0022cee7
libdvdread: Elapsed time 0
libdvdread: Found 4 VTS's
libdvdread: Elapsed time 0
libdvdread: Attempting to use device /dev/rdisk4 mounted on /Volumes/FOO_DVD for CSS authentication
[12:36:21] scan: DVD has 4 title(s)
[12:36:21] scan: scanning title 1
[12:36:21] scan: duration is 01:56:52 (7012433 ms)
[12:36:21] pgc_id: 1, pgn: 1: pgc: 0x7f911fdc78a0
[12:36:21] scan: checking audio 1
[12:36:21] scan: id=0x80bd, lang=English (AC3), 3cc=eng ext=1
[12:36:21] scan: checking subtitle 1
[12:36:21] scan: id=0x20bd, lang=Francais (Wide Screen) [VOBSUB], 3cc=fra ext=1
[12:36:21] scan: id=0x22bd, lang=Francais (Letterbox) [VOBSUB], 3cc=fra ext=1
[12:36:21] scan: checking subtitle 2
[12:36:21] scan: id=0x21bd, lang=español (Wide Screen) [VOBSUB], 3cc=spa ext=1
[12:36:21] scan: id=0x23bd, lang=español (Letterbox) [VOBSUB], 3cc=spa ext=1
[12:36:21] scan: title 1 has 23 chapters
[12:36:21] scan: chap 1, 209800 ms
[12:36:21] scan: chap 2, 111867 ms
[12:36:21] scan: chap 3, 121800 ms
[12:36:21] scan: chap 4, 142833 ms
[12:36:21] scan: chap 5, 385167 ms
[12:36:21] scan: chap 6, 213700 ms
[12:36:21] scan: chap 7, 301633 ms
[12:36:21] scan: chap 8, 264000 ms
[12:36:21] scan: chap 9, 470700 ms
[12:36:21] scan: chap 10, 319199 ms
[12:36:21] scan: chap 11, 332000 ms
[12:36:21] scan: chap 12, 383366 ms
[12:36:21] scan: chap 13, 425166 ms
[12:36:21] scan: chap 14, 318967 ms
[12:36:21] scan: chap 15, 404667 ms
[12:36:21] scan: chap 16, 404034 ms
[12:36:21] scan: chap 17, 335800 ms
[12:36:21] scan: chap 18, 806533 ms
[12:36:21] scan: chap 19, 295367 ms
[12:36:21] scan: chap 20, 291367 ms
[12:36:21] scan: chap 21, 197300 ms
[12:36:21] scan: chap 22, 276667 ms
[12:36:21] scan: chap 23, 500 ms
[12:36:21] scan: aspect = 16:9
[12:36:21] scan: scanning title 2
[12:36:22] scan: duration is 01:56:52 (7012433 ms)
[12:36:22] pgc_id: 1, pgn: 1: pgc: 0x7f911ff6edc0
[12:36:22] scan: checking audio 1
[12:36:22] scan: id=0x80bd, lang=English (AC3), 3cc=eng ext=1
[12:36:22] scan: checking subtitle 1
[12:36:22] scan: id=0x20bd, lang=Francais (4:3) [VOBSUB], 3cc=fra ext=1
[12:36:22] scan: checking subtitle 2
[12:36:22] scan: id=0x21bd, lang=español (4:3) [VOBSUB], 3cc=spa ext=1
[12:36:22] scan: title 2 has 23 chapters
[12:36:22] scan: chap 1, 209800 ms
[12:36:22] scan: chap 2, 111867 ms
[12:36:22] scan: chap 3, 121800 ms
[12:36:22] scan: chap 4, 142833 ms
[12:36:22] scan: chap 5, 385167 ms
[12:36:22] scan: chap 6, 213700 ms
[12:36:22] scan: chap 7, 301633 ms
[12:36:22] scan: chap 8, 264000 ms
[12:36:22] scan: chap 9, 470700 ms
[12:36:22] scan: chap 10, 319199 ms
[12:36:22] scan: chap 11, 332000 ms
[12:36:22] scan: chap 12, 383366 ms
[12:36:22] scan: chap 13, 425166 ms
[12:36:22] scan: chap 14, 318967 ms
[12:36:22] scan: chap 15, 404667 ms
[12:36:22] scan: chap 16, 404034 ms
[12:36:22] scan: chap 17, 335800 ms
[12:36:22] scan: chap 18, 806533 ms
[12:36:22] scan: chap 19, 295367 ms
[12:36:22] scan: chap 20, 291367 ms
[12:36:22] scan: chap 21, 197300 ms
[12:36:22] scan: chap 22, 276667 ms
[12:36:22] scan: chap 23, 500 ms
[12:36:22] scan: aspect = 4:3
[12:36:22] scan: scanning title 3
[12:36:22] scan: duration is 00:24:34 (1474033 ms)
[12:36:22] pgc_id: 1, pgn: 1: pgc: 0x7f911ff6f590
[12:36:22] scan: checking audio 1
[12:36:22] scan: id=0x80bd, lang=Unknown (AC3), 3cc=und ext=0
[12:36:22] scan: title 3 has 2 chapters
[12:36:22] scan: chap 1, 1473535 ms
[12:36:22] scan: chap 2, 500 ms
[12:36:22] scan: aspect = 4:3
[12:36:22] scan: scanning title 4
[12:36:23] scan: duration is 00:01:10 (70500 ms)
[12:36:23] pgc_id: 1, pgn: 1: pgc: 0x7f911ff429d0
[12:36:23] scan: checking audio 1
[12:36:23] scan: id=0x80bd, lang=Unknown (AC3), 3cc=und ext=0
[12:36:23] scan: title 4 has 2 chapters
[12:36:23] scan: chap 1, 70000 ms
[12:36:23] scan: chap 2, 500 ms
[12:36:23] scan: aspect = 4:3
[12:36:23] dvdnav: Searching menus for main feature
[12:36:23] dvdnav: Longest title 1 duration 01:56:52
libdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 1 2 3 4 5 6 7 8
[12:36:29] dvdnav: Found root title 2 duration 01:56:52
[12:36:29] scan: decoding previews for title 1
libdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 1 2 3 4 5 6 7 8
[12:36:30] scan: title angle(s) 1
[12:36:30] scan: preview 1
[12:36:30] fifo_close: trashing 0 buffer(s)
[12:36:30] scan: audio 0x80bd: ac3, rate=48000Hz, bitrate=384000 English (AC3) (5.1 ch) (384 kbps)
[12:36:30] scan: preview 2
[12:36:30] scan: preview 3
[12:36:30] scan: preview 4
[12:36:31] scan: preview 5
[12:36:31] scan: preview 6
[12:36:31] scan: preview 7
[12:36:31] scan: preview 8
[12:36:31] scan: preview 9
[12:36:32] scan: preview 10
[12:36:32] Pulldown detected, setting fps to 23.976
[12:36:32] scan: 10 previews, 720x480, 23.976 fps, autocrop = 0/0/0/2, aspect 16:9, PAR 32:27
[12:36:32] scan: decoding previews for title 2
libdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 1 2 3 4 5 6 7 8
[12:36:32] scan: title angle(s) 1
[12:36:32] scan: preview 1
[12:36:32] fifo_close: trashing 0 buffer(s)
[12:36:32] scan: audio 0x80bd: ac3, rate=48000Hz, bitrate=384000 English (AC3) (5.1 ch) (384 kbps)
[12:36:32] scan: preview 2
[12:36:33] scan: preview 3
[12:36:33] scan: preview 4
[12:36:33] scan: preview 5
[12:36:33] scan: preview 6
[12:36:34] scan: preview 7
[12:36:34] scan: preview 8
[12:36:34] scan: preview 9
[12:36:34] scan: preview 10
[12:36:34] Pulldown detected, setting fps to 23.976
[12:36:34] scan: 10 previews, 720x480, 23.976 fps, autocrop = 0/0/0/2, aspect 4:3, PAR 8:9
[12:36:34] scan: decoding previews for title 3
libdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 1 2 3 4 5 6 7 8
[12:36:34] scan: title angle(s) 1
[12:36:34] scan: preview 1
[12:36:35] fifo_close: trashing 0 buffer(s)
[12:36:35] scan: audio 0x80bd: ac3, rate=48000Hz, bitrate=192000 Unknown (AC3) (2.0 ch) (192 kbps)
[12:36:35] scan: preview 2
[12:36:35] scan: preview 3
[12:36:35] scan: preview 4
[12:36:35] scan: preview 5
[12:36:35] scan: preview 6
[12:36:35] Interlacing detected in preview frame 6
[12:36:35] scan: preview 7
[12:36:36] scan: preview 8
[12:36:36] scan: preview 9
[12:36:36] scan: preview 10
[12:36:36] scan: 10 previews, 720x480, 29.970 fps, autocrop = 0/0/4/0, aspect 4:3, PAR 8:9
[12:36:36] scan: decoding previews for title 4
libdvdnav: DVD disk reports itself with Region mask 0x00000000. Regions: 1 2 3 4 5 6 7 8
[12:36:36] scan: title angle(s) 1
[12:36:36] scan: preview 1
[12:36:36] fifo_close: trashing 0 buffer(s)
[12:36:36] scan: audio 0x80bd: ac3, rate=48000Hz, bitrate=192000 Unknown (AC3) (2.0 ch) (192 kbps)
[12:36:36] scan: preview 2
[12:36:36] scan: preview 3
[12:36:36] scan: preview 4
[12:36:37] scan: preview 5
[12:36:37] scan: preview 6
[12:36:37] scan: preview 7
[12:36:37] scan: preview 8
[12:36:37] scan: preview 9
[12:36:37] scan: preview 10
[12:36:37] Pulldown detected, setting fps to 23.976
[12:36:37] scan: 10 previews, 720x480, 23.976 fps, autocrop = 56/62/2/2, aspect 4:3, PAR 8:9
[12:36:37] Freed 1 buffers of size 1024
[12:36:37] Freed 1 buffers of size 2048
[12:36:37] Freed 2 buffers of size 4096
[12:36:37] Freed 2 buffers of size 1048576
[12:36:37] Freed 1 buffers of size 2097152
[12:36:37] Allocated 4205568 bytes of buffers on this pass and Freed 4205568 bytes, 0 bytes leaked
[12:36:37] thread 70000a327000 exited ("scan")
[12:36:37] thread 70000a327000 joined ("scan")
[12:36:37] libhb: scan thread found 4 valid title(s)
[12:36:37] macgui: ScanCore scan done

Re: What to pass for input to scan DVD Disk with CLI

Posted: Sat Mar 28, 2020 11:12 am
by Ritsuka
Make sure Terminal can access external disks in System Preferences -> Security & Privacy -> Privacy -> Files and Folders.

Re: What to pass for input to scan DVD Disk with CLI

Posted: Sat Mar 28, 2020 5:47 pm
by iansul
That solved it thanks so much! I had tried sudo, but obviously that isn't the panacea it used to be for access.
I'm looking to automate the process of scanning and creating mp4 files. Would you recommend launchctl running on volume mount, or AppleScript Automation that runs my .sh script set to run "When you insert video DVD:"? And what, if anything, do I need to "Give access to external disks" to, so it will work?

Re: What to pass for input to scan DVD Disk with CLI

Posted: Sat Mar 28, 2020 6:11 pm
by mduell
I wouldn't use HB for ripping DVDs.