[HN Gopher] Show HN: I pipe free sports streams into Jellyfin - ...
___________________________________________________________________
Show HN: I pipe free sports streams into Jellyfin - no ads, just
HLS
Author : pruz
Score : 86 points
Date : 2026-04-08 12:17 UTC (10 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| pruz wrote:
| I self-host Jellyfin on my homelab and got frustrated opening a
| laptop every time there was a football match just to deal with
| popup-infested streaming sites. The actual video underneath is
| just a standard HLS stream, but getting it into Jellyfin turned
| out to be harder than expected.
|
| Three problems: (1) the m3u8 URL is buried behind iframes and
| obfuscated JS, (2) tokens expire every few hours, and (3) the
| upstream server checks User-Agent and Referer headers on both the
| playlist and .ts segments -- Jellyfin doesn't send these, so you
| get 403.
|
| I ended up writing three scripts:
|
| - detect-headers.sh: give it a page URL, it follows the iframe
| chain, extracts the m3u8, then brute-forces header combinations
| on both .m3u8 and .ts requests. Tells you exactly what the stream
| needs.
|
| - hls-proxy.py: single-file Python reverse proxy (stdlib only,
| zero pip dependencies). Injects the required headers and rewrites
| the m3u8 so segment requests also go through the proxy.
|
| - refresh-m3u.sh: extracts fresh URLs before tokens expire,
| outputs a Jellyfin-ready M3U with logos and channel groups. Runs
| on a systemd timer.
|
| ~200 lines of Python, ~100 lines of bash. The proxy is the
| interesting part technically -- it has to handle relative and
| absolute segment URLs, rewrite URI= in EXT tags (for encryption
| keys), and add CORS headers since Jellyfin's web client makes
| cross-origin requests.
|
| Happy to answer questions about the approach or implementation.
| originalvichy wrote:
| Cool implementation. Never occurred to me Jellyfin could serve
| as a streaming platform on its own! I'll probably find the
| answer after sending this reply (may be helpful to others), but
| does it come with this functionality out of the box, or is any
| plug-in needed?
|
| How probable is it that this kind of method can be patched or
| obfuscated further? I assume that since the HLS stream is
| always at the core, it's a matter of just finding alternative
| ways to dig through it.
|
| Any quirks this implementation has wrt. things like quality or
| additional delay? Thanks! I'd like to try out if your methods
| could be used to make some sort of snippet that could be sent
| to VLC that's running on a TV or streaming device.
| c-hendricks wrote:
| Adjacent, but back when Plex supported plugins all your
| plugin had to do was eventually give it a link to a video /
| stream and bam, you could watch the content on any device. I
| built a fairly popular plugin around the idea of
| deduplicating tv / movie listings and letting people watch
| now or direct download.
| gibsonsmog wrote:
| I'm curious if there is a particular technical reason you chose
| to make this as a separate script rather than some kind of
| Jellyfin plugin? I actually appreciate that you did it in this
| fashion (more useful for me personally), just curious if there
| were limitations within the Jellyfin/dotNet system.
|
| Either way, gonna make my World Cup viewing experience this
| year a lot easier haha
| dchuk wrote:
| Very cool. I've used a paid service for years now that gets me
| all sorts of sports and channels very reliably, I would assume
| they're doing something similar to make this work. Might try this
| though with my home server setup.
|
| Think it could be ran from within a docker container so I could
| add it to an existing docker compose media server setup?
| theappsecguy wrote:
| any chance you'd be willing to share what the service is? I use
| streameast all the time but it's not reliable enough
| FatherOfCurses wrote:
| seconded
| Handy-Man wrote:
| Not OP, but I have used iptvore[dot]net previously
| rockostrich wrote:
| You will want to search for IPTV services. It's a bit of a
| wild west out there but I'd recommend finding one that has a
| Discord. Most will offer a free trial for 24 hours or a week
| for you to try them out.
| dewey wrote:
| It's a cool hack...but also a bit unethical as the reason they
| are free is that there's ads. I almost feel it's more ethical to
| sign up for a paid pirated IPTV service and then use that, with
| the benefit of that being more stable and probably with higher
| quality.
| kaan_keskin wrote:
| I totally needed something like this. Looks very good.
| kstrauser wrote:
| I love it. I'm willing to pay for streaming sports services, to a
| point, but all of them are freaking insane. For example, my wife
| and I like watching baseball. So let's do the right thing and pay
| for it, right? LOL, as if that were possible. For $120[0] we can
| watch the Giants games, or for $220, all games... but subject to
| blackout. For $120, we can't actually watch home games. We'd have
| to pay for a separate streaming service for those.
|
| It's similar for NFL, and I assume NHL and NBA, too. I'd pay to
| watch the stuff I watch _if it were possible_ , but it's not!
|
| [0] https://www.mlb.com/live-stream-games/subscribe/giants
| dewey wrote:
| Sport streaming is the one where I don't feel bad about using
| unofficial services, they are reasonably priced, I can watch
| the broadcast of the country that I prefer (Sky UK over the
| German coverage for example) and I can use an app like
| https://www.uhfapp.com which is more polished and works better
| than all the official streaming apps combined.
| wombat-man wrote:
| for NFL it hugely depends on whether you want to follow the
| local team. So far, if you're in the local market the NFL
| generally shows the games on broadcast for free, and that you
| can get to with an antenna and a TV card depending on where you
| are.
|
| MLB, I haven't tried for a few years but I could watch any out
| of market game on mlb.tv, but not any that involved the local
| team, so it was the opposite. For that there was a special
| regional sports channel that I'd have to subscribe to. No way
| to do it directly with the network, I'd have to get satellite
| or something.
| kstrauser wrote:
| > for NFL it hugely depends on whether you want to follow the
| local team.
|
| That's the situation for probably 95% of viewers, though.
| Others might want to watch games from where they grew up, but
| most people typically follow the local teams. We don't even
| have a great way to get an antenna feed into our TV, and that
| also means we have one way to watch everything except local
| games, and another, worse way to watch them (for example, by
| not having a way to pause them).
|
| I get why the streaming apps don't show local games from
| their business POV, but as a potential subscriber, that's a
| them-problem, not a me-problem. There's no way I'm paying
| that much money without being able to watch the home games.
| wombat-man wrote:
| Not sure which streaming apps you're referring to. If you
| only care about the local team, getting a TV streaming
| option like Youtube TV, sling or hulu tv should work.
| Probably some I'm not thinking of. As long as they get the
| main networks, that should cover it. Even when they do a
| Prime exclusive or MNF(espn) game, they'll show it on the
| local affiliate for local markets. At least that's the way
| it has always worked, NFL may change it in the future. The
| real pain is if you want to follow an out of market team.
| Just for starters you need NFL Sunday ticket which is not
| cheap these days.
|
| If you're cool waiting a day to watch the games, nfl plus
| has everything with commercials cut.
| kstrauser wrote:
| NFL is egregiously bad here. They split exclusives among
| multiple streaming services, so you need to subscribe to
| (IIRC) at least Netflix and Amazon Prime in addition to
| your TV service if you want to see everything.
| larntz wrote:
| I think a few games are only on NFL Network (not always
| included in the base cable subscription) also. And you'll
| need Peacock if you don't have cable/antenna.
| wombat-man wrote:
| It depends on how much you want to just follow a single
| team or of you are just trying to catch any given
| primetime game. I mean I'm fine missing them of my team
| isn't in it.
|
| If you're following the local team and don't mind missing
| the others, NFL is pretty solid actually.
| HWR_14 wrote:
| I believe for $120 you can watch _sold out_ home games. Or like
| you said "we can't actually watch home games"
| rhcom2 wrote:
| NHL is similarly frustrating. I pay for ESPN but some games are
| on TNT, NHL Network, or a broadcast channel. I'm not paying for
| two different $60 a month services so now they just don't get
| any of my money.
| rockostrich wrote:
| The NBA is similarly annoying. It's $110 for the season to
| watch all non-blacked out games. As a Knicks fan, it was great
| when I was living in Philly because I could watch all Knicks
| games unless they were nationally broadcast or if they were
| playing the Sixers. Now that I live in NJ I'm technically in
| the NY broadcast region. The only way for me to watch local
| games legally is to have MSG through a cable provider or pay
| for Gotham Sports Plus which is $35/month.
| amusingimpala75 wrote:
| Since this works on the raw data streams from the official
| distributor, this is legal, correct?
| neko_ranger wrote:
| Sports should be free to watch, the product itself is covered in
| ads already
| js2 wrote:
| This works with Jellyfin because it supports m3u:
|
| https://jellyfin.org/docs/general/server/live-tv/setup-guide...
|
| Channels DVR also supports m3u:
|
| https://getchannels.com/docs/channels-dvr-server/how-to/cust...
|
| The README mentions Plex and Emby, but those don't support m3u,
| so you need to use a proxy which makes an m3u source appear like
| a local tuner such as:
|
| https://github.com/Threadfin/Threadfin
|
| https://github.com/xteve-project/xTeVe
|
| https://github.com/vorghahn/iptv4plex
| skippyboxedhero wrote:
| There is also threadfin, which I found a bit more friendly than
| XTeVe.
|
| Above system works pretty well but had trouble with
| encode/decode speed somewhere. Tried with N100 cpu and still
| had the same result...probably user error somewhere but none of
| the options seemed to work. No issues with UHF so kept using
| that.
| js2 wrote:
| Thanks, just added it.
| evulhotdog wrote:
| Add Dispatcharr to the list!
|
| https://github.com/Dispatcharr/Dispatcharr
| js2 wrote:
| Nice! Too late to edit.
___________________________________________________________________
(page generated 2026-04-08 23:01 UTC)