summaryrefslogtreecommitdiff
path: root/bin/encode+stream
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/encode+stream
parentebf683d88a96bdef264318f3cef165bd17dc6b72 (diff)
Handle audio (or mark as FIXME/TODO where still failing.
Diffstat (limited to 'bin/encode+stream')
-rwxr-xr-xbin/encode+stream7
1 files changed, 7 insertions, 0 deletions
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" \