mediapi/systemd/mediapi-mpv.service
Jean-Michel Tremblay b8cd65b8ca Initial mediapi: WiFi AP + media browser with HDMI playback control
Raspberry Pi 4 appliance that boots as a WiFi access point and serves a
phone-controlled web app for browsing /localmedia and driving video
playback out the Pi's HDMI port.

- NetworkManager-based AP setup (documented in README)
- Flask app + vanilla HTML/JS single-page UI (Control / Playback modes)
- mpv persistent daemon (DRM/KMS HDMI output) controlled over JSON IPC
- long-lived session-cookie auth
- "keep playing" folder auto-advance, including when started mid-folder
- systemd units for both mpv and the app, autostart on boot

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-05 21:45:57 -04:00

24 lines
485 B
Desktop File

[Unit]
Description=mpv persistent player (DRM/HDMI output, JSON IPC)
After=local-fs.target
[Service]
Type=simple
User=jm
SupplementaryGroups=video render
RuntimeDirectory=mediapi
RuntimeDirectoryMode=0770
ExecStart=/usr/bin/mpv \
--idle=yes \
--input-ipc-server=/run/mediapi/mpv.sock \
--vo=gpu-next --gpu-context=drm \
--hwdec=auto-safe \
--fullscreen \
--no-terminal \
--keep-open=no \
--ao=alsa
Restart=on-failure
RestartSec=2
[Install]
WantedBy=multi-user.target