Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propose: Allow adding geo-blocked broadcasts to the playlist #2191

Closed
freearhey opened this issue Feb 25, 2021 · 27 comments
Closed

Propose: Allow adding geo-blocked broadcasts to the playlist #2191

freearhey opened this issue Feb 25, 2021 · 27 comments
Assignees

Comments

@freearhey
Copy link
Collaborator

This issue has been raised before, but it was not possible to do it because of the way how broadcast testing is organized.

However, after adding the tvg-country attribute to the channel descriptions, we can now specify exactly in which countries it should work and limit its testing to that country. So we can now remove this restriction and allow any links to be added as long as they have the correct country in the description.

@BellezaEmporium
Copy link
Collaborator

Wouldn't this raise some voices about "why this channel doesn't work from where I watch it" ?
Sounds good on the paper, but this will maybe come with some slight misunderstandings.

Maybe precising in the channel name that the channel is geo-blocked ?

@1611snowman17
Copy link

1611snowman17 commented Feb 25, 2021 via email

@themak1985
Copy link
Collaborator

Some thoughts:

  • How will this impact language playlists?
  • How will this impact broken stream clean up scripts?
  • Do we have analytics on playlist usage? Would be helpful to know how people are using playlists.
  • If we do go through with this, I think we have to indicate that the stream is geo restricted somehow.
  • As a side note, I do think we should be a bit more strict with countries/regions. I often find the wikipedia broadcast area section to be too broad. It's more an indication of availability, not targeted and consumed areas.

@Daniel15
Copy link
Contributor

This is a good idea, but IMO the geogated streams should be in separate playlist files (eg. one playlist for "Australia" and a separate one for "Australia - Geogated").

How will this impact broken stream clean up scripts?

Geo-gated streams could be checked either with a server physically in that country, or a VPN service that has nodes in lots of countries (such as NordVPN). It's possible some geo-restricted streams block VPN services though...

Do we have analytics on playlist usage?

The playlists are all on GitHub Pages which (unfortunately) does not give any analytics. I've got a IPTV-related domain name (iptv.party) that I've thought of suggesting we use for this project instead of the .github.io one. I was thinking of just using it with GitHub Pages like the current site, but we could think about using a different hosting service that tracks hits (or provides server logs which we can run an analyzer across).

@freearhey
Copy link
Collaborator Author

If we do go through with this, I think we have to indicate that the stream is geo restricted somehow.

I agree. I think we can simply add the [Geo-blocked] label to the name of such channels.

As a side note, I do think we should be a bit more strict with countries/regions. I often find the wikipedia broadcast area section to be too broad. It's more an indication of availability, not targeted and consumed areas.

Unfortunately, at the moment we do not have a better source than Wikipedia, but if it appears, we will definitely use it.

@BellezaEmporium
Copy link
Collaborator

BellezaEmporium commented Feb 27, 2021

Unfortunately, at the moment we do not have a better source than Wikipedia, but if it appears, we will definitely use it.

Why not targeting LyngSat and the satellites ? Channels (apart from international ones) are not streamed in every single available satellite.

The targeted area is where the channel is coming from and/or where it needs to be streamed. Simple.

A simple search for the channel name on the internet, and looking at the legal info in their website (or a WHOIS) permits you to get the actual country the channel is being streamed on.

@CHJ85
Copy link
Contributor

CHJ85 commented Feb 27, 2021

I got a few geo-locked US channels. so I'm all for this so long as you add that it's geolocked to the channel title.

@Sphinxroot
Copy link
Collaborator

|X-Forwarded-For= + appropriate ip to avoid geoblock could do the trick also maybe tag link whit group-title=" ", "name" (720p) (XFF)

as exemple this link is geoblocked for me but added a france ip and it work

#EXTINF:-1 tvg-id="France" tvg-name="Cherie 25" tvg-logo="https://i.imgur.com/dQWQmGL.png" group-title="France",Cherie 25 (OPT-2)
https://cherie25hls-lh.akamaihd.net/i/cherie25hls_1@579096/master.m3u8?|X-Forwarded-For=217.70.184.38

@freearhey
Copy link
Collaborator Author

@Sphinxroot Where did you get this IP from?

p.s. This link doesn't work for me in both cases.

@themak1985
Copy link
Collaborator

Why not targeting LyngSat and the satellites ? Channels (apart from international ones) are not streamed in every single available satellite.

The targeted area is where the channel is coming from and/or where it needs to be streamed. Simple.

A simple search for the channel name on the internet, and looking at the legal info in their website (or a WHOIS) permits you to get the actual country the channel is being streamed on.

I think these are two issues. Using WhoIs / legal data to find where a channel is based if there are no alternative sources is fine, but if there are better sources, such as the website itself, we should rely on that.

As for LyngSat - again, I think we should be careful to differentiate between markets accessible vs markets served/targeted. For example, an Italian channel is accessible throughout europe and north africa via satellite, but the channel is mainly targeting Italians in italy through its distribution and advertising. The only country listed under tvg-country in this scenario should be Italy.

I guess my point is, things are complicated and we shouldn't simply rely on one source but rather a variety of sources and the community's best judgement.

@themak1985
Copy link
Collaborator

This is a good idea, but IMO the geogated streams should be in separate playlist files (eg. one playlist for "Australia" and a separate one for "Australia - Geogated").

@freearhey @Daniel15 That is an interesting approach, imagine if we took all the country codes we have now and added a duplicate set but with a -g to them. So if I had a USA geo-gated channel, I would list it as tvg-country="US-G" (or we could use R for restricted) and there would be a separate playlist created for the geo-gated channels. We could also restrict channels with -G countries from appearing in language (and category) specific playlists. If we do this, we might be able to get away with not having to notate that a stream is geo restricted in the name.

Also, I have heard a lot of ways to describe these channels geo-gated, geo-blocked, geo-locked, region restricted, etc. Is one term better than another?

@Sphinxroot
Copy link
Collaborator

@freearhey its easy to find ISP per country and the ip range of it , but i did`nt test it in other application other than kodi

@BellezaEmporium
Copy link
Collaborator

|X-Forwarded-For= + appropriate ip to avoid geoblock could do the trick also maybe tag link whit group-title=" ", "name" (720p) (XFF)

as exemple this link is geoblocked for me but added a france ip and it work

#EXTINF:-1 tvg-id="France" tvg-name="Cherie 25" tvg-logo="https://i.imgur.com/dQWQmGL.png" group-title="France",Cherie 25 (OPT-2)
https://cherie25hls-lh.akamaihd.net/i/cherie25hls_1@579096/master.m3u8?|X-Forwarded-For=217.70.184.38

Would be biaised to say that it works for me because it's geo-locked to the country where I live. I'll test other things.

@Daniel15
Copy link
Contributor

Daniel15 commented Mar 1, 2021

|X-Forwarded-For= + appropriate ip to avoid geoblock could do the trick

This only works in some players, and only basic servers will be fooled by a fake X-Forwarded-For. In most cases, you'll need a proxy that's physically in the correct location.

@BellezaEmporium
Copy link
Collaborator

|X-Forwarded-For= + appropriate ip to avoid geoblock could do the trick

This only works in some players, and only basic servers will be fooled by a fake X-Forwarded-For. In most cases, you'll need a proxy that's physically in the correct location.

He's right, something like streamlink could do the trick. It would mean loading this program everytime you need to watch a geoblocked channel in which you got a forwarded IP... quite painful over time.

@freearhey
Copy link
Collaborator Author

@themak1985 Sorry, but I still don't understand what's wrong with specifying that a channel is geo-blocked in the channel name? That way all channels available in one country will be in one playlist instead of two different ones, which seems better to me. Or am I missing something?

As for the language playlists, if necessary channels can be filtered only by name, but again I do not see a particular problem if some of the channels in these playlists will be labeled "geo-blocked/geo-locked/...". The main thing is for people to understand why a channel does not work for them.

@pcccw
Copy link
Contributor

pcccw commented Mar 3, 2021

@Sphinxroot Where did you get this IP from?

p.s. This link doesn't work for me in both cases.

@freearhey
That is from my list, lol.

@pcccw
Copy link
Contributor

pcccw commented Mar 3, 2021

|X-Forwarded-For= + appropriate ip to avoid geoblock could do the trick

This only works in some players, and only basic servers will be fooled by a fake X-Forwarded-For. In most cases, you'll need a proxy that's physically in the correct location.

@Daniel15

That is an feature from exoplayer player api: https://exoplayer.dev/doc/reference/com/google/android/exoplayer2/upstream/HttpDataSource.html

Some player like Kodi/Tivimate do implement the API.

@Daniel15
Copy link
Contributor

Daniel15 commented Mar 3, 2021

|X-Forwarded-For= + appropriate ip to avoid geoblock could do the trick

This only works in some players, and only basic servers will be fooled by a fake X-Forwarded-For. In most cases, you'll need a proxy that's physically in the correct location.

@Daniel15

That is an feature from exoplayer player api: exoplayer.dev/doc/reference/com/google/android/exoplayer2/upstream/HttpDataSource.html

Some player like Kodi/Tivimate do implement the API.

The feature is adding custom headers to the request. What I'm saying is that most servers won't just accept the IP in an X-Forwarded-For header unless the client IP is a whitelisted proxy IP. Certainly none of my servers would blindly accept the X-Forwarded-For header from a client request. It's usually a security risk :)

@kbhasi
Copy link

kbhasi commented Mar 4, 2021

I'm thinking we could possibly create a separate folder for playlists containing links to geo-locked streams, and keep the channels folder for playlists containing links to freely watchable streams!

I'm also thinking that we don't add X-Forwarded-For HTTP requests to the links.

@themak1985

Also, I have heard a lot of ways to describe these channels geo-gated, geo-blocked, geo-locked, region restricted, etc. Is one term better than another?

I personally use the term 'geo-locked'.

@themak1985
Copy link
Collaborator

themak1985 commented Mar 6, 2021

@themak1985 Sorry, but I still don't understand what's wrong with specifying that a channel is geo-blocked in the channel name? That way all channels available in one country will be in one playlist instead of two different ones, which seems better to me. Or am I missing something?

Nothing is wrong with it, I just think that it is cleaner, easier to manage, and more accessible if we create a seperate generated playlist for geo-blocked channels. What I mean by accessible is not all apps allow you to filter out terms from playlists but they do allow you to hide groups. I think it makes sense to create the different country codes like AU-G (not seperate files in /channels) in certain scenarios, but there are many more scenarios where it does not make sense.

As for the language playlists, if necessary channels can be filtered only by name, but again I do not see a particular problem if some of the channels in these playlists will be labeled "geo-blocked/geo-locked/...". The main thing is for people to understand why a channel does not work for them.

With all that being said, I now agree with you, we should simply add a code to the channel name that indicates it is geo-blocked so users understand why a channel may not work for them. I think it should be as short as possible.

@themak1985
Copy link
Collaborator

Geo-gated streams could be checked either with a server physically in that country, or a VPN service that has nodes in lots of countries (such as NordVPN). It's possible some geo-restricted streams block VPN services though...

As long as VPN server location is based on tvg-country, that makes sense, but that may lead to a channel being tested 20 times if it has a region with 20 countries in it.

The playlists are all on GitHub Pages which (unfortunately) does not give any analytics. I've got a IPTV-related domain name (iptv.party) that I've thought of suggesting we use for this project instead of the .github.io one. I was thinking of just using it with GitHub Pages like the current site, but we could think about using a different hosting service that tracks hits (or provides server logs which we can run an analyzer across).

We could also use google analytics or any link tracking service.

@Daniel15
Copy link
Contributor

Daniel15 commented Mar 6, 2021

We could also use google analytics or any link tracking service

@themak1985 Google Analytics uses JavaScript so it can't be used for things like IPTV playlists, plus I'm not sure we'd want to send data to Google.

@themak1985
Copy link
Collaborator

We could also use google analytics or any link tracking service

@themak1985 Google Analytics uses JavaScript so it can't be used for things like IPTV playlists, plus I'm not sure we'd want to send data to Google.

Yeah, not sure what I was thinking 🤦

@kbhasi
Copy link

kbhasi commented Mar 6, 2021

plus I'm not sure we'd want to send data to Google.

@themak1985 @Daniel15 I should point out that alternatives exist!

There are many out there, but Matomo is the one I would consider using, with Plausible as a second choice.

(Edited because FastHub app didn't quote like I thought it would)

@Daniel15
Copy link
Contributor

Daniel15 commented Mar 6, 2021

There are many out there, but Matomo is the one I would consider using, with Plausible as a second choice.

@kbhasi Does Matomo support tracking things that aren't HTML web pages? I thought it's like Google Analytics in that it uses JavaScript and is primarily for websites. In the case of something like this project where it's essentially just files, something that analyses web server logs (GoAccess, AWStats, etc) would probably work best.

@freearhey
Copy link
Collaborator Author

Thank you all for participating in the discussion. Let me summarize:

We allow geo-blocked broadcasts to be added to the playlist as long as they are labeled accordingly:

#EXTINF:-1 tvg-country="CH",RSI La 1 [Geo-blocked]

The presence of this label means that the broadcast is accessible only in the country specified in the attribute tvg-country and should be tested only from it or via VPN. The label in this case is taken from Wikipedia, but if necessary we can easily change it in the future.

As for the other topics raised here, I suggest creating separate issues for each so that their discussion is not lost among the rest of the comments.

And again, thank you all for your help!

@freearhey freearhey unpinned this issue May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

9 participants