Skip to content

Commit

Permalink
docs(readme): update language to account for recent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
manbearwiz committed Dec 5, 2018
1 parent b4e6cee commit 8b4d13a
Showing 1 changed file with 26 additions and 11 deletions.
37 changes: 26 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,50 @@

# youtube-dl-server

Very spartan and opinionated Web / REST interface for downloading youtube videos onto a server. [`bottle`](https://github.com/bottlepy/bottle) + [`youtube-dl`](https://github.com/rg3/youtube-dl).
Very spartan Web and REST interface for downloading youtube videos onto a server. [`bottle`](https://github.com/bottlepy/bottle) + [`youtube-dl`](https://github.com/rg3/youtube-dl).

![screenshot][1]

## How to use this image
## Running

### Run on host networking
### Docker CLI

This example uses host networking for simplicity. Also note the `-v` argument. This directory will be used to output the resulting videos
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

```shell
docker run -d --net="host" --name youtube-dl -v /home/core/youtube-dl:/youtube-dl kmb32123/youtube-dl-server
```

### Alpine
### Docker Compose

There is now a working image based on Alpine linux that is much smaller. This will likely become the main image in the future
This is an example service definition that could be put in `docker-compose.yml`. This service uses a VPN client container for its networking.

```yml
youtube-dl:
image: "kmb32123/youtube-dl-server"
network_mode: "service:vpn"
volumes:
- /home/core/youtube-dl:/youtube-dl
restart: always
```
### Python
If you have python ^3.3.0 installed in your PATH you can simply run like this, providing optional environment variable overrides inline.
```shell
docker run kmb32123/youtube-dl-server:alpine
sudo YDL_SERVER_PORT=8123 python3 -u ./youtube-dl-server.py
```

## Usage

### Start a download remotely

Downloads can be triggered by supplying the `{{url}}` of the requested video through the Web UI or through the REST interface via curl, etc.

#### HTML

Just navigate to `http://{{address}}:8080/youtube-dl` and enter the requested `{{url}}`.
Just navigate to `http://{{host}}:8080/youtube-dl` and enter the requested `{{url}}`.

#### Curl

Expand All @@ -42,8 +57,8 @@ curl -X POST --data-urlencode "url={{url}}" http://{{address}}:8080/youtube-dl/q

## Implementation

The server uses [`bottle`](https://github.com/bottlepy/bottle) for the web framework and [`youtube-dl`](https://github.com/rg3/youtube-dl) to handle the downloading. For better or worse, the calls to youtube-dl are made through the shell rather then through the python API.
The server uses [`bottle`](https://github.com/bottlepy/bottle) for the web framework and [`youtube-dl`](https://github.com/rg3/youtube-dl) to handle the downloading. The integration with youtube-dl makes use of their [python api](https://github.com/rg3/youtube-dl#embedding-youtube-dl).

This docker image is based on [`python:3-onbuild`](https://registry.hub.docker.com/_/python/) and consequently [`debian:jessie`](https://registry.hub.docker.com/u/library/debian/).
This docker image is based on [`python:alpine`](https://registry.hub.docker.com/_/python/) and consequently [`alpine:3.8`](https://hub.docker.com/_/alpine/).

[1]: https://raw.githubusercontent.com/manbearwiz/youtube-dl-server/master/youtube-dl-server.png
[1]:youtube-dl-server.png

0 comments on commit 8b4d13a

Please sign in to comment.