This project is a Branch/ Fork of the original work of manbearwiz.
Original Work: Very spartan Web and REST interface for downloading youtube videos onto a server. bottle
+ youtube-dl
.
Bugs:
Features:
-
Improvement Threads: work of nachtjasmin
-
Fileserver: work of bsod64
-
Torrent Download: inspired by samukasmk
-
Extraction: i have written an extraction module to process the data specifically for personal purpose
-
Web-UI: i complicated the WebUI, so that the user can configure diffrent parameters
-
Download History: inspired by nbr23
-
Download:
- wget
- youtube-dl
- torrent (magnetlink)
Planned:
- url
- youtube-dl or wget o
- download streams: normal (single) or axel (multiple download streams)
- reference link
- title
- path (for subfolder)
- retries (standard 5)
- min sleep (standard 2)
- max sleep (standard 15)
- bandwidth (standard unlimited)
- username
- password
This example uses the docker run command to create the container to run the app. Here we also use host networking for simplicity. Also note the -v
argument. This directory will be used to output the resulting videos
docker run -d -p 8080:8080 --name your-dl-server -v ./data/ydl-downloads:/tmp/ydl-downloads -v ./data/ydl-logs:/tmp/logs lramm/youtube-dl-server
This is an example service definition that could be put in docker-compose.yml
. This service uses a VPN client container for its networking.
youtube-dl:
image: "lramm/your-dl-server"
volumes:
- ./data/ydl-logs:/tmp/logs
- ./data/ydl-downloads:/tmp/ydl-downloads
ports:
- 8080:8080
restart: always
Podman can be used like the Docker CLI.
podman run -d -p 8080:8080 --name your-dl-server -v ./data/ydl-downloads:/tmp/ydl-downloads:Z -v ./data/ydl-logs:/tmp/logs:Z lramm/youtube-dl-server
An Example Config for Kubernetes is Provided in the k8s directory.
If you have python ^3.3.0 installed in your PATH you can simply run like this, providing optional environment variable overrides inline.
sudo YDL_SERVER_PORT=8123 python3 -u ./youtube-dl-server.py
Downloads can be triggered by supplying the {{url}}
of the requested video through the Web UI or through the REST interface via curl, etc.
Just navigate to http://{{host}}:8080/
and enter the requested {{url}}
.
curl -X POST --data-urlencode "url={{url}}" http://{{host}}:8080/api/add
fetch(`http://${host}:8080/api/add`, {
method: "POST",
body: new URLSearchParams({
url: url,
format: "bestvideo"
}),
});
Add the following bookmarklet to your bookmark bar so you can conviently send the current page url to your youtube-dl-server instance.
javascript:!function(){fetch("http://${host}:8080/api/add",{body:new URLSearchParams({url:window.location.href,format:"bestvideo"}),method:"POST"})}();
Simple Fileserver for Download or Streaming, navigate to http://hostip:port/downloads/
NOTE
Currently: Issue with Fileserver and Webpage, if you use both, it breaks after entering the Fileserver.
The server uses bottle
for the web framework and youtube-dl
to handle the downloading.
This buildah image is based on python:3-alpine
.