Skip to content

Instantly share code, notes, and snippets.

@3ng1n33r
Last active March 4, 2020 07:57
Show Gist options
  • Save 3ng1n33r/0f6a32977474a64b20888a9d21e68d2f to your computer and use it in GitHub Desktop.
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.
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" \
]
#!/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