summaryrefslogtreecommitdiff
path: root/roles/streaming/mpv-headless/templates
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2024-04-09 00:50:51 +0200
committerChristian Pointner <equinox@spreadspace.org>2024-04-09 00:50:51 +0200
commit01f60c5d3e1dabfe14ad1405e61255788b4a8a28 (patch)
treef4d384f1e210a1517bbb7d27a584a1f4197511e4 /roles/streaming/mpv-headless/templates
parentglt-c3voc: use c3voc router as DNS (diff)
streaming/mpv-headless: start mpv with --idle and use json IPC to control it - this way the output resolution is automatically maintained by mpv (aka no video= kernel command line option needed)
Diffstat (limited to 'roles/streaming/mpv-headless/templates')
-rw-r--r--roles/streaming/mpv-headless/templates/ssh-forced.sh.j24
1 files changed, 2 insertions, 2 deletions
diff --git a/roles/streaming/mpv-headless/templates/ssh-forced.sh.j2 b/roles/streaming/mpv-headless/templates/ssh-forced.sh.j2
index 777f0b32..35e9571e 100644
--- a/roles/streaming/mpv-headless/templates/ssh-forced.sh.j2
+++ b/roles/streaming/mpv-headless/templates/ssh-forced.sh.j2
@@ -15,14 +15,14 @@ case "$command" in
play)
media_file="/srv/media/$(basename "$arg")"
if [ -e "$media_file" ]; then
- exec ./play "$media_file"
+ echo '{"command": ["loadfile", "'"$media_file"'"]}' | socat - /var/lib/player/ctl.sock
else
echo "file '$media_file' not found!"
exit 1
fi
;;
stop)
- killall mpv
+ echo '{"command": ["playlist-remove", "current"]}' | socat - /var/lib/player/ctl.sock
;;
*)
echo "invalid command: '$command'"