tellytv / telly

An IPTV proxy
MIT License
751 stars 105 forks source link

Support multicast streams through udpxy in the custom provider #238

Closed 5Ub-Z3r0 closed 5 years ago

5Ub-Z3r0 commented 5 years ago

Providers like init7 (www.init7.ch) have a multicast TV offering, and provide a m3u playlist with multicast groups in it (e.g.: https://api.init7.net/tvchannels.m3u).

this (set) of changes add support for generic multicast IPTV through the custom provider.

chazlarson commented 5 years ago

What's the configuration for this look like?

5Ub-Z3r0 commented 5 years ago

A bare minimum of

[[Source]]
  Name = "test"
  Provider = "Custom"
  M3U = "https://api.init7.net/tvchannels.m3u"
  Udpxy = "<udpxy_url>" #e.g.: localhost:4022

would trigger the new behaviour.

A slight downside of using a single providers.Configuration is that every provider configuration will be able to specify a Udpxy entry like the above, but won't have any use for it.

Nottt commented 5 years ago

Guys if this is accepted, let me know what is needed to integrate it to new docker architecture

chazlarson commented 5 years ago

What I don't understand about this is where that udpxy comes from. Your example points to telly itself, but telly doesn't have any routes to /udp/. Maybe I just don't understand some simple thing.

If this rewrites udp://@239.77.0.77:5000 to http://localhost:6077/udp/@239.77.0.77:5000/, who's responding to that?

eliagenini commented 5 years ago

@chazlarson in this case udpxy it's exposed locally on the 6077 port

Anyway it would be configurable and allow any remote address.

chazlarson commented 5 years ago

So udpxy is a thing you set up separately, correct? this thing? http://www.udpxy.com/

That's the missing piece. What confused me here is that the configuration example given is using telly's own port [6077], and telly isn't publishing a udp proxy. This pull request doesn't add anything to routes, so it seemed like maybe I was missing something obvious.

Also, the example given shows an invalid URL, which I'm assuming is a typo. Looking at the code I'm thinking that setting should be localhost:6077 without the http:, since the example as shown would result in the URL http://http:localhost:6077/udp/@239.77.0.77:5000/. which seems wrong.

5Ub-Z3r0 commented 5 years ago

So udpxy is a thing you set up separately, correct? this thing? http://www.udpxy.com/

Yes, sorry, correct.

That's the missing piece. What confused me here is that the configuration example given is using telly's own port [6077], and telly isn't publishing a udp proxy. This pull request doesn't add anything to routes, so it seemed like maybe I was missing something obvious.

Also, the example given shows an invalid URL, which I'm assuming is a typo. Looking at the code I'm thinking that setting should be localhost:6077 without the http:, since the example as shown would result in the URL http://http:localhost:6077/udp/@239.77.0.77:5000/. which seems wrong.

correct again - I've fixed the snippets above (and used a less confusing port).

5Ub-Z3r0 commented 5 years ago

@chazlarson - so what are your thoughts on this?

chazlarson commented 5 years ago

Seems good; I’m just worried about documentation and support, as it’s not a thing I’m very familiar with.