No description
Find a file
2023-07-25 21:51:59 +02:00
assets feat: add clear button to enqueue form 2023-07-25 21:51:59 +02:00
frontend feat: add clear button to enqueue form 2023-07-25 21:51:59 +02:00
src feat: add clear button to enqueue form 2023-07-25 21:51:59 +02:00
.gitignore init 2023-01-30 23:40:13 +01:00
assets.zig feat: add logo and minify CSS 2023-04-21 22:52:38 +02:00
build.hxml feat: rewrite frontend in haxe 2023-02-04 21:33:23 +01:00
build.zig feat: support custom argv 2023-04-26 20:01:25 +02:00
conf.json feat: improve config format 2023-04-26 19:04:11 +02:00
hxformat.json feat: rewrite frontend in haxe 2023-02-04 21:33:23 +01:00
LICENSE init 2023-01-30 23:40:13 +01:00
README.md feat: embed subtitles by default 2023-07-09 16:04:38 +02:00
vidzig.service feat: add systemd unit 2023-01-31 00:08:50 +01:00

logo

Vidzig — Video download server

Vidzig is a HTTP server that allows you to enqueue links to videos. If Vidzig is unpaused, it will begin spawning yt-dlp to download these videos. These videos are accessible via a web interface or a (as yet undocumented) JSON API.

Why?

I have terrible internet and can't watch videos in 1080p, so I collect them up over a day and have a Rasperry Pi running vidzig download them overnight.

Building

  1. Install the latest Zig master version and a Haxe compiler for the frontend.
  2. zig build
  3. If that doesn't work, bug me about it

Deployment

NEVER DEPLOY VIDZIG OUTSIDE YOUR LAN!

Not only would that make absolutely no sense, but also, vidzig has not been tested against path traversal attacks, and while there are some (buggy) checks in place, these will almost certainly not hold up to real attacks!

  1. Install yt-dlp on the server. Yes, I know. Dependency on some python trash, but I sadly don't know any good alternatives :(.

  2. Create a JSON configuration file in a directory of your choice (I recommend /etc/vidzig/conf.json) This is an example JSON file. Note that comments and trailing commas are not supported in the actual config! All values are required unless noted otherwise.

{
    // Address and port to bind to. Use 0.0.0.0 to allow access from other devices.
    "bind": {
        "ip": "127.0.0.1",
        "port": 8080,
    },

    // Directory to use for saving data such as videos.
    "data_dir": "/mnt/storage/vidzig",

    // Base URL vidzig is accessible from. This is useful if vidzig is running behind a reverse proxy.
    "base_url": "http://my.host/vidzig",

    // (optional) Command for youtube-dl.
    //
    // Accepts these format string templates:
    // - %u: URL
    // - %o: Output file template
    //
    // Vidzig might append options to this depending on the options checked on the frontend.
    "ytdl_argv": [
        "yt-dlp",
        "%u",
        "--quiet",
        "--embed-metadata",
        "--embed-subs",
        "--format",
        "bestvideo[height<=1080]+bestaudio/best[height<=1080]",
        "--output",
        "%o",
    ],

    // Automatically pause after queue has been completed
    // Default: true
    "autopause": true,
}
  1. Run the binary and pass the config file path as an argument: /path/to/vidzig /path/to/conf.json

There is also a vidzig.service file for managing Vidzig using SystemD.