From c2d647a3cb3a6d456684bcdce327954214352959 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Tue, 8 Nov 2022 12:00:47 -0500 Subject: Update edit and publish configs, tweak OBS, add Mumble client --- roles/obs/templates/mpv-track | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'roles/obs/templates/mpv-track') diff --git a/roles/obs/templates/mpv-track b/roles/obs/templates/mpv-track index ee359f1..b6d6d67 100755 --- a/roles/obs/templates/mpv-track +++ b/roles/obs/templates/mpv-track @@ -2,4 +2,26 @@ # Run MPV with the output set to the right sink and with an IPC socket # {{ ansible_managed }} -DISPLAY="${DISPLAY:-:{{ item.vnc_id }}}" mpv --input-ipc-server={{ emacsconf_home }}/mpv-socket-{{ emacsconf_id }}-{{ item.id }} --audio-device=pulse/{{ item.id }}-vid --profile={{ emacsconf_id }}-talks $* & +# Update the overlay +FILE=$1 +if [[ ! -f $FILE ]]; then + FILE="/data/emacsconf/assets/stream/emacsconf-2022-$FILE*.webm" +fi +shift +SLUG=$(echo "$FILE" | perl -ne 'if (/^emacsconf-[0-9]*-(.*?)--/) { print $1; } else { print; }') +if [[ -f /data/emacsconf/assets/overlays/$SLUG-other.png ]]; then + echo "Found other overlay for $SLUG, copying" + cp /data/emacsconf/assets/overlays/$SLUG-other.png ~/other.png +else + echo "Could not find /data/emacsconf/assets/overlays/$SLUG-other.png, please override ~/other.png manually" + cp /data/emacsconf/assets/overlays/blank-other.png ~/other.png +fi +if [[ -f /data/emacsconf/assets/overlays/$SLUG-video.png ]]; then + echo "Found video overlay for $SLUG, copying" + cp /data/emacsconf/assets/overlays/$SLUG-video.png ~/video.png +else + echo "Could not find /data/emacsconf/assets/overlays/$SLUG-video.png, override ~/video.png manually" + cp /data/emacsconf/assets/overlays/blank-video.png ~/video.png +fi +# Play the video +DISPLAY="${DISPLAY:-:{{ item.vnc_id }}}" mpv --input-ipc-server={{ emacsconf_home }}/mpv-socket-{{ emacsconf_id }}-{{ item.id }} --audio-device=pulse/{{ item.id }}-vid --profile={{ emacsconf_id }}-talks $FILE $* & -- cgit v1.2.3