Kodi Community Forum

Full Version: Custom HTTP headers ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
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,
Can you give an example? I.e. how you do it in ffplay today?
(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,
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
Please post a full debug log. Otherwise it’s impossible get any context from your findings.
Here it is:
https://paste.kodi.tv/wapanaquza.kodi

Thanks for your help,
That’s not a full debug log. You need to enable debug, then restart, repro and post the log. Thanks 😉
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.
(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?
The code was changed to only support documented official headers.

Let me ask why.
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?
@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.
(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.
(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.
@skydrome which pvr addon are you using where the correct headers are not being passed?
Pages: 1 2 3 4 5