summaryrefslogtreecommitdiffstats
path: root/roles/obs/templates/mpv-track
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2022-11-26 18:55:10 -0500
committerSacha Chua <sacha@sachachua.com>2022-11-26 18:55:10 -0500
commit07d8698dde10d57e58c464f0472b244ec78b8254 (patch)
tree97c8739f6985dadbe4e0611bc2503882487e6337 /roles/obs/templates/mpv-track
parent033117f23aae412f9b5f8d9525d08f2830be7f79 (diff)
downloademacsconf-ansible-07d8698dde10d57e58c464f0472b244ec78b8254.tar.xz
emacsconf-ansible-07d8698dde10d57e58c464f0472b244ec78b8254.zip
remove extra /emacsconf/ from mounts
Diffstat (limited to 'roles/obs/templates/mpv-track')
-rwxr-xr-xroles/obs/templates/mpv-track11
1 files changed, 10 insertions, 1 deletions
diff --git a/roles/obs/templates/mpv-track b/roles/obs/templates/mpv-track
index 77d73bd..db3ea62 100755
--- a/roles/obs/templates/mpv-track
+++ b/roles/obs/templates/mpv-track
@@ -10,7 +10,9 @@ fi
# Update the overlay
FILE=$1
if [[ ! -f $FILE ]]; then
- FILE="/data/emacsconf/assets/stream/emacsconf-2022-$FILE*.webm"
+ LIST=(/data/emacsconf/assets/stream/emacsconf-2022-$FILE*.webm)
+ FILE="${LIST[0]}"
+ BY_SLUG=1
fi
shift
SLUG=$(echo "$FILE" | perl -ne 'if (/^emacsconf-[0-9]*-(.*?)--/) { print $1; } else { print; }')
@@ -28,5 +30,12 @@ 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
+if [[ "x$BY_SLUG" == "x1" ]] && [[ -f /data/emacsconf/assets/intros/$SLUG.webm ]]; then
+ INTRO=/data/emacsconf/assets/intros/$SLUG.webm
+ echo "Found intro $INTRO"
+else
+ echo "Could not find /data/emacsconf/assets/intros/$SLUG.webm"
+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 $* &