summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-04-25 11:44:13 +0200
committerJonas Smedegaard <dr@jones.dk>2017-04-25 11:44:13 +0200
commit50bb4d5ccca81c34f0b8f2f2812ca0a037b6bbaa (patch)
treef14015f0a9df2fa1a13ba5321b86055c02a234a1 /bin
parent2c8e08cb32409d5a24043aa728b842377dee10fd (diff)
Add decode+edit+encodeDV (fork of decode+edit+encode).
Diffstat (limited to 'bin')
-rwxr-xr-xbin/decode+edit+encodeDV25
1 files changed, 25 insertions, 0 deletions
diff --git a/bin/decode+edit+encodeDV b/bin/decode+edit+encodeDV
new file mode 100755
index 0000000..a853d81
--- /dev/null
+++ b/bin/decode+edit+encodeDV
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# FIXME: Handle audio
+
+set -e
+
+INPUT=../src/omni/show0/earth.mp4
+LOGO=../../content/icon_small.png
+OUTPUT=../tmp/omni/show0/earth.dv
+
+HEIGHT=360
+VBITRATE=256000
+
+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
+# + Add 1s latency (deadline)
+ffmpeg -hide_banner -threads auto -y \
+ -i "$INPUT" \
+ -i "$LOGO" \
+ -filter_complex \
+ "[0:v]scale=-1:$HEIGHT[bg];
+ [bg][1:v]overlay=main_w-overlay_w-20:main_h-overlay_h-20" \
+ -target pal-dv "$OUTPUT"