Docker image for yt-dlp, a fork of youtube-dl, built from source. Available on Docker Hub.
Install docker: https://docs.docker.com/engine/installation/
Install docker compose: https://docs.docker.com/compose/install/
Docker documentation: https://docs.docker.com/
docker run -i --rm -v "$(pwd)":/data w33ble/youtube-dl [options] <url to download>
If you have issues with file permissions, you may need to add some flags for the user and group, like so:
docker run -i --rm -u $(id -u):$(id -g) -v "$(pwd)":/data w33ble/youtube-dl [options] <url to download>
This will download the video or audio from the provided URL into the current working path. You can pass in any command line arguments that youtube-dl accepts. As an example, you can specify your desired format like so:
docker run -i --rm -u $(id -u):$(id -g) -v "$(pwd)":/data w33ble/youtube-dl -f "bestvideo[ext=mp4][height<=1080]+bestaudio[ext=m4a]/bestvideo+bestaudio/best" <url to download>
docker build -t youtube-dl .
The action here can be trigger manually in addition to running automatically every day. To do so, create a personal access token with the repo
permission and use the follow curl command:
curl -H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token TOKEN_HERE" \
--request POST \
--data '{"event_type": "manual-trigger"}' \
https://api.github.com/repos/w33ble/youtube-dl-docker/dispatches