Custom HTTP headers ?
#1
Hi,

I am trying to configure IPTV Simple Client to use with my IPTV service. I do have to provide a subid and an stbid as http headers but I don't know how (or if I even can) to do that.

I am able to launch it from my PC with ffplay.

Thanks for your help,
Reply
#2
Can you give an example? I.e. how you do it in ffplay today?
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#3
(2019-10-11, 22:28)phunkyfish Wrote: Can you give an example? I.e. how you do it in ffplay today?

With ffplay, it works​ if I use:

ffplay -infbuf -headers $'SUBID:1\r\nSTBID:1\r\n' http://streamer.example.com/live/699/live.m3u8​​

I need those parameters so it can download the DRM key as all channels are DRM'ed

Thanks,
Reply
#4
Ok a little development:

I tried: 
http://streamer.example.com/live/699/liv...=1&STBID=1

And this is what I got:
https://paste.kodi.tv/zevitenewe.kodi

I feel I'm getting closer to a working solution though.
BTW I'm using LibreELEC/9.80 HW_RaspberryPi/1.0 App_Bitness/32 Version/19.0-ALPHA1-Git:21ab6c0
Reply
#5
Please post a full debug log. Otherwise it’s impossible get any context from your findings.
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#6
Here it is:
https://paste.kodi.tv/wapanaquza.kodi

Thanks for your help,
Reply
#7
That’s not a full debug log. You need to enable debug, then restart, repro and post the log. Thanks 😉
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#8
FYI, using the “|” approach as you have done above is correct. However kodi does not support non standard http header fields so what you want will not be possible.
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#9
(2019-10-15, 22:32)phunkyfish Wrote: FYI, using the “|” approach as you have done above is correct. However kodi does not support non standard http header fields so what you want will not be possible.

Could I turn this into a feature request ? If yes, how?
Reply
#10
The code was changed to only support documented official headers.

Let me ask why.
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#11
adding onto this topic:
Sometimes we need to also pass headers to ffmpeg, but it seems when a url is opened through the pvr client, this code never gets called
https://github.com/xbmc/xbmc/blob/master...#L246-L250
whereas if you open the url from kodi it adds all the headers to curl plus ffmpeg

is there a different StreamType that pvr client sets so I could add that to the if statement?
Reply
#12
@skydrome I’m afraid that won’t work. The code segment you refer to is when ffmpeg owns the opening of the entire stream. That won’t work for PVR when you want to handle the stream yourself in the addon. iptvsimple uses FFMpeg to open the stream so it applies here.
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#13
(2019-10-16, 23:37)phunkyfish Wrote: The code was changed to only support documented official headers.

Let me ask why.

Had any answer as why ?
I recompiled after adding my own headers and it works.
Reply
#14
(2019-10-28, 17:14)doucettom Wrote: Had any answer as why ?
I recompiled after adding my own headers and it works.

Not yet. I understand why the code looks for official headers, that makes sense. But why disallow custom headers is not clear. Some security reason no doubt but appears to be heavy handed way of closing the door.
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#15
@skydrome which pvr addon are you using where the correct headers are not being passed?
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply



Logout Mark Read Team Forum Stats Members Help
Custom HTTP headers ?0
This forum uses Lukasz Tkacz MyBB addons.