From: James Bunton Date: Mon, 12 May 2014 14:25:41 +0000 (+1000) Subject: fix-pal-speedup: default to /var/tmp instead of /tmp (tmpfs) X-Git-Url: https://code.delx.au/transcoding/commitdiff_plain/98fa85aa71088f8025d8f17366fe2a0468cb1fc3 fix-pal-speedup: default to /var/tmp instead of /tmp (tmpfs) --- diff --git a/fix-pal-speedup b/fix-pal-speedup index 3ac096e..5e6f8d4 100755 --- a/fix-pal-speedup +++ b/fix-pal-speedup @@ -3,7 +3,7 @@ # Many DVDs released in Australia are sped up from 24fps to 25fps. # This script reverses the procedure, correcting the audio pitch. # The video framerate is adjusted without re-encoding. The audio is slowed and -# normalised then re-encoded as mp3. +# volume normalised then re-encoded as mp3. if [ -z "$1" -o -z "$2" ]; then echo "Usage: $0 destdir infile [infile ...]" @@ -18,8 +18,6 @@ shift for infile in "$@"; do outfile="$destdir/$(basename "$infile")" - tmpdir="$(tempfile -p 'pal-')" - rm "$tmpdir" if [ -f "$outfile" ]; then echo "Not overwriting $outfile" @@ -27,7 +25,7 @@ for infile in "$@"; do fi set -x - mkdir "$tmpdir" + tmpdir="$(mktemp -d "${TMPDIR:-/var/tmp}/pal-XXXXXXXX")" mplayer -novideo -ao pcm:file="${tmpdir}/audio.wav" -vo null "$infile" sox "${tmpdir}/audio.wav" "${tmpdir}/audio-fixed.wav" speed "${SLOWDOWN}" gain -n lame --preset standard "${tmpdir}/audio-fixed.wav" "${tmpdir}/audio.mp3"