Last active
March 4, 2020 07:57
-
-
Save 3ng1n33r/0f6a32977474a64b20888a9d21e68d2f to your computer and use it in GitHub Desktop.
Streamlink docker container to serve stream data through HTTP from youtube, twich, etc.
This file contains 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
FROM python:3-alpine | |
RUN apk add gcc musl-dev --no-cache \ | |
&& pip3 install --no-cache-dir streamlink \ | |
&& apk del gcc musl-dev --no-cache \ | |
&& rm -Rf /tmp/* | |
EXPOSE 8081 | |
ENTRYPOINT ["streamlink", \ | |
"--player-external-http", \ | |
"--player-external-http-port", "8081", \ | |
"--verbose-player", \ | |
"--loglevel", \ | |
"debug" \ | |
] |
This file contains 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
#!/bin/bash | |
url=$1 | |
if [[ -n "$url" ]]; then | |
docker run --rm -p 8081:8081 streamlink $url best | |
else | |
echo "argument error" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment