view TOOLS/x2mpsub.sh @ 11797:571295c177d2

Fix for Real files with header size == 0x10 (normally is 0x12) (fixes sample file header_size_10.rmvb) Patch by LR <hephooey (at) fastmail (dot) fm>
author rtognimp
date Fri, 16 Jan 2004 22:38:55 +0000
parents 2c6c21e1a1a1
children
line wrap: on
line source

#!/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