-
Notifications
You must be signed in to change notification settings - Fork 4
dvd_info
The dvd_info program will display DVD content in human-readable, JSON, or OGM chapter formats.
dvd_info can display summary information about a track, and additionally include more details about the audio streams, the video stream, the chapters, the subtitles, and the cells. It began as a clone of lsdvd, and has since added many features.
By default, dvd_info will display information about all the tracks. This can be overriden with the -t or --track option.
See also man dvd_info
Usage: dvd_info [path] [options] Options: -t, --track <number> Limit to selected track (default: all tracks) -j, --json Display output in JSON format Detailed information: -v, --video Display video streams -a, --audio Display audio streams -s, --subtitles Display VobSub subtitles -c, --chapters Display chapters -d, --cells Display cells -x, --all Display all Narrow results: -l, --longest Track with the longest length -A, --has-audio Track has audio streams -S, --has-subtitles Track has VobSub subtitles -E, --seconds <secs> Track has minimum number of seconds -M, --minutes <mins> Track has minimum number of minutes -T, --vts <number> Track is in video title set number -L, --valid Track is marked as valid Other: -i, --id Display DVD ID only -u, --volume Display DVD UDF volume name only (for ISO or disc) -g, --xchap Display title's chapter format for mkvmerge -h, --help Display these help options --version Display version DVD path can be a device name, a single file, or a directory
You can specify the DVD track to view information about using -t # or --track # argument.
By default, all tracks are displayed.
You can display only the longest track by using -l or --longest. Note that if there are two tracks of the same length, it will display the first one with that length.
dvd_info can print disc information in JSON, for programming languages to use. Use -j or --json as an option.
The ogmtools package includes a program called dvdxchap which will output a list of chapters in a format that can then be used by mkvmerge simple chapter format.
dvd_info provides the same functionality, when the --xchap argument is passed. By default, dvd_info will display the longest track, and the track number can be overriden using the --track argument.
Sample output:
CHAPTER01=00:00:00.000 CHAPTER01NAME=Chapter 01 CHAPTER02=00:21:34.534 CHAPTER02NAME=Chapter 02 CHAPTER03=00:42:02.234 CHAPTER03NAME=Chapter 03 CHAPTER04=01:03:22.234 CHAPTER04NAME=Chapter 04 CHAPTER05=01:24:04.234 CHAPTER05NAME=Chapter 05 CHAPTER06=01:44:49.234 CHAPTER06NAME=Chapter 06
You can then use mkvmerge to import it:
mkvmerge -o dvd_video.mkv --chapters chapters.txt dvd_video.mpg
For shell scripting, dvd_info has two outputs that may be helpful.
Using --id will echo a 32-bit MD5 hash of the IFO and BUP files. This should be a unique enough identifier to keep track of individual discs.
$ dvd_info --id 22c994ce893d541929117817002846ef
Using --volume will display the UDF volume name. Note that this will only work on a complete filesystem, so either the disc directly or an image of the disc. A lot of volume titles will be similar, so it's not recommended to use this as a unique identifier.
$ dvd_info --volume TEENAGE_MUTANT_NINJA_TURTLES