Referrer support

#1
Some IPTV channels, especially from official streams, require a referrer to work, because they are designed to be accessed only from the website.

For example:

Code: Select all

#EXTINF:-1 group-title=”TV” tvg-id=”RTP Internacional” tvg-logo=”https://caixapreta.pt/logos/RTP-Internacional.png”,RTP Internacional
https://streaming-live.rtp.pt/liverepeater/smil:rtpi.smil/playlist.m3u8|Referer=https://www.rtp.pt
This channel works great in PVR IPTV Simple Client for Kodi, but not in ProgTV, because it requires the referrer.
Last edited by LITUATUI on Mon Apr 29, 2019 6:54 pm, edited 1 time in total.

Re: Referrer support

#3
Thanks for the fast reply.

But it still doesn't work, but there is some progress. I'm using the latest version (2.51.8) for Android by the way.

This gives me HTML error.

Code: Select all

#EXTINF:-1 group-title="TV" tvg-id="RTP1" tvg-logo="https://caixapreta.pt/logos/RTP1.png" http-referrer="https://www.rtp.pt",RTP 1
https://streaming-live.rtp.pt/liverepeater/smil:rtp1.smil/playlist.m3u8|Referer=https://www.rtp.pt
If I remove the especial code for the PVR IPTV Simple Client (|Referer=https://www.rtp.pt) I get the stream but it says it is encrypted.

Code: Select all

#EXTINF:-1 group-title="TV" tvg-id="RTP1" tvg-logo="https://caixapreta.pt/logos/RTP1.png" http-referrer="https://www.rtp.pt",RTP 1
https://streaming-live.rtp.pt/liverepeater/smil:rtp1.smil/playlist.m3u8

Re: Referrer support

#5
Another example:

Code: Select all

#EXTINF:-1 group-title="TV" tvg-id="Porto Canal" tvg-logo="https://caixapreta.pt/logos/Porto-Canal.png",Porto Canal
https://streamer-b02.videos.sapo.pt/live/portocanal/playlist.m3u8|Referer=http://sapo.pt
Without the Referer=http://sapo.pt the channel doesn't open in PVR IPTV Simple Client.

I think that the "Referer" command is only used by PVR IPTV Simple Client on Kodi.

Here is a Portuguese IPTV list:

Code: Select all

https://github.com/teamblue65/LISTAS/blob/master/LISTA_PVR_SIMPLE_CLIENT
The RTP channels don't work in ProgTV, it says they are encrypted. But they open in PVR IPTV Simple Client.

Re: Referrer support

#7
I just noticed that I open this topic in the wrong section, it should be in ProgTV, not ProgDVB. Sorry.


I just made a new IPTV list, where I sniffed the URL for RTP channels from the Official app, so no referrer is needed. Yet ProgTV still says that the stream is encrypted.

This is the list: https://caixapreta.pt/iptv

RTP and Porto Canal channels don't work on ProgTV using the default engine, however they open if I choose an external player, like MX Player or Wuffy Player on ProgTV.

Re: Referrer support

#10
Summing up.

Normal version.

RTP channels:

ProgDVB Engine: no
MediaPlayer: yes
ExoPlayer: yes
OpenMax: no
FFmpeg: no
MediaPlayer+: no

Porto Canal: only works with external player



Beta version.

RTP channels:

ProgDVB Engine: no
MediaPlayer: yes
ExoPlayer: yes
OpenMax: no
FFmpeg: no
MediaPlayer+: no


Porto Canal:

ProgDVB Engine: yes
MediaPlayer: no
ExoPlayer: no
OpenMax: yes
FFmpeg: no, it starts but crashes ProgTV
MediaPlayer+: can't try, now the channel tries to open with FFmpeg and crashes

Re: Referrer support

#13
Some problem on ssl level. OpenSSL not like working with this server. Same wget (windows).

>wget https://www.rtp.pt/common/player/drmaes.php
--2019-04-30 22:49:01-- https://www.rtp.pt/common/player/drmaes.php
Resolving www.rtp.pt... 67.27.205.252, 8.252.26.117, 67.27.205.124
Connecting to www.rtp.pt|67.27.205.252|:443... connected.
OpenSSL: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure
Unable to establish SSL connection.

Re: Referrer support

#14
RTP Internacional

Stream sniffed from app:

Code: Select all

http://rtp-pull-live-h1bnxvdk20183-proprtp-app-wrtp.hls.adaptive.level3.net:80/liverepeater/rtpi_5ch120h264.stream/playlist.pt.m3u8
Stream sniffed from website:

Code: Select all

https://streaming-live.rtp.pt/liverepeater/smil:rtpi.smil/playlist.m3u8
Porto Canal:

Code: Select all

https://streamer-b02.videos.sapo.pt/live/portocanal/playlist.m3u8
ProgTV opens fine these streams with an external player like MX Player or Wuffy Player.


By the way, thanks a lot for your work. I really like ProgTV and want to recommend people to use it with my free IPTV list. Perfect Player is also very good but lacks recording.