summaryrefslogtreecommitdiff
path: root/bin/decode+edit+encode
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-05-16 14:11:52 +0200
committerJonas Smedegaard <dr@jones.dk>2017-05-16 14:12:24 +0200
commit5919275dde112187c5aeedeb7b4a76de8a7eb3dd (patch)
treeff0ab343c2ea65adfd5bb585ae2d6f09e6349e49 /bin/decode+edit+encode
parent3fe329a251c3b2dae13d3cc9663da231f5f49db4 (diff)
Introduce variables SPEED_VPX SPEED_H264.
Diffstat (limited to 'bin/decode+edit+encode')
-rwxr-xr-xbin/decode+edit+encode4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/decode+edit+encode b/bin/decode+edit+encode
index 421dc4d..1983b54 100755
--- a/bin/decode+edit+encode
+++ b/bin/decode+edit+encode
@@ -10,6 +10,8 @@ OUTPUT=../tmp/omni/show0/earth.webm
HEIGHT=360
+SPEED_VPX=4
+
# inspired by Apple HLS recommendations
if [ $HEIGHT -le 234 ]; then VBITRATE=145000;
elif [ $HEIGHT -le 270 ]; then VBITRATE=365000;
@@ -32,7 +34,7 @@ ffmpeg -hide_banner -threads auto -y -re \
[bg][1:v]overlay=main_w-overlay_w-20:main_h-overlay_h-20[v]" \
-map '[v]' \
-pix_fmt yuv420p \
- -codec:v vp8 -quality realtime -deadline 1000000 -cpu-used 4 \
+ -codec:v vp8 -quality realtime -deadline 1000000 -cpu-used "$SPEED_VPX" \
-b:v "$VBITRATE" -minrate "$VBITRATE" -maxrate "$VBITRATE" \
-undershoot-pct 95 -bufsize $((6000*VBITRATE/1000)) -rc_init_occupancy $((4000*VBITRATE/1000)) \
-max-intra-rate 0 \