summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2013-09-02 14:34:17 -0400
committerAlex Xu <alex_y_xu@yahoo.ca>2013-09-02 14:34:17 -0400
commitb9adb183fccdc38dc329cb6e27b2a674b6803a81 (patch)
tree713210d19da1ea1584b364a9242c849f081c7c59
parentd2332a3761af9e340a780d7fc70780efd2cc66c7 (diff)
downloadhtml5ks-b9adb183fccdc38dc329cb6e27b2a674b6803a81.tar.xz
html5ks-b9adb183fccdc38dc329cb6e27b2a674b6803a81.zip
Revert "never overwrite"
This reverts commit 6b67321bf566aa03611e8476f7ca3e9920b6b64c.
-rwxr-xr-xaencode.sh6
-rwxr-xr-xvencode.sh8
2 files changed, 7 insertions, 7 deletions
diff --git a/aencode.sh b/aencode.sh
index 11e04bf..af101be 100755
--- a/aencode.sh
+++ b/aencode.sh
@@ -17,9 +17,9 @@ for d in bgm sfx; do
pushd $(dirname $0)/www/dump/${d}
for f in *.ogg; do
OUT=${f%.ogg}
- [[ -f ${OUT}.wav ]] || ffmpeg -i $f -c:a pcm_s16le ${OUT}.wav
- [[ -f ${OUT}.opus ]] || opusenc --bitrate 64 ${OUT}.wav ${OUT}.opus
- [[ -f ${OUT}.m4a ]] || ffmpeg -i ${OUT}.wav -c:a libfdk_aac -vbr 2 ${OUT}.m4a
+ ffmpeg -y -i $f -c:a pcm_s16le ${OUT}.wav
+ opusenc --bitrate 64 ${OUT}.wav ${OUT}.opus
+ ffmpeg -n -i ${OUT}.wav -c:a libfdk_aac -vbr 2 ${OUT}.m4a || true
done
popd
done
diff --git a/vencode.sh b/vencode.sh
index aeaed79..472fc06 100755
--- a/vencode.sh
+++ b/vencode.sh
@@ -11,13 +11,13 @@ cd $(dirname $0)/www/dump/video
ffmpeg() {
set -x
- command ${FFMPEG} -threads ${THREADS} ${FFMPEG_FLAGS} "$@"
+ command ${FFMPEG} -n -threads ${THREADS} ${FFMPEG_FLAGS} "$@"
set +x
}
for f in *.mkv; do
OUT=${f%.mkv}
- [[ -f ${OUT}.mp4 ]] || ffmpeg -i $f -c:v libx264 -preset slower -tune animation -c:a libfdk_aac ${OUT}.mp4
- [[ -f ${OUT}.webm ]] || ffmpeg -i $f -c:v libvpx -crf 15 -b:v 1M -c:a copy ${OUT}.webm
- [[ -f ${OUT}.ogv ]] || ffmpeg -i $f -c:v libtheora -qscale:v 6 -c:a copy ${OUT}.ogv
+ ffmpeg -i $f -c:v libx264 -preset slower -tune animation -c:a libfdk_aac ${OUT}.mp4
+ ffmpeg -i $f -c:v libvpx -crf 15 -b:v 1M -c:a copy ${OUT}.webm
+ ffmpeg -i $f -c:v libtheora -qscale:v 6 -c:a copy ${OUT}.ogv
done