A self-hosted web app that converts any video URL (YouTube, and anything yt-dlp supports) to an MP3 download — no accounts, no cloud, runs entirely on your machine.
Paste a URL, click Download mp3, and the file downloads with the video's original title as the filename.
On first run, the server automatically downloads yt-dlp and ffmpeg into a local bin/ directory. No manual installation required on Windows and macOS. Subsequent runs reuse the cached binaries instantly.
- Go 1.21+
- Internet access on first run (to fetch yt-dlp and ffmpeg)
- Linux only: install ffmpeg manually —
sudo apt install ffmpeg(or equivalent for your distro)
git clone https://github.com/kasimlyee/to-audio
cd to-audio
go run main.goThe server starts at http://localhost:8080 and opens a browser tab automatically.
On first conversion, you will see:
Downloading yt-dlp...
yt-dlp ready.
Downloading ffmpeg...
ffmpeg ready.
After that the bin/ directory is populated and no further downloads happen.
To run as a persistent server (e.g. on a home server or VPS):
go build -o to-audio main.go
./to-audioThe server listens on :8080. Put it behind a reverse proxy (nginx, Caddy) if you want HTTPS or a custom domain.
to-audio/
├── main.go # HTTP server, routing, request handling
├── internal/
│ └── converter/
│ └── convert.go # yt-dlp + ffmpeg orchestration, auto-download
├── static/
│ ├── index.html
│ ├── app.js
│ └── style.css
└── bin/ # auto-created — yt-dlp and ffmpeg live here
The UI talks to a single endpoint. You can call it directly:
curl -X POST http://localhost:8080/convert \
-H "Content-Type: application/json" \
-d '{"url": "https://www.youtube.com/watch?v=..."}' \
--output audio.mp3MIT