]>
code.delx.au - transcoding/blob - fix-pal-speedup
3 # Many DVDs released in Australia are sped up from 24fps to 25fps.
4 # This script reverses the procedure, correcting the audio pitch.
5 # The video framerate is adjusted without re-encoding. The audio is slowed and
6 # normalised then re-encoded as mp3.
8 if [ -z "$1" -o -z "$2" ]; then
9 echo "Usage: $0 destdir infile"
18 outfile
="$destdir/$(basename "$infile")"
19 tmpdir
="$(tempfile -p 'pal-')"
22 if [ -f "$outfile" ]; then
23 echo "Not overwriting $outfile"
29 mplayer
-novideo -ao pcm
:file="${tmpdir}/audio.wav" -vo null
"$infile"
30 sox
"${tmpdir}/audio.wav" "${tmpdir}/audio-fixed.wav" speed "${SLOWDOWN}" gain
-n
31 lame
--preset standard
"${tmpdir}/audio-fixed.wav" "${tmpdir}/audio.mp3"
32 mkvmerge
-o "${outfile}" --default-duration "1:${FORCEFPS}fps" --no-audio "$infile" "${tmpdir}/audio.mp3"