Run yt-dlp
inside a container.
Lightweight, non-root, container image with yt-dlp
and recommended dependencies ffmpeg
and ffprobe
.
- This image is updated everytime a new version of
yt-dlp
is launched. - Lightweight Base Image:
python:alpine
. - yt-dlp version:
2024.05.27
. - ffmpeg version:
6.1
. - Run as a non-root user.
This image can be used with Docker and Podman. You will need one of these installed.
docker run --rm -u $(id -u):$(id -g) -v $(pwd):/storage kgtm/yt-dlp [OPTIONS] URL [URL...]
podman run --rm --userns keep-id -v $(pwd):/storage docker.io/kgtm/yt-dlp [OPTIONS] URL [URL...]
- Directory where you run this command will be made available to yt-dlp and files will be written there.
- The entrypoint is set to yt-dlp, so do not put yt-dlp again as argument.
- You can shorten this command with an alias.
You can omit the entire command input by specifying an alias in your shell of choice. The following line can be added to the end of your .bash_aliases
, .bashrc
or .zshrc
. Afterwards you can simply use yt-dlp [OPTIONS] URL [URL...]
from your shell.
alias yt-dlp='docker run --rm -u $(id -u):$(id -g) -v $(pwd):/storage kgtm/yt-dlp'
alias yt-dlp='podman run --rm --userns keep-id -v $(pwd):/storage docker.io/kgtm/yt-dlp'
Check the version of FFmepg
docker run --rm --entrypoint '' kgtm/yt-dlp ffmpeg -version | head -n 1
podman run --rm --entrypoint '' docker.io/kgtm/yt-dlp ffmpeg -version | head -n 1
Launch a shell
docker run -it --rm --entrypoint '' kgtm/yt-dlp sh
podman run -it --rm --entrypoint '' docker.io/kgtm/yt-dlp sh
Check our issue tracker for open issues or create new ones for any problems or feature requests. You can also clone this repository solve issues or implement new features and submit a pull request.
By contributing to this project, you agree that your contributions will be licensed under Apache License 2.0.
Without the work from the people behind yt-dlp and ffmpeg, this container image wouldn't have a purpose. Also, this repository was greatly inspired by the works of tnk4on/yt-dlp and kijart/docker-youtube-dl. Show them some ๐ค