summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-04-16 13:35:22 +0200
committerJonas Smedegaard <dr@jones.dk>2017-04-16 15:41:43 +0200
commit3fac3065c98c26e97c21d3b4f22819a2cdcf8c38 (patch)
tree24b7dada358309e1649aed3bbe29cb1f2589c387 /bin
parent46ddda9c56187f452b258e45520db0971dd470b4 (diff)
Drop loop: Bogusly treats audio track in main input as video track.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/decode+edit4
-rwxr-xr-xbin/decode+edit+encode5
-rwxr-xr-xbin/decode+edit+encode+stream5
3 files changed, 3 insertions, 11 deletions
diff --git a/bin/decode+edit b/bin/decode+edit
index c81a8f3..9632b6d 100755
--- a/bin/decode+edit
+++ b/bin/decode+edit
@@ -2,8 +2,6 @@
set -e
-ITERATIONS=${1-1}
-
HEIGHT=360
MOVIE=../src/omni/show0/earth.mp4
@@ -15,7 +13,7 @@ mkdir -p $(dirname "$TMPMOVIE")
# + loop-in-filter trick based on http://video.stackexchange.com/a/16933
ffmpeg -threads auto -y \
- -f lavfi -i "movie=filename=$MOVIE:loop=$ITERATIONS, setpts=N/(FRAME_RATE*TB), scale=-1:$HEIGHT" \
+ -i "$MOVIE" \
-i "$LOGO" -filter_complex 'overlay=main_w-overlay_w-20:main_h-overlay_h-20' \
-an \
-f yuv4mpegpipe "$TMPMOVIE"
diff --git a/bin/decode+edit+encode b/bin/decode+edit+encode
index 72ef4cd..79a74d5 100755
--- a/bin/decode+edit+encode
+++ b/bin/decode+edit+encode
@@ -2,8 +2,6 @@
set -e
-ITERATIONS=${1-1} # no looping by default
-
HEIGHT=360
VBITRATE=500000
@@ -15,10 +13,9 @@ TMPMOVIE=../tmp/omni/show0/earth.webm
mkdir -p $(dirname "$TMPMOVIE")
# based on http://www.webmproject.org/docs/encoder-parameters/#real-time-cbr-encoding-and-streaming
-# + loop-in-filter trick based on http://video.stackexchange.com/a/16933
# + scale+watermark trick based on http://stackoverflow.com/a/10937357
ffmpeg -threads auto -y -re \
- -f lavfi -i "movie=filename=$MOVIE:loop=$ITERATIONS, setpts=N/(FRAME_RATE*TB)" \
+ -i "$MOVIE" \
-i "$LOGO" \
-filter_complex \
"[0:v]scale=-1:$HEIGHT[bg];
diff --git a/bin/decode+edit+encode+stream b/bin/decode+edit+encode+stream
index b21eae9..aad9509 100755
--- a/bin/decode+edit+encode+stream
+++ b/bin/decode+edit+encode+stream
@@ -11,8 +11,6 @@ fi
FIRSTPORT=${2:-5002} # even number - next 3 ports used too
-ITERATIONS=${3-0} # endless by default
-
HEIGHT=360
VBITRATE=500000
@@ -20,11 +18,10 @@ MOVIE=../src/omni/show0/earth.mp4
LOGO=../../content/icon_small.png
# based on http://www.webmproject.org/docs/encoder-parameters/#real-time-cbr-encoding-and-streaming
-# + loop-in-filter trick based on http://video.stackexchange.com/a/16933
# + scale+watermark trick based on http://stackoverflow.com/a/10937357
# + Drop frames, aggressively treat as static, and use fastest cpu
ffmpeg -threads auto -re \
- -f lavfi -i "movie=filename=$MOVIE:loop=$ITERATIONS, setpts=N/(FRAME_RATE*TB)" \
+ -i "$MOVIE" \
-i "$LOGO" \
-filter_complex \
"[0:v]scale=-1:$HEIGHT[bg];