]> git.sesse.net Git - ultimatescore/commitdiff
Add startup script.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 11 Apr 2018 22:36:07 +0000 (00:36 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 11 Apr 2018 22:36:07 +0000 (00:36 +0200)
ultimate.sh [new file with mode: 0755]

diff --git a/ultimate.sh b/ultimate.sh
new file mode 100755 (executable)
index 0000000..8cff519
--- /dev/null
@@ -0,0 +1,47 @@
+#! /bin/bash
+
+if ! [ -d /srv/ultimate/opptak ]; then
+#      sudo mount /dev/sda1 /srv/ultimate
+       sudo mount /dev/disk/by-uuid/5ba6626a-7539-4b43-a9e1-b13243f1abdf /srv/ultimate
+fi
+
+if ! pidof ssh > /dev/null; then
+       echo "Set up SSH forwarding forwarding before running this script:"
+       echo "  ssh -R 9095:127.0.0.1:9095 stream@pannekake.samfundet.no"
+       exit
+fi
+
+# Set up BBR
+for DEV in $( ip link | grep UP | cut -d" " -f2 | cut -d: -f1 | grep -v lo ); do
+       sudo tc qdisc add root dev $DEV fq
+done
+echo bbr | sudo tee /proc/sys/net/ipv4/tcp_congestion_control
+
+# Start the client
+if ! pidof ultimatescore > /dev/null; then
+       urxvt -e /home/sesse/dev/ultimatescore/client/ultimatescore &
+fi
+
+# Start Nageru
+( cd /home/sesse/dev/nageru &&
+ ./nageru \
+       --va-display /dev/dri/renderD129 \
+       -c 6 \
+       -r /srv/ultimate/opptak \
+       -t ultimate.lua \
+       -M ultimate.mapping \
+       --midi-mapping=akai_midimix.midimapping \
+       --http-x264 \
+       --x264-speedcontrol \
+       --x264-tune film \
+       --http-mux mp4 \
+       --http-audio-codec aac \
+       --x264-bitrate 4500 \
+       --http-audio-bitrate 128 \
+       --http-coarse-timebase \
+       --quick-cut-keys \
+       -m 0,2 -m 1,3 -m 2,4 -m 3,5 -m 4,0 -m 5,1
+)
+
+       #--output-card 4 \
+       #--output-buffer-frames 8.0