diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2013-09-02 10:02:40 -0400 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2013-09-02 10:02:40 -0400 |
commit | 74b0fee0c2c5eabb9529481b41cc6581892119ea (patch) | |
tree | 0ef2ca351d4b755d0e3af13bf91b4ba58e1d73fd | |
parent | fafc904d0e8b5a76577f16700c123af684176fdc (diff) | |
download | html5ks-74b0fee0c2c5eabb9529481b41cc6581892119ea.tar.xz html5ks-74b0fee0c2c5eabb9529481b41cc6581892119ea.zip |
Add aencode.sh for Opus and AAC.
-rwxr-xr-x | aencode.sh | 22 | ||||
-rwxr-xr-x | setup.sh | 1 |
2 files changed, 23 insertions, 0 deletions
diff --git a/aencode.sh b/aencode.sh new file mode 100755 index 0000000..63ad918 --- /dev/null +++ b/aencode.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# configure ffmpeg location if not in PATH +FFMPEG=ffmpeg +# configure flags +FFMPEG_FLAGS="" + +set -e + +aencode() { + set -x + [[ -f $4 ]] || ${FFMPEG} -threads ${THREADS} -i "$1" -c:a "$2" $3 ${FFMPEG_FLAGS} "$4" +} + +for d in bgm sfx; do + cd $(dirname $0)/www/dump/${d} + for f in *.ogg; do + OUT=${f%.ogg} + aencode $f libopus "-b:a 48k -vbr on" ${OUT}.opus + aencode $f libfdk_aac -vbr 2 ${OUT}.m4a + done +done @@ -13,3 +13,4 @@ trim www/dump/ui/bt-cf-unchecked.png trim www/dump/ui/bt-cf-checked.png ./iencode.sh +./aencode.sh |