Video DownLoad tool, send it URLs via API & CURL from anywhere. Concurrent downloads queued with Celery and Redis, highly customisable, Python Flask-based running in a container.
- Video Downloads: Utilising latest version of
yt-dlp
, pulled upon container build - Subtitles: Downloads and embeds subtitles in the video file as optionable subs
- Queue System: Uses Celery and Redis to queue and manage multiple simultanous downloads
- Custom Arguments: Allows passing additional
yt-dlp
arguments via the API / cURL commands - Containerised: Fully containerised for easy deployment and scalability
- Docker
- Docker Compose
- Git
git clone https://github.com/mrysn/vdl.git
cd vdl
Build and start the services:
docker-compose up --build
Access the application at http://localhost:5050.
Recommended:
- Destroy and rebuild the container
Alternatively:
- Connect to the container CLI and run
yt-dlp -U
Endpoint: /vdl
Method: POST
Request Body:
{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"args": ["--format", "bestvideo+bestaudio"]
}
Response:
{
"task_id": "some-task-id",
"status": "queued"
}
Example using cURL:
curl -X POST -H "Content-Type: application/json" \
-d '{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"args": ["--format", "bestvideo+bestaudio"]
}' \
http://127.0.0.1:5050/vdl
cURL in one line:
curl -X POST -H "Content-Type: application/json" -d '{"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ","args": ["--format", "bestvideo+bestaudio"]}' http://127.0.0.1:5050/vdl
You can customise the application's behavior by modifying the variables in config.py
.
YT_DLP_OUTPUT_TEMPLATE = "/downloads/%(channel)s-%(upload_date)s-%(title)s-%(id)s-%(width)sp.%(ext)s"
YT_DLP_DEFAULT_ARGS = [
"--write-sub",
"--write-auto-subs",
"--sub-lang", "en.*",
"--sub-format", "ttml",
"--convert-subs", "srt",
"--embed-subs",
"--compat-options", "no-keep-subs",
"--merge-output-format", "mp4",
"--ignore-errors",
"--restrict-filenames",
"--no-check-certificate",
"--force-ipv4",
"--legacy-server-connect",
"--convert-thumbnail", "jpg",
"--embed-thumbnail",
"--add-metadata",
"--download-archive", "/downloads/yt-dlp-videos-mp4-maxquality.txt",
"-P", "/downloads"
]
To enable live updates during development, use the following command:
docker-compose -f docker-compose.override.yml up
vdl
can be deployed using Docker and GitHub Actions. A pre-configured workflow in .github/workflows/docker-build.yml
builds and pushes Docker images to Docker Hub.
This project is licensed under the MIT License.