[READ-ONLY] Mirror of https://github.com/mrgnw/dlna-rs. Single-binary DLNA media server in Rust. Auto-discovered by VLC on Apple TV.
0

Configure Feed

Select the types of activity you want to include in your feed.

docs: README

+80
+80
README.md
··· 1 + # dlna-rs 2 + 3 + Single-binary DLNA/UPnP media server in Rust. Auto-discovered by VLC on AppleTV. Embedded Svelte web UI for managing the advertised folders. 4 + 5 + Built on [`librqbit-upnp-serve`](https://github.com/ikatson/rqbit) for SSDP + UPnP ContentDirectory; HTTP streaming with Range requests + DLNA headers handled directly. 6 + 7 + ## Build 8 + 9 + Requires Rust (stable) and [bun](https://bun.sh). 10 + 11 + ```sh 12 + cargo build --release 13 + ``` 14 + 15 + The web UI is built automatically via `build.rs` (runs `bun install` + `bun run build` in `web/`). 16 + 17 + ## Run 18 + 19 + ```sh 20 + ./target/release/dlna-rs --folder /path/to/media 21 + ``` 22 + 23 + Then on Apple TV: **VLC → Network → Local Network**. The server appears under its friendly name (default: `dlna-rs (hostname)`). 24 + 25 + For the admin UI, open `http://localhost:9119/` in a browser. 26 + 27 + ## Config 28 + 29 + `~/.config/dlna-rs/config.styx` (auto-created on first save): 30 + 31 + ```styx 32 + port 9119 33 + friendly_name "dlna-rs (hostname)" 34 + folders ({path "/Users/m/Movies", recursive true}) 35 + ``` 36 + 37 + (Format is whatever [`facet-styx`](https://crates.io/crates/facet-styx) 3.x parses — close to styx but not identical to bearcove's reference.) 38 + 39 + CLI flags override: 40 + 41 + ``` 42 + --config <PATH> path to config file 43 + --port <PORT> HTTP port (default 9119) 44 + --friendly-name <NAME> DLNA friendly name 45 + --folder <PATH> append a recursive folder (repeatable) 46 + --folder-flat <PATH> append a non-recursive folder (repeatable) 47 + ``` 48 + 49 + ## Endpoints 50 + 51 + | Path | Purpose | 52 + |------|---------| 53 + | `/` | Embedded Svelte admin UI | 54 + | `/status` | Plain-text folder + count summary | 55 + | `/api/folders` | GET / POST / DELETE folders | 56 + | `/api/folders/refresh` | POST to recount a folder | 57 + | `/api/browse?path=…` | Server-side directory browser | 58 + | `/api/status` | JSON status | 59 + | `/stream/{id}` | File streaming, Range + DLNA headers | 60 + | `/description.xml` | UPnP device description | 61 + | `/scpd/*`, `/control/*` | UPnP SOAP services | 62 + 63 + ## VLC AppleTV verification 64 + 65 + 1. Start: `./target/release/dlna-rs --folder ~/Movies` (or a folder with video files). 66 + 2. On macOS: System Settings → Network → Firewall → ensure incoming connections to `dlna-rs` are allowed (or temporarily disable firewall). 67 + 3. Apple TV: open VLC → "Network" tab → "Local Network". 68 + 4. Expect: a row labelled with the friendly name (`dlna-rs (<your-hostname>)`). 69 + 5. Open it; configured folders appear as containers. 70 + 6. Open a video file → playback should start. 71 + 72 + Troubleshooting: 73 + - `curl http://localhost:9119/description.xml` should return XML. 74 + - `curl http://localhost:9119/status` should list your folders. 75 + - On a Mac on the same network: `dns-sd -B _ssdp._udp` or `pip install ssdpy && ssdpy-discover` to confirm SSDP announcements. 76 + - If VLC doesn't see it: macOS firewall and "Local Network" privacy settings (Settings → Privacy & Security → Local Network) are the usual culprits. 77 + 78 + ## License 79 + 80 + LLM-assisted. MIT.