changeset 2241:2c6c21e1a1a1

converts all subtitles in . to mpsub format
author gabucino
date Wed, 17 Oct 2001 18:07:40 +0000
parents 5d476d03e2b3
children 09c01ef6a27d
files TOOLS/x2mpsub.sh
diffstat 1 files changed, 20 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TOOLS/x2mpsub.sh	Wed Oct 17 18:07:40 2001 +0000
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# This script converts the subtitles in the current directory into
+# MPsub format (into ./converted-subtitles/*)
+#
+# Gabucino. No warranty. :)
+#
+
+TMP="x2mpsub-$RANDOM"
+mkdir "$TMP"
+touch "$TMP/$TMP"
+
+for x in *; do
+    echo "Converting $x"
+    mplayer "$TMP/$TMP" -sub "$x" -dumpmpsub -quiet > /dev/null 2> /dev/null
+    mv dump.mpsub "$TMP/$x"
+done
+
+rm "$TMP/$TMP"
+mv "$TMP" converted-subtitles