From 491f23cd683ecc4f3b34754ca9932f64ef155ec5 Mon Sep 17 00:00:00 2001 From: Nidan Date: Sat, 14 Jan 2012 13:15:00 +0100 Subject: [PATCH] convert script --- convert.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/convert.sh b/convert.sh index e08c581..9c4a9fb 100755 --- a/convert.sh +++ b/convert.sh @@ -9,5 +9,5 @@ TMPFILE="convert.tmp" ffmpeg -i ${1} -f s16be -ar 16k -ac 1 -acodec pcm_s16be ${TMPFILE} SIZE=$(( $(stat -c "%s" ${TMPFILE}) / 2 )) -echo -ne "\0$(printf %o $(($SIZE % 256)) )\0$(printf %o $(( ($SIZE / 256) % 256)) )\0$(printf %o $(( ($SIZE / 65536) % 256)) )\0$(printf %o $(( ($SIZE / 65536/256) % 256)) )" | cat - ${TMPFILE} > ${2} +echo -ne "\0$(printf %o $(($SIZE % 256)) )\0$(printf %o $(( ($SIZE / 256) % 256)) )\0$(printf %o $(( ($SIZE / 256**2) % 256)) )\0$(printf %o $(( ($SIZE / 256**3) % 256)) )" | cat - ${TMPFILE} > ${2} rm ${TMPFILE}