summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-04-16 15:07:19 +0200
committerJonas Smedegaard <dr@jones.dk>2017-04-16 15:41:44 +0200
commitb015700e21ffab27cfe33571b30e220188295bc0 (patch)
tree18eb96fb43ba3e327867b8e2c07d9eccbff1a8f5 /bin
parentebf683d88a96bdef264318f3cef165bd17dc6b72 (diff)
Handle audio (or mark as FIXME/TODO where still failing.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/decode+edit2
-rwxr-xr-xbin/decode+edit+encode2
-rwxr-xr-xbin/decode+edit+encode+stream7
-rwxr-xr-xbin/encode+stream7
4 files changed, 17 insertions, 1 deletions
diff --git a/bin/decode+edit b/bin/decode+edit
index 9632b6d..ed4ac8b 100755
--- a/bin/decode+edit
+++ b/bin/decode+edit
@@ -1,5 +1,7 @@
#!/bin/sh
+# FIXME: Handle audio
+
set -e
HEIGHT=360
diff --git a/bin/decode+edit+encode b/bin/decode+edit+encode
index 79a74d5..730b6eb 100755
--- a/bin/decode+edit+encode
+++ b/bin/decode+edit+encode
@@ -1,5 +1,7 @@
#!/bin/sh
+# FIXME: Handle audio
+
set -e
HEIGHT=360
diff --git a/bin/decode+edit+encode+stream b/bin/decode+edit+encode+stream
index aad9509..7f549a0 100755
--- a/bin/decode+edit+encode+stream
+++ b/bin/decode+edit+encode+stream
@@ -11,6 +11,8 @@ fi
FIRSTPORT=${2:-5002} # even number - next 3 ports used too
+ABITRATE=64000
+
HEIGHT=360
VBITRATE=500000
@@ -23,9 +25,12 @@ LOGO=../../content/icon_small.png
ffmpeg -threads auto -re \
-i "$MOVIE" \
-i "$LOGO" \
- -filter_complex \
+ -vf \
"[0:v]scale=-1:$HEIGHT[bg];
[bg][1:v]overlay=main_w-overlay_w-20:main_h-overlay_h-20" \
+ -codec:a libopus -ac 2 -b:a "$ABITRATE" -ar 48000 \
+ -vn \
+ -f rtp "rtp://$IP:$FIRSTPORT?pkt_size=1200" \
-an \
-codec:v vp8 -quality realtime -deadline realtime -cpu-used 15 \
-b:v "$VBITRATE" -minrate "$VBITRATE" -maxrate "$VBITRATE" \
diff --git a/bin/encode+stream b/bin/encode+stream
index 0decf10..9387dcb 100755
--- a/bin/encode+stream
+++ b/bin/encode+stream
@@ -1,5 +1,7 @@
#!/bin/sh
+# TODO: Handle audio from secondary input
+
set -e
HOST=${1:-morla}
@@ -11,6 +13,8 @@ fi
FIRSTPORT=${2:-5002} # even number - next 3 ports used too
+ABITRATE=64000
+
VBITRATE=500000
TMPMOVIE=../tmp/omni/show0/earth.yuv
@@ -19,6 +23,9 @@ TMPMOVIE=../tmp/omni/show0/earth.yuv
# + Drop frames, aggressively treat as static, and use fastest cpu
ffmpeg -threads auto -re \
-stream_loop -1 -i "$TMPMOVIE" \
+ -codec:a libopus -ac 2 -b:a "$ABITRATE" -ar 48000 \
+ -vn \
+ -f rtp "rtp://$IP:$FIRSTPORT?pkt_size=1200" \
-an \
-codec:v vp8 -quality realtime -deadline realtime -cpu-used 15 \
-b:v "$VBITRATE" -minrate "$VBITRATE" -maxrate "$VBITRATE" \