summaryrefslogtreecommitdiff
path: root/bin/decode+edit+encode
diff options
context:
space:
mode:
Diffstat (limited to 'bin/decode+edit+encode')
-rwxr-xr-xbin/decode+edit+encode15
1 files changed, 7 insertions, 8 deletions
diff --git a/bin/decode+edit+encode b/bin/decode+edit+encode
index ac0ab7c..82bbc88 100755
--- a/bin/decode+edit+encode
+++ b/bin/decode+edit+encode
@@ -4,20 +4,19 @@
set -e
-HEIGHT=360
-VBITRATE=500000
-
-MOVIE=../src/omni/show0/earth.mp4
+INPUT=../src/omni/show0/earth.mp4
LOGO=../../content/icon_small.png
+OUTPUT=../tmp/omni/show0/earth.webm
-TMPMOVIE=../tmp/omni/show0/earth.webm
+HEIGHT=360
+VBITRATE=500000
-mkdir -p $(dirname "$TMPMOVIE")
+mkdir -p $(dirname "$OUTPUT")
# based on http://www.webmproject.org/docs/encoder-parameters/#real-time-cbr-encoding-and-streaming
# + scale+watermark trick based on http://stackoverflow.com/a/10937357
ffmpeg -threads auto -y -re \
- -i "$MOVIE" \
+ -i "$INPUT" \
-i "$LOGO" \
-filter_complex \
"[0:v]scale=-1:$HEIGHT[bg];
@@ -29,4 +28,4 @@ ffmpeg -threads auto -y -re \
-undershoot-pct 95 -bufsize $((6000*VBITRATE/1000)) -rc_init_occupancy $((4000*VBITRATE/1000)) \
-max-intra-rate 0 \
-qmin 4 -qmax 56 \
- -f webm "$TMPMOVIE"
+ -f webm "$OUTPUT"