Last active
March 4, 2020 08:07
-
-
Save 3ng1n33r/f23d1e67c1a808ccc53ca3a8d8f9e90d to your computer and use it in GitHub Desktop.
Serve stream with VLC from HTTP source
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 alpine:3.8 | |
RUN set -xe \ | |
&& apk add --no-cache vlc | |
RUN addgroup -g 2000 vlc \ | |
&& adduser -D -u 2001 -G vlc vlc | |
EXPOSE 8082 | |
USER vlc | |
ENTRYPOINT ["cvlc"] |
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 --name vlc -p 8082:8082 vlc $url -vvv --no-ts-trust-pcr --ts-seek-percent --http-port 8082 --sout '#standard{access=http,mux=ts}' | |
else | |
echo "argument error" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment