summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2024-04-01 18:47:01 +0200
committerChristian Pointner <equinox@spreadspace.org>2024-04-01 18:47:01 +0200
commitf2d31fef4cb7258c12b7db9a6acfb01e6b960d0f (patch)
tree00b3c71a1f589502c519a6cc96b3920e43c7063e
parentthe video= cmdline option for setting the preferred KMS resolution is flawed. (diff)
mpv-headless: go back to using video= kernel command line option
problems with not working mode selection can be worked around using custom edid.bin files...
-rw-r--r--inventory/host_vars/ele-tarvos.yml5
-rw-r--r--roles/streaming/mpv-headless/defaults/main.yml2
-rw-r--r--roles/streaming/mpv-headless/tasks/main.yml13
3 files changed, 5 insertions, 15 deletions
diff --git a/inventory/host_vars/ele-tarvos.yml b/inventory/host_vars/ele-tarvos.yml
index 424ae493..a1f206d4 100644
--- a/inventory/host_vars/ele-tarvos.yml
+++ b/inventory/host_vars/ele-tarvos.yml
@@ -23,7 +23,7 @@ install:
mountpoint: /home
kernel_cmdline:
- "consoleblank=0"
-# - "video=1920x1080@25"
+ - "video=1920x1080@50"
network:
nameservers: "{{ network_zones.lan.dns }}"
@@ -53,5 +53,4 @@ mpv_headless_media_storage:
#mpv_headless_audio_device: "alsa/default"
mpv_headless_audio_device: "alsa/hdmi"
-mpv_headless_video_mode: "1920x1080@25.00"
-#mpv_headless_video_mode: "1920x1080@50"
+mpv_headless_video_mode: "1920x1080@50"
diff --git a/roles/streaming/mpv-headless/defaults/main.yml b/roles/streaming/mpv-headless/defaults/main.yml
index b1ab265f..816fa8e9 100644
--- a/roles/streaming/mpv-headless/defaults/main.yml
+++ b/roles/streaming/mpv-headless/defaults/main.yml
@@ -7,4 +7,4 @@ mpv_headless_video_mode: "1920x1080@50"
mpv_headless_play_script: |
#!/bin/sh
- exec mpv --audio-device='{{ mpv_headless_audio_device }}' --vo=gpu --hwdec=vaapi --gpu-context=drm --drm-mode='{{ mpv_headless_video_mode }}' $@
+ exec mpv --osd-level=0 --audio-device='{{ mpv_headless_audio_device }}' --vo=gpu --hwdec=vaapi --gpu-context=drm --drm-mode='{{ mpv_headless_video_mode }}' $@
diff --git a/roles/streaming/mpv-headless/tasks/main.yml b/roles/streaming/mpv-headless/tasks/main.yml
index 65fa547d..79ca1e31 100644
--- a/roles/streaming/mpv-headless/tasks/main.yml
+++ b/roles/streaming/mpv-headless/tasks/main.yml
@@ -9,7 +9,6 @@
- firmware-linux
- ffmpeg
- mpv
- - libdrm-tests
state: present
- name: install non-free vaapi drivers
@@ -46,16 +45,8 @@
if [ -z "$DISPLAY" ]; then
case $(tty) in
/dev/tty1)
- setterm --clear=all --cursor off
- args=""
- for sysfs_f in /sys/class/drm/card*; do
- if [ -e "$sysfs_f/status" ] && [ $(cat "$sysfs_f/status") = "connected" ]; then
- connector=$(basename $sysfs_f | sed -E 's/card[0-9]+-//')
- args="$args -s $connector:{{ mpv_headless_video_mode | replace('@', '-') }}"
- fi
- done
- exec /usr/bin/modetest -F smpte $args
- #sleep inf
+ setterm --clear=all --cursor off --background black
+ sleep inf
;;
esac
fi