chiark / gitweb /
bin/nocss: Handy script to inhibit CSS decryption by `libdvdread'.
authorMark Wooding <mdw@distorted.org.uk>
Fri, 25 Mar 2022 11:24:46 +0000 (11:24 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 25 Mar 2022 11:28:16 +0000 (11:28 +0000)
My DVD archive is already decrypted, so CSS is unnecessary; but
`libdvdread' still takes some time -- sometimes a long time -- trying to
`crack' the nonexistent keys, and, on rare occasions, this can actually
result in a failure to read the plain content of the DVD image.

Makefile
bin/nocss [new file with mode: 0755]

index fa021c657f2a6a302f6121c01dbde83be2c03312..4388fe75bb5a023e68b870d9b9f4fd8b66547274 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -229,6 +229,13 @@ DOTLINKS           += .tclshrc .wishrc
 .tclshrc_SRC            = tclshrc
 .wishrc_SRC             = tclshrc
 
+## The `nocss' machinery.
+SCRIPTLINKS            += nocss
+all: $(HOME)/lib/hacks/nocss/libdvdcss.so.2
+$(HOME)/lib/hacks/nocss/libdvdcss.so.2:
+       $(V_AT)mkdir -p $(dir $@)
+       $(call v_tag,TOUCH)touch $@
+
 ## Random scripts.
 SCRIPTLINKS            += mdw-editor mdw-pager
 SCRIPTLINKS            += mdw-conf
diff --git a/bin/nocss b/bin/nocss
new file mode 100755 (executable)
index 0000000..5adc23e
--- /dev/null
+++ b/bin/nocss
@@ -0,0 +1,10 @@
+#! /bin/sh -e
+
+case $# in 0) set -- "$SHELL" ;; esac
+DVDCSS_CACHE=none; export DVDCSS_CACHE
+DVDREAD_NOKEYS=t; export DVDREAD_NOKEYS
+if [ -d "$HOME/lib/hacks/nocss" ]; then
+  LD_LIBRARY_PATH=$HOME/lib/hacks/nocss${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}
+  export LD_LIBRARY_PATH
+fi
+exec "$@"