diff options
author | Jonas Smedegaard <dr@jones.dk> | 2017-05-18 10:37:25 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2017-05-18 10:37:25 +0200 |
commit | bff6b3ca2fc4f13592a52e3979161c8faa5b7bc0 (patch) | |
tree | d24b0122163ab5ed8415258825eb5da76b5fd783 /bin/loop+encode+stream | |
parent | 49cd10875fab0e69bfcf4b60f66261629ee96789 (diff) |
Move generic functions (almost) to the top.
Diffstat (limited to 'bin/loop+encode+stream')
-rwxr-xr-x | bin/loop+encode+stream | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/bin/loop+encode+stream b/bin/loop+encode+stream index ca0b6b9..6e6abb3 100755 --- a/bin/loop+encode+stream +++ b/bin/loop+encode+stream @@ -6,6 +6,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 @@ -55,11 +63,6 @@ elif [ $BITS -le 921600 ]; then # 720p → 921600 SPEED_VP8=15 fi -# shellcheck disable=SC2048,SC2059 -echo_n() { - printf -- "$*" -} - encode_opus() { echo_n "-codec:a libopus -ac $ACHANNELS -ar $AFRAMERATE_OPUS -b:a $ABITRATE_OPUS" } |