Skip to content

porjo/ytdl-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Feb 1, 2025
9461213 · Feb 1, 2025
May 9, 2024
Feb 1, 2025
Jan 26, 2025
Dec 24, 2019
Aug 1, 2023
Jan 27, 2025
Aug 1, 2023
Dec 25, 2024
Jan 27, 2025
Jan 27, 2025
Jan 26, 2025
Feb 1, 2025
Jan 26, 2025
Jan 27, 2025

Repository files navigation

ytdl-web

Simple web app that takes a Youtube video URL (or any URL supported by yt-dlp) and produces a downloadable audio file.

Screenshot

Features

  • playblack of audio in the browser with skip and speed controls
  • mp3 files converted to Opus format on server-side and available immediately via streamed audio (no waiting for re-encode)
  • previous downloads displayed on page, with customizable expiry to auto-remove old files
  • supports SponsorBlock for removing sponsor segments in a video. Just add the -sponsorBlock command parameter. See yt-dlp doco for more details.

Usage

All command line parameters are optional.

Usage of ./ytdl-web:
  -cmd string
    	path to yt-dlp (default "/usr/bin/yt-dlp")
  -expiry int
    	expire downloaded content (seconds) (default 7200)
  -outPath string
    	where to store downloaded files (relative to web root) (default "dl")
  -port int
    	listen on this port (default 8080)
  -sponsorBlock
    	enable SponsorBlock ad removal
  -sponsorBlockCategories string
    	set SponsorBlock categories (comma separated) (default "sponsor")
  -timeout int
    	process timeout (seconds) (default 300)
  -webRoot string
    	web root directory (default "html")

Install

Use prebuilt Docker image from container registry:

$ docker run -it -p 8080:8080 ghcr.io/porjo/ytdl-web

or clone this Github repo and run docker build on it.

then:

  • (optionally) configure Caddy proxy (see config below)

Caddy config

example.com {
	encode gzip
	reverse_proxy /* h2c://localhost:8080
}