]> code.delx.au - transcoding/commitdiff
Useful scripts for getting DVD and other video info
authorJames Bunton <jamesbunton@delx.net.au>
Sat, 6 Aug 2011 02:55:51 +0000 (12:55 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Sat, 6 Aug 2011 02:55:51 +0000 (12:55 +1000)
dvdidentify [new file with mode: 0755]
midentify [new file with mode: 0755]

diff --git a/dvdidentify b/dvdidentify
new file mode 100755 (executable)
index 0000000..e45fb5f
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+if [ -z "$1" ]; then
+       echo "Usage: $0 dvd-device"
+       exit 1
+fi
+
+mplayer 2> /dev/null \
+       -quiet -ao null -vo null -frames 0 -identify -dvd-device "$1" dvd:// | \
+       grep 'ID_DVD_TITLE_[0-9]*_LENGTH'
+
diff --git a/midentify b/midentify
new file mode 100755 (executable)
index 0000000..150f014
--- /dev/null
+++ b/midentify
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+mplayer -vo null -ao null -frames 0 -identify "$@"
+