https://github.com/cremuzzi/docker-mpv
Dockerization of mpv.io. A free, open source, and cross-platform media player. Image available at https://hub.docker.com/r/cremuzzi/mpv/
https://github.com/cremuzzi/docker-mpv
audio-player docker mpv video-player
Last synced: 5 months ago
JSON representation
Dockerization of mpv.io. A free, open source, and cross-platform media player. Image available at https://hub.docker.com/r/cremuzzi/mpv/
- Host: GitHub
- URL: https://github.com/cremuzzi/docker-mpv
- Owner: cremuzzi
- License: gpl-3.0
- Created: 2020-07-14T05:45:42.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-03T14:18:39.000Z (over 1 year ago)
- Last Synced: 2024-11-03T15:22:32.620Z (over 1 year ago)
- Topics: audio-player, docker, mpv, video-player
- Language: Dockerfile
- Homepage: https://hub.docker.com/r/cremuzzi/mpv/
- Size: 25.4 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# How to use this image
## Start an MPV instance
```sh
docker run --rm -i -t \
--device /dev/dri \
--network host \
-e DISPLAY \
-e XDG_RUNTIME_DIR \
-v /etc/machine-id:/etc/machine-id:ro \
-v /run/user/1000/pulse:/run/user/1000/pulse \
-v $HOME/.Xauthority:/home/mpv/.Xauthority \
-v /path/to/your/media/:/home/mpv/media:ro \
cremuzzi/mpv
```
where `/path/to/your/media` is the path on your host with the media files you want to play.
The command above will leave you with an interactive terminal inside the working directory `/home/mpv/media` of the container.
Once you are there, you can just explore the folder and play the media file that you need.
Please notice in the example above that we are mounting a few volumes that allow your container to
connect as a client to your host's pulseaudio and Xorg server.
## yt-dl
This image comes with **yt-dl** installed.
You can play yt-dl supported content via
running this image with command `mpv https://media/url/`.
Eg.:
```sh
docker run --rm -i -t \
--device /dev/dri \
--network host \
-e DISPLAY \
-v /etc/machine-id:/etc/machine-id:ro \
-v /run/user/1000/pulse:/run/user/1000/pulse \
-v $HOME/.Xauthority:/home/mpv/.Xauthority \
cremuzzi/mpv mpv https://media/url/
```
As long as your media url is retrievable by yt-dl then mpv should take care of reproducing it.
## Further reading
For a complete guide on the usage of MPV please visit the official page at [mpv.io/manual/stable/](https://mpv.io/manual/stable/).