/docker-youtube-dlp

Dockerized youtube-dlp based on Alpine Linux.

Primary LanguageDockerfileApache License 2.0Apache-2.0

What is youtube-dl(p)?

youtube-dl is a command-line program to download videos from YouTube.com and other video sites.

yt-dlp is a fork of the above project.

Reference

Based on

Based on https://github.com/gissehel/docker-youtube-dl.

Which is based on https://github.com/wernight/docker-youtube-dl. (https://hub.docker.com/r/wernight/youtube-dl/).

How to use this image

$ docker run --rm --user $(id -u):$(id -g) -v $(pwd):/downloads ghcr.io/gissehel/youtube-dlp <video_url>
  • --user $(id -u):$(id -g) is to run as your current user, and not root.
  • -v $(pwd):/downloads is to store downloaded files in the current working directory.
  • <video_url> is the ID of a YouTube video or other arguments to pass to youtube-dl.

Note: The entrypoint is set to yt-dlp, so do not put yt-dlp again as argument.

Usage as bash function

ydlp() {
    docker run --rm --user $(id -u):$(id -g) -v $(pwd):/downloads ghcr.io/gissehel/youtube-dlp "${@}"
}

Features of this image

  • Small: Built based on official Alpine Linux.
  • Simple: One command and you should be ready to go. All documented here.
  • Secure: Runs as any user.