Skip to content
Tech News
← Back to articles

Show HN: I pipe free sports streams into Jellyfin – no ads, just HLS

read original get Jellyfin Media Server → more articles
Why This Matters

This lightweight HLS restream toolkit enhances self-hosted media servers like Jellyfin by enabling users to stream free sports content without ads, overcoming common barriers such as expired tokens and missing HTTP headers. Its automation and auto-learning features simplify setup and maintenance, making high-quality streaming more accessible for consumers and the tech industry. This development promotes greater control over media streams and improves the reliability of free IPTV sources.

Key Takeaways

Lightweight HLS restream toolkit for self-hosted media servers (Jellyfin, Emby, Plex).

Many free IPTV/HLS sources require specific HTTP headers (User-Agent, Referer) that media servers don't send. This proxy sits between your media server and the upstream, injecting the required headers and rewriting m3u8 playlists so all segment requests also go through the proxy.

Components

File Purpose hls-proxy.py HTTP reverse proxy that adds headers to upstream HLS requests refresh-m3u.sh Scrapes source pages, extracts m3u8 URLs, writes M3U playlist detect-headers.sh Auto-detects which HTTP headers a stream requires channels.conf Your channel list (slug, name, logo, group, source URL)

How it works

┌──────────┐ ┌───────────┐ ┌──────────────┐ ┌──────────┐ │ Jellyfin │────▶│ hls-proxy │────▶│ upstream HLS │────▶│ segments │ │ │ │ :8089 │ │ server │ │ (.ts) │ └──────────┘ └───────────┘ └──────────────┘ └──────────┘ adds headers: • User-Agent • Referer

refresh-m3u.sh generates an M3U file with stable /channel/<slug> URLs pointing to the proxy When Jellyfin requests /channel/sporttv1 , the proxy scrapes a fresh m3u8 URL on the fly (cached for 1 hour) The proxy injects the required headers and rewrites the playlist so .ts segments also go through it The proxy auto-learns the correct Referer for each upstream host — no manual configuration needed

No more expired tokens — the M3U URLs never change, the proxy handles token refresh transparently.

Requirements

Python 3.8+ (stdlib only, no pip packages)

... continue reading