aboutsummaryrefslogtreecommitdiff
path: root/MPVTV/tv
diff options
context:
space:
mode:
Diffstat (limited to 'MPVTV/tv')
-rwxr-xr-xMPVTV/tv22
1 files changed, 22 insertions, 0 deletions
diff --git a/MPVTV/tv b/MPVTV/tv
new file mode 100755
index 0000000..2987359
--- /dev/null
+++ b/MPVTV/tv
@@ -0,0 +1,22 @@
+#!/bin/sh
+set -e
+echo -e 'q quit\n< playlist-prev\n> playlist-next\nm cycle mute\n/ add volume -2\n* add volume 2' > /dev/shm/input.conf
+(echo "#EXTM3U" && \
+ curl -s https://xxxyyyzzz/channels.json | \
+ jq -rj 'map("#EXTINF:0," + .name + "\nhttps://xxyyzz/watch/" + .addr + "\n") | join("")' | \
+ tr -d '\r') > /dev/shm/playlist.m3u8
+
+mpv \
+ --playlist=/dev/shm/playlist.m3u8 \
+ --input-conf=/dev/shm/input.conf \
+ --fs \
+ --no-osc \
+ --no-config \
+ --no-input-builtin-bindings \
+ --gpu-context=drm \
+ --vo=gpu \
+ --profile=sw-fast \
+ --drm-mode=4096x2160 \
+ --hwdec=nvdec \
+ --drm-device=/dev/dri/by-path/pci-0000:01:00.0-card \
+ --audio-device=alsa/hdmi:CARD=NVidia