maxbambi / plugin.video.raitv

Kodi plugin for RAI
GNU General Public License v3.0
35 stars 9 forks source link

issues with Diretta #79

Open denics opened 2 months ago

denics commented 2 months ago

This is what I am getting when I try to play Rai1:

2024-06-15 20:44:42.507 T:1427     info <general>: VideoPlayer::OpenFile: plugin://plugin.video.raitv/?mode=play&url=https%3A%2F%2Fmediapolis.rai.it%2Frelinker%2FrelinkerServlet.htm%3Fcont%3D2606803
2024-06-15 20:44:42.869 T:361178    info <general>: Creating InputStream
2024-06-15 20:44:42.898 T:361178 warning <general>: AddOnLog: inputstream.adaptive: Warning "inputstream.adaptive.manifest_type" property is deprecated and will be removed next Kodi version, the manifest type is now automatically detected.
                                                   If you are using a proxy remember to add the appropriate "content-type" header to the HTTP manifest response
                                                   See Wiki page "How to provide custom manifest/license" to learn more about it.
2024-06-15 20:44:42.900 T:361178    info <general>: AddOnLog: inputstream.adaptive: [Repr. chooser] Resolution set: 1920x1080, max allowed: 3840x2160, Adjust refresh rate: 0
2024-06-15 20:44:44.369 T:361178    info <general>: AddOnLog: inputstream.adaptive: Manifest successfully parsed (Periods: 1, Streams in first period: 4, Type: live)
2024-06-15 20:44:44.369 T:361178    info <general>: Creating Demuxer
2024-06-15 20:44:44.370 T:361178    info <general>: Opening stream: 1001 source: 256
2024-06-15 20:44:44.500 T:361178   error <general>: AddOnLog: inputstream.adaptive: Download failed, HTTP error 403: https://raiuno1-live.akamaized.net/hls/live/598308/raiuno1/raiuno1/rai1_1200/exp=1718563484~acl=%2fhls%2flive%2f598308%2fraiuno1%2f*!%2fhls%2flive%2f598308-b%2fraiuno1%2f*!%2f*.key~data=hdntl~hmac=5b60bf15b8d886bf07da5fd44d25bf1a1e86c80a58fbfa960354829d1d8f8c6d/chunklist.m3u8?aka_me_session_id=AAAAAAAAAACcMm9mAAAAAIjU8D1X14YJ0W86s1r7p%2fED+Qz%2fZsB66JNdt6w+DYiM%2f6qbh7VoC2eC36ydsyvbY4Wz%2flj3+yWZ&aka_media_format_type=hls
2024-06-15 20:44:44.500 T:361178 warning <general>: AddOnLog: inputstream.adaptive: Cannot create sample reader due to unhandled representation container type
2024-06-15 20:44:44.500 T:361178   error <general>: OpenStream: Codec id 27 require extradata.
2024-06-15 20:44:44.500 T:361178 warning <general>: OpenStream - Unsupported stream 1001. Stream disabled.
2024-06-15 20:44:44.500 T:361178    info <general>: Opening stream: 1002 source: 256
2024-06-15 20:44:44.617 T:361178   error <general>: AddOnLog: inputstream.adaptive: Download failed, HTTP error 403: https://raiuno1-live.akamaized.net/hls/live/598308/raiuno1/raiuno1/itarai1_160/exp=1718563484~acl=%2fhls%2flive%2f598308%2fraiuno1%2f*!%2fhls%2flive%2f598308-b%2fraiuno1%2f*!%2f*.key~data=hdntl~hmac=5b60bf15b8d886bf07da5fd44d25bf1a1e86c80a58fbfa960354829d1d8f8c6d/chunklist_ao.m3u8?aka_me_session_id=AAAAAAAAAACcMm9mAAAAAIjU8D1X14YJ0W86s1r7p%2fED+Qz%2fZsB66JNdt6w+DYiM%2f6qbh7VoC2eC36ydsyvbY4Wz%2flj3+yWZ&aka_media_format_type=hls
2024-06-15 20:44:44.617 T:361178 warning <general>: AddOnLog: inputstream.adaptive: Cannot create sample reader due to unhandled representation container type
2024-06-15 20:44:44.618 T:361178    info <general>: Finding audio codec for: 86018
2024-06-15 20:44:44.618 T:361178    info <general>: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac
2024-06-15 20:44:44.618 T:361178    info <general>: OpenStream: Allowing max Out-Of-Sync Value of 10 ms
2024-06-15 20:44:44.618 T:361178    info <general>: Creating audio thread
2024-06-15 20:44:44.619 T:361183    info <general>: running thread: CVideoPlayerAudio::Process()
2024-06-15 20:44:44.619 T:361178    info <general>: Process - eof reading from demuxer
2024-06-15 20:44:44.619 T:361178    info <general>: CVideoPlayer::OnExit()
2024-06-15 20:44:44.619 T:361178    info <general>: VideoPlayer: eof, waiting for queues to empty
2024-06-15 20:44:44.619 T:361178    info <general>: Closing stream player 1
2024-06-15 20:44:44.619 T:361178    info <general>: Waiting for audio thread to exit
2024-06-15 20:44:44.629 T:361183    info <general>: thread end: CVideoPlayerAudio::OnExit()
2024-06-15 20:44:44.629 T:361178    info <general>: Closing audio device
2024-06-15 20:44:44.629 T:361178    info <general>: Deleting audio codec
2024-06-15 20:44:44.630 T:361178    info <general>: ADDON: Dll Destroyed - InputStream Adaptive
2024-06-15 20:44:44.714 T:361180    info <general>: Deleting settings information for files plugin://plugin.video.raitv/?mode=play&url=https%3A%2F%2Fmediapolis.rai.it%2Frelinker%2FrelinkerServlet.htm%3Fcont%3D2606803
2024-06-15 20:44:44.721 T:1427     info <general>: CVideoPlayer::CloseFile()
maxbambi commented 2 months ago

@denics live streaming is working for me now, but i don't know if there is something different in protection when football matches are played. They are geoprotected for sure. I'll try during a match today evening.

denics commented 2 months ago

Thanks, sure they are protected. I am using a VPN (proton) . I also have issues with playing Ape Maia or whatever other cartoon. I will send you more logs. Using the same VPN it works fine from the browser (I have an account with Rai).

emanuele commented 2 months ago

Just chiming in. I have the same issue, only with Live TV / Rai 1, and yes I use a vpn too (openvpn). If there is something I can do to help, like testing etc., do not hesitate to let me know.

Thanks for working on this issue!

denics commented 2 months ago

Thanks @emanuele , also I have noted that the "raisport web" 1 and 2 streams work fine with no interruption

maxbambi commented 2 months ago

@emanuele @denics I have tried to play some minutes of today's match. I'm in Italy and stream from plugin works. If I use my VPN (with italian exit) the stream doesn't work. But if I use my browser I can stream channel also with VPN activated. It's a strange behavior, but I can't find differences in headers

emanuele commented 2 months ago

@maxbambi @denics thanks for trying and confirming the issue.

I don't use proton vpn but I'm having a look at their troubleshooting guide about streaming over vpn: https://protonvpn.com/support/streaming-troubleshooting-guide/

which looks interesting and maybe relevant to the problem. I'll make some tests and if I find something useful I'll report back.

emanuele commented 2 months ago

@maxbambi @denics While trying to access Rai1 tonight through a web browser + openvpn (on Ubuntu), I observe that: 1) Firefox works and shows live Rai1; 2) Chrome does not show live Rai1 saying that the content is not available and to try later (I tried many times with the same result so I can reproduce the issue consistently); 3) Chromium has the same issue as Chrome, so no live Rai1.

Could this issue be related to the problem of the kodi addon?

emanuele commented 2 months ago

@maxbambi @denics

I guess I found the solution to the problem: it is not a problem of the addon but of the VPN connection and settings. I played a bit with the VPN settings and blocked ALL traffic outside the VPN tunnel, so "preventing leaks from DNS settings, connection issues, or applications making IP requests" - this is how that block is described.

The result is that on Kodi now Rai1 live works, as well as Rai 4K live and everything else covered by the addon - at least for the things I've tested.

My guess is that before, with the previous Openvpn settings, for certain types of Rai streams there were DNS requests not going through the tunnel and failing checks on Rai side somewhere, preventing the stream to start.

If the solution to the problem could be just dns-over-https, then it would be nice to have that in Kodi as an option...

This is also compatible with my previous observation of different results using directly different browsers on raiplay.it, on Ubuntu. As far as I know, Firefox has dns-over-https on by default while for Chrome it is disabled by default.

I don't have a step-by-step general solution for now, because blocking all connections outside the tunnel is VPN and OS dependent. But I'm confident of the explanation above and that RaialTV addon is not to blame.

denics commented 2 months ago

Thank you @emanuele , then the problem is more on the VPN manager plugin? I found this https://github.com/Zomboided/service.vpn.manager/issues/347#issuecomment-954295050

denics commented 1 month ago

I checked using VPN Manager Plugin and I run a DNS leak test and apparently everything is working fine. This is the log I get today:

2024-07-14 20:22:45.127 T:1545    error <general>: CCurlFile::CReadState::FillBuffer - (0x7f5c3c2d50) Failed: Failure when receiving data from the peer(56)
2024-07-14 20:22:45.127 T:1545    error <general>: CCurlFile::Open - <http://mafreebox.freebox.fr/api/v6/tv/epg/by_time/1721077200> Failed with code 0:

2024-07-14 20:22:56.705 T:1436     info <general>: VideoPlayer::OpenFile: plugin://plugin.video.raitv/?mode=play&url=https%3A%2F%2Fmediapolis.rai.it%2Frelinker%2FrelinkerServlet.htm%3Fcont%3D2606803
2024-07-14 20:22:56.769 T:2338     info <general>: Creating InputStream
2024-07-14 20:22:56.771 T:2338  warning <general>: AddOnLog: inputstream.adaptive: Warning "inputstream.adaptive.manifest_type" property is deprecated and will be removed next Kodi version, the manifest type is now automatically detected.
                                                   If you are using a proxy remember to add the appropriate "content-type" header to the HTTP manifest response
                                                   See Wiki page "How to provide custom manifest/license" to learn more about it.
2024-07-14 20:22:56.773 T:2338     info <general>: AddOnLog: inputstream.adaptive: [Repr. chooser] Resolution set: 1920x1080, max allowed: 3840x2160, Adjust refresh rate: 0
2024-07-14 20:22:56.976 T:2338     info <general>: AddOnLog: inputstream.adaptive: Manifest successfully parsed (Periods: 1, Streams in first period: 4, Type: live)
2024-07-14 20:22:56.976 T:2338     info <general>: Creating Demuxer
2024-07-14 20:22:56.977 T:2338     info <general>: Opening stream: 1001 source: 256
2024-07-14 20:22:57.038 T:2338    error <general>: AddOnLog: inputstream.adaptive: Download failed, HTTP error 403: https://raiuno1-live.akamaized.net/hls/live/598308/raiuno1/raiuno1/rai1_1800/exp=1721067776~acl=%2fhls%2flive%2f598308%2fraiuno1%2f*!%2fhls%2flive%2f598308-b%2fraiuno1%2f*!%2f*.key~data=hdntl~hmac=763e294857a4578d5c9066b7483f749e94faa7b5c5172e24b0434ecc7c5c2372/chunklist.m3u8?aka_me_session_id=AAAAAAAAAAAAaZVmAAAAAC78xDsfsaq3ONNCfroYNPOewAS%2fPG%2fPfLwD9%2fwsoKRmBU744G4O%2fVZXUP40CCABAgmtG4cRm5BB&aka_media_format_type=hls
2024-07-14 20:22:57.039 T:2338  warning <general>: AddOnLog: inputstream.adaptive: Cannot create sample reader due to unhandled representation container type
2024-07-14 20:22:57.039 T:2338    error <general>: OpenStream: Codec id 27 require extradata.
2024-07-14 20:22:57.039 T:2338  warning <general>: OpenStream - Unsupported stream 1001. Stream disabled.
2024-07-14 20:22:57.039 T:2338     info <general>: Opening stream: 1002 source: 256
2024-07-14 20:22:57.121 T:2338    error <general>: AddOnLog: inputstream.adaptive: Download failed, HTTP error 403: https://raiuno1-live.akamaized.net/hls/live/598308/raiuno1/raiuno1/itarai1_160/exp=1721067776~acl=%2fhls%2flive%2f598308%2fraiuno1%2f*!%2fhls%2flive%2f598308-b%2fraiuno1%2f*!%2f*.key~data=hdntl~hmac=763e294857a4578d5c9066b7483f749e94faa7b5c5172e24b0434ecc7c5c2372/chunklist_ao.m3u8?aka_me_session_id=AAAAAAAAAAAAaZVmAAAAAC78xDsfsaq3ONNCfroYNPOewAS%2fPG%2fPfLwD9%2fwsoKRmBU744G4O%2fVZXUP40CCABAgmtG4cRm5BB&aka_media_format_type=hls
2024-07-14 20:22:57.121 T:2338  warning <general>: AddOnLog: inputstream.adaptive: Cannot create sample reader due to unhandled representation container type
2024-07-14 20:22:57.121 T:2338     info <general>: Finding audio codec for: 86018
2024-07-14 20:22:57.123 T:2338     info <general>: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac
2024-07-14 20:22:57.123 T:2338     info <general>: OpenStream: Allowing max Out-Of-Sync Value of 10 ms
2024-07-14 20:22:57.123 T:2338     info <general>: Creating audio thread
2024-07-14 20:22:57.123 T:2342     info <general>: running thread: CVideoPlayerAudio::Process()
2024-07-14 20:22:57.124 T:2338     info <general>: Process - eof reading from demuxer
2024-07-14 20:22:57.124 T:2338     info <general>: CVideoPlayer::OnExit()
2024-07-14 20:22:57.124 T:2338     info <general>: VideoPlayer: eof, waiting for queues to empty
2024-07-14 20:22:57.124 T:2338     info <general>: Closing stream player 1
2024-07-14 20:22:57.124 T:2338     info <general>: Waiting for audio thread to exit
2024-07-14 20:22:57.133 T:2342     info <general>: thread end: CVideoPlayerAudio::OnExit()
2024-07-14 20:22:57.134 T:2338     info <general>: Closing audio device
2024-07-14 20:22:57.134 T:2338     info <general>: Deleting audio codec
2024-07-14 20:22:57.134 T:2338     info <general>: ADDON: Dll Destroyed - InputStream Adaptive
2024-07-14 20:22:57.248 T:2320     info <general>: Deleting settings information for files plugin://plugin.video.raitv/?mode=play&url=https%3A%2F%2Fmediapolis.rai.it%2Frelinker%2FrelinkerServlet.htm%3Fcont%3D2606803
2024-07-14 20:22:57.257 T:1436     info <general>: CVideoPlayer::CloseFile()
2024-07-14 20:22:57.257 T:1436     info <general>: VideoPlayer: waiting for threads to exit
2024-07-14 20:22:57.257 T:1436     info <general>: VideoPlayer: finished waiting
2024-07-14 20:22:57.257 T:1436     info <general>: CVideoPlayer::CloseFile()
2024-07-14 20:22:57.257 T:1436     info <general>: VideoPlayer: waiting for threads to exit
2024-07-14 20:22:57.257 T:1436     info <general>: VideoPlayer: finished waiting

trying to watch RAI1 telegiornale

denics commented 1 month ago

Ora l' errore è differente, praticamente usando il live si può vedere solo il canale sport :( . provando a usare Rai2 ho:

2024-07-27 17:13:19.562 T:1442     info <general>: VideoPlayer::OpenFile: plugin://plugin.video.raitv/?mode=play&url=https%3A%2F%2Fmediapolis.rai.it%2Frelinker%2FrelinkerServlet.htm%3Fcont%3D308718
2024-07-27 17:13:19.587 T:8215     info <general>: Creating InputStream
2024-07-27 17:13:19.589 T:8215  warning <general>: AddOnLog: inputstream.adaptive: Warning "inputstream.adaptive.manifest_type" property is deprecated and will be removed next Kodi version, the manifest type is now automatically detected.
                                                   If you are using a proxy remember to add the appropriate "content-type" header to the HTTP manifest response
                                                   See Wiki page "How to provide custom manifest/license" to learn more about it.
2024-07-27 17:13:19.591 T:8215     info <general>: AddOnLog: inputstream.adaptive: [Repr. chooser] Resolution set: 1920x1080, max allowed: 3840x2160, Adjust refresh rate: 0
2024-07-27 17:13:19.913 T:8215    error <general>: AddOnLog: inputstream.adaptive: ParseManifest: Non-compliant HLS manifest, #EXTM3U tag not found.
2024-07-27 17:13:19.913 T:8215    error <general>: AddOnLog: inputstream.adaptive: Open: Failed to parse the manifest file
2024-07-27 17:13:19.913 T:8215    error <general>: AddOnLog: inputstream.adaptive: Cannot parse the manifest (https://download-rai-it.akamaized.net/video_no_available.mp4|User-Agent=Mozilla%2F5.0+%28X11%3B+Linux+x86_64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F121.0.0.0+Safari%2F537.36%26Accept%3D%2A%2F%2A%26Accept-Encoding%3Dgzip%2Cdeflate%2Cbr%26Accept-Language%3Dit-IT%2Cit%3Bq%3D0.9%2Cen-US%3Bq%3D0.8%2Cen%3Bq%3D0.7%26Connection%3Dkeep-alive%26Origin%3Dhttps%3A%2F%2Fwww.raiplay.it%26Referer%3Dhttps%3A%2F%2Fwww.raiplay.it%2F%26sec-ch-ua%3D%22Not+A%28Brand%22%3Bv%3D%2299%22%2C%22Google+Chrome%22%3Bv%3D%22121%22%2C%22Chromium%22%3Bv%3D%22121%22%26sec-ch-ua-mobile%3D%3F0%26sec-ch-ua-platform%3D%22Linux%22)
2024-07-27 17:13:19.913 T:8215    error <general>: CVideoPlayer::OpenInputStream - error opening [plugin://plugin.video.raitv/?mode=play&url=https%3A%2F%2Fmediapolis.rai.it%2Frelinker%2FrelinkerServlet.htm%3Fcont%3D308718]
2024-07-27 17:13:19.913 T:8215     info <general>: CVideoPlayer::OnExit()
2024-07-27 17:13:19.913 T:8215     info <general>: ADDON: Dll Destroyed - InputStream Adaptive
2024-07-27 17:13:19.987 T:5898     info <general>: Deleting settings information for files plugin://plugin.video.raitv/?mode=play&url=https%3A%2F%2Fmediapolis.rai.it%2Frelinker%2FrelinkerServlet.htm%3Fcont%3D308718
2024-07-27 17:13:19.996 T:1442     info <general>: CVideoPlayer::CloseFile()
2024-07-27 17:13:19.997 T:1442     info <general>: VideoPlayer: waiting for threads to exit
2024-07-27 17:13:19.997 T:1442     info <general>: VideoPlayer: finished waiting
maxbambi commented 1 month ago

Dà errore perché ha caricato un indirizzo di video fake https://download-rai-it.akamaized.net/video_no_available.mp4 ll motivo di ciò non lo so... a me adesso funziona regolare, però sono in Italia

filippobistaffa commented 1 week ago

Anche io credo di avere un problema simile, mi trovo in Spagna (con VPN) e da browser funziona tutto correttamente. Quando provo a visualizzare le dirette in Kodi ottengo il seguente errore:

2024-08-29 22:39:04.991 T:98014    info <general>: VideoPlayer::OpenFile: plugin://plugin.video.raitv/?mode=play&url=https%3A%2F%2Fmediapolis.rai.it%2Frelinker%2FrelinkerServlet.htm%3Fcont%3D308718
2024-08-29 22:39:05.060 T:112165    info <general>: Creating InputStream
2024-08-29 22:39:05.062 T:112165    info <general>: AddOnLog: inputstream.adaptive: [Repr. chooser] Resolution set: 1920x1080, max allowed: 1920x1080, Adjust refresh rate: 0
2024-08-29 22:39:05.673 T:112165   error <general>: AddOnLog: inputstream.adaptive: CreateAdaptiveTree: Cannot detect the manifest type.
                                                   Check if the content-type header is correctly provided in the manifest response.
2024-08-29 22:39:05.673 T:112165   error <general>: CVideoPlayer::OpenInputStream - error opening [plugin://plugin.video.raitv/?mode=play&url=https%3A%2F%2Fmediapolis.rai.it%2Frelinker%2FrelinkerServlet.htm%3Fcont%3D308718]
emanuele commented 1 week ago

Nessun problema da parte mia invece. Però, come scritto in precedenza, tutto ha iniziato a funzionare tempo fa quando iniziai a utilizzare la VPN (Openvpn) direttamente sul router tramite cui la macchina con kodi (raspberry pi) è connessa alla rete. Utilizzare openvpn direttamente su raspberry pi OS (praticamente Debian) invece presenta tutti i problemi esposti in questo thread.

On Fri, Aug 30, 2024, 01:45 Filippo Bistaffa @.***> wrote:

Anche io credo di avere un problema simile, mi trovo in Spagna (con VPN) e da browser funziona tutto correttamente. Quando provo a visualizzare le dirette in Kodi ottengo il seguente errore:

2024-08-29 22:39:04.991 T:98014 info : VideoPlayer::OpenFile: plugin://plugin.video.raitv/?mode=play&url=https%3A%2F%2Fmediapolis.rai.it%2Frelinker%2FrelinkerServlet.htm%3Fcont%3D308718 2024-08-29 22:39:05.060 T:112165 info : Creating InputStream 2024-08-29 22:39:05.062 T:112165 info : AddOnLog: inputstream.adaptive: [Repr. chooser] Resolution set: 1920x1080, max allowed: 1920x1080, Adjust refresh rate: 0 2024-08-29 22:39:05.673 T:112165 error : AddOnLog: inputstream.adaptive: CreateAdaptiveTree: Cannot detect the manifest type. Check if the content-type header is correctly provided in the manifest response. 2024-08-29 22:39:05.673 T:112165 error : CVideoPlayer::OpenInputStream - error opening [plugin://plugin.video.raitv/?mode=play&url=https%3A%2F%2Fmediapolis.rai.it%2Frelinker%2FrelinkerServlet.htm%3Fcont%3D308718]

— Reply to this email directly, view it on GitHub https://github.com/maxbambi/plugin.video.raitv/issues/79#issuecomment-2318949558, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAQ55TWXUYHFWBNULUHL63ZT6B5JAVCNFSM6AAAAABJL44V5SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJYHE2DSNJVHA . You are receiving this because you were mentioned.Message ID: @.***>