Skip to content

rubiojr/beehive-youtube-dl

Repository files navigation

Beehive video downloader

⚠️ this is a basic example higly insecure by default. Your files could be exposed to the world.

Example Beehive based video downloader implementation.

  • Enqueue videos to be downloaded
  • Notifies videos have been enqueued via Pushover
  • Download enqueued videos using youtube-dl
  • Notifies when videos have been downloaded via Pushover
  • The videos will be served by minio at http://localhost:2015 (user: test123, pass: secret123)

Needs muesli/beehive#272 so you'll need to build Beehive from that branch.

Sample beehive.conf included. Needs Pushover token changeme to be replaced with a real token for the notifications to work.

Workflow

Queueing videos:




                     POST YouTube URL     +------------------------+   Save URL   +-------------+
                                          |                        |              |             |
   beeydl queue  -----------------------> |  Beehive HTTP server   +--------------> Redis Server
                                          |                        |              |             |
                                          +------------------------+              +-------------+
                                                            |
                                                            |         +------------+
                                                            +-------->+            |
                                                                      |  Pushover  |
                                                Send notification     |            |
                                                                      +------------+

Downloading videos:


                     +-------------+
                     |             |
   beeydl poll  +---->  Redis Chan |
         +      |    |             |
         v      |    +-------------+
      get key   |
         +      |    +-------------------------+
         v      +----+                         |
    youtube-dl  |    | Download queued Video   |
         +      |    |                         |
         |      |    +-------------------------+
         |      |
         v      |    +-------------+
   publish msg  +--->+             |
                     | Redis Chan  |         +----------+                +------------+
                     |             |         |          |                |            |
                     +-------------+         | Beehive  | +------------->+  Pushover  |
                                 +---------->+          |                |            |
                                             +----------+                +------------+

Usage

The easiest way is to clone this repository and use the docker-compose.yml file included.

Replace Pushover token placeholders with your own tokens.

git clone https://github.com/rubiojr/beehive-youtube-dl
cd beehive-youtube-dl
export PUSHOVER_APP_TOKEN=my-app-token
export PUSHOVER_USER_TOKEN=my-user-token
docker-compose up

You can then queue videos locally using:

./beeydl queue "https://youtube...."

A ydl-video directory will be created automatically in the current directory and the videos will be downloaded there.

A config directory will also be created to persist Beehive's configuration.

About

Sample Beehive (https://github.com/muesli/beehive) and Redis integration

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published