diff options
author | Yuuta Liang <yuuta@yuuta.moe> | 2023-11-21 17:15:54 -0800 |
---|---|---|
committer | Yuuta Liang <yuuta@yuuta.moe> | 2023-11-21 17:15:54 -0800 |
commit | d1c3cdc9e61de92cfdb2b1ca0d9e7da9b1b80a6a (patch) | |
tree | f0cc26e7da22cf29619faffccd812023fbe5d717 /MPVTV/tv | |
parent | 7b809fc27c767a8cd010d53056ffd5b07c0583b4 (diff) | |
download | gists-master.tar gists-master.tar.gz gists-master.tar.bz2 gists-master.zip |
Diffstat (limited to 'MPVTV/tv')
-rwxr-xr-x | MPVTV/tv | 22 |
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 |