Last active
July 3, 2023 18:11
-
-
Save chiefy/71cc9516dffd936122ffface1aae6ad6 to your computer and use it in GitHub Desktop.
nhlbite and the stream detector script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# This script is a proxy streamer for most of those :cough: sports sites | |
# | |
# You'll need: | |
# * the stream detector Firefox extension (https://addons.mozilla.org/en-US/firefox/addon/hls-stream-detector/) | |
# * VLC | |
# * streamlink (https://streamlink.github.io/install.html) | |
# * bash (linux/osx) | |
# | |
# Usage in The Stream Detector (paste this in options, replace <> required arguments) | |
# <path-to-script>/nhlbite-streamer.sh "%url%" "%referer%" "%useragent%" <chromecast-ip> <vlc-path> | |
# | |
stream_url=${1:?"no stream url sent"} | |
referer=${2:?"no referer sent"} | |
user_agent=${3:?"no user-agent sent"} | |
chromecast_ip=${4:-192.168.1.194} | |
vlc_path=${5:-/Applications/VLC.app/Contents/MacOS/VLC} | |
streamlink \ | |
--http-header "User-Agent=$user_agent" \ | |
--http-header "Referer=$referer" \ | |
--player "$vlc_path --sout=\"#chromecast{ip=$chromecast_ip},mux=hls\"" \ | |
"$stream_url" \ | |
best |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment