VLC Media Player in a Container Image.
Container Image available from:
Container Image Tags:
main
- Latest build of the main
branch.YYYYmmdd-HHMMSS-NNN
- Latest build of the application with date of the build.docker \
run \
--detach \
--volume "$(pwd)":/data \
--user $(id -u):$(id -g) \
quay.io/galexrt/vlc:latest \
YOUR_VLC_FLAGS
The --volume "$(pwd)":/data
will mount your current working directory to /data
inside the container for shorter paths, though this might lead to confusion. Make sure to mount the right path into the container and then use the right path for your flags.
NOTE: If you point to a different directory inside the container than /data
you need to add -e HOME=__YOUR_DIRECTORY__
to the docker run
command.
For some simple examples, checkout the VLC Examples section below.
From Quay.io:
docker pull quay.io/galexrt/vlc:latest
Or from GHCR.io:
docker pull ghcr.io/galexrt/vlc:latest
This will start a HTTP based video stream on port 8080/tcp
.
docker run -d -v "$(pwd)":/data -p 8080:8080 quay.io/galexrt/vlc:latest file:///data/your-video-file.mp4 --sout '#transcode{scodec=none}:http{mux=ffmpeg{mux=flv},dst=:8080/}'
Using VLC to connect to the stream on the container / server IP on port 8080/tcp
will show the video stream.
This will start a RTSP stream on port 8554/udp
.
docker \
run \
--detach \
--volume "$(pwd)":/data \
--user $(id -u):$(id -g) \
--publish 8554:8554/udp \
quay.io/galexrt/vlc:latest \
file:///data/your-video-file.mp4 --sout '#transcode{scodec=none}:rtp{sdp=rtsp://:8554/}'
sout
ReferencesIt is worth to checkout the following VideoLAN wiki pages for more information on the structure and possibilities of the sout
argument: