summaryrefslogtreecommitdiff
path: root/bin/encodevideo+loop+stream
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2017-05-18 10:37:25 +0200
committerJonas Smedegaard <dr@jones.dk>2017-05-18 10:37:25 +0200
commitbff6b3ca2fc4f13592a52e3979161c8faa5b7bc0 (patch)
treed24b0122163ab5ed8415258825eb5da76b5fd783 /bin/encodevideo+loop+stream
parent49cd10875fab0e69bfcf4b60f66261629ee96789 (diff)
Move generic functions (almost) to the top.
Diffstat (limited to 'bin/encodevideo+loop+stream')
-rwxr-xr-xbin/encodevideo+loop+stream13
1 files changed, 8 insertions, 5 deletions
diff --git a/bin/encodevideo+loop+stream b/bin/encodevideo+loop+stream
index 64a53cd..a5027e2 100755
--- a/bin/encodevideo+loop+stream
+++ b/bin/encodevideo+loop+stream
@@ -4,6 +4,14 @@ set -e
INPUT=../tmp/omni/show0/earth.yuv
+##
+## generic functions
+##
+# shellcheck disable=SC2048,SC2059
+echo_n() {
+ printf -- "$*"
+}
+
HOST=${1:-morla}
if [ "$HOST" = "$(hostname --short)" ]; then
IP=127.0.0.1
@@ -49,11 +57,6 @@ elif [ $BITS -le 921600 ]; then # 720p → 921600
SPEED_VP8=15
fi
-# shellcheck disable=SC2048,SC2059
-echo_n() {
- printf -- "$*"
-}
-
encode_vp8() { bitrate=$1; speed=$2;
echo_n "-codec:v vp8 -quality realtime -deadline 1000000 -cpu-used $speed \
-b:v $bitrate -minrate $bitrate -maxrate $bitrate \