Automated Binary Lifecycle
On startup, the server verifies Node.js v20+ and updates local copies of yt-dlp, FFmpeg, and Deno from GitHub releases.
Node.js 20+HTTP API documentation for media downloading, audio extraction, real-time progress tracking, MP3 streaming, and ComputerCraft-compatible DFPWM audio.
The service manages the media toolchain and exposes a simple HTTP interface for downloading and streaming audio.
On startup, the server verifies Node.js v20+ and updates local copies of yt-dlp, FFmpeg, and Deno from GitHub releases.
Node.js 20+Downloads audio at 192 kbps MP3 quality with yt-dlp and validates the resulting file using FFprobe.
192 kbps MP3Converts MP3 files on-demand into 48000 Hz, single-channel DFPWM streams suitable for ComputerCraft HTTP audio.
48 kHz · Mono · DFPWMServer-Sent Events provide live download progress, speed, ETA, and job state updates.
text/event-streamMP3 routes support standard HTTP Range headers and timestamp seeking with the t query parameter.
All endpoints are HTTP GET routes. Replace <MEDIA_ID> with the identifier returned by the download endpoint.
/Returns metadata about the API and a list of available endpoints.
JSON object containing API metadata and endpoint information.
/healthReturns the current server status and uptime.
{
"status": "ok",
"uptime": 123.45
}/download?url=<URL>Triggers a background audio download job for the provided HTTP/HTTPS media URL.
| Parameter | Required | Description |
|---|---|---|
url | Yes | HTTP/HTTPS media URL, such as a YouTube URL. |
GET /download?url=https://www.youtube.com/watch?v=...
{
"id": "MEDIA_ID",
"status": "queued",
"mp3": "/music/MEDIA_ID.mp3",
"dfpwm": "/music/MEDIA_ID.dfpwm"
}/status?id=<MEDIA_ID>Retrieves the current state of a download or conversion job.
| Parameter | Required | Description |
|---|---|---|
id | Yes | Media ID returned by /download. |
{
"id": "MEDIA_ID",
"status": "downloading",
"progress": 42.5,
"speed": "2.4 MiB/s",
"eta": 18,
"size": 12345678,
"duration": 245,
"completed": false
}/events?id=<MEDIA_ID>Opens a Server-Sent Events stream for live progress updates for an active download job.
Content-Type: text/event-stream
The stream reports live progress, speed, ETA, and job state while the operation is active.
/music/<MEDIA_ID>.mp3Serves or streams the converted MP3 file.
Use the optional t parameter to start playback at a specific time in seconds or HH:MM:SS format.
GET /music/MEDIA_ID.mp3?t=30 GET /music/MEDIA_ID.mp3?t=01:30 GET /music/MEDIA_ID.mp3?t=00:01:30
Standard HTTP byte ranges are supported through the Range: bytes=... header.
Range: bytes=100000-200000
/music/<MEDIA_ID>.dfpwmConverts the specified MP3 into DFPWM on-the-fly and streams the result. If the MP3 is missing, it is automatically downloaded first.
48000 HzSample rateMonoSingle audio channelDFPWMComputerCraft stream format/music/auto?url=<URL_OR_ID>Convenience route that automatically downloads the requested media if it is not cached and immediately streams it back as an MP3.
GET /music/auto?url=https://www.youtube.com/watch?v=...
/music/auto.dfpwm?url=<URL_OR_ID>Automatically downloads, converts to DFPWM, and streams the result directly. Designed for ComputerCraft HTTP audio streams.
| Parameter | Required | Description |
|---|---|---|
url | Yes | Media URL or media ID. |
GET /music/auto.dfpwm?url=https://www.youtube.com/watch?v=...
GET /download?url=<URL>
GET /status?id=<MEDIA_ID> GET /events?id=<MEDIA_ID>
GET /music/<MEDIA_ID>.mp3
GET /music/<MEDIA_ID>.mp3?t=60
GET /music/<MEDIA_ID>.dfpwm GET /music/auto.dfpwm?url=<URL>
| Method | Endpoint | Purpose |
|---|---|---|
| GET | / | API metadata and endpoint list |
| GET | /health | Server health and uptime |
| GET | /download?url=<URL> | Start a download |
| GET | /status?id=<ID> | Get job status |
| GET | /events?id=<ID> | Live SSE progress |
| GET | /music/<ID>.mp3 | Stream MP3 |
| GET | /music/<ID>.dfpwm | Convert and stream DFPWM |
| GET | /music/auto?url=<URL_OR_ID> | Auto-download and stream MP3 |
| GET | /music/auto.dfpwm?url=<URL_OR_ID> | Auto-download and stream DFPWM |