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

Streaming IPTV Channels from Kodi #964

Open
phunkyfish opened this issue Sep 14, 2019 · 33 comments
Open

Streaming IPTV Channels from Kodi #964

phunkyfish opened this issue Sep 14, 2019 · 33 comments

Comments

@phunkyfish
Copy link
Contributor

phunkyfish commented Sep 14, 2019

Hey,

I've recently added support to the kodi pvr addon for Enigma2 to be able to play live IPTV streams. It's simply extracts the IPTV stream URL from the service reference and passes it to kodi.

Here's an example sRef: 1:0:1:909:63:27:FFFF0000:0:0:0:http%3a//my.iptvprovider.net%3a8000/live/channels/mychannel.ts

However this means the experience is different to DVB channels in that you can't use timeshift etc., you can only stop or record.

Would it be possible to stream these channels like other channels through OpenWebIf so the same feature set can be experienced regardless of channel type?

Thanks in advance.

Note: The majority of images now support viewing/timeshifting of IPTV.

@phunkyfish phunkyfish changed the title Streaming IPTV Channels to Kodi Streaming IPTV Channels from Kodi Sep 14, 2019
@phunkyfish
Copy link
Contributor Author

@jbleyel any thoughts on the above?

@phunkyfish
Copy link
Contributor Author

Any update?

@jbleyel
Copy link
Contributor

jbleyel commented Nov 1, 2019

What's the exact issue?
Do you have a problem with openwebif?

@phunkyfish
Copy link
Contributor Author

Yes, if I try to open a stream whose sRef contains an IPTV url as above the stream does not open. Let me post some examples.

@jbleyel
Copy link
Contributor

jbleyel commented Nov 1, 2019

Where exactly do you open this stream?

@phunkyfish
Copy link
Contributor Author

I open the stream from Kodi. For a regular channel I would stream this a URL like this:

http://192.168.1.201:8001/1:0:2:1932:7FF:2:11A0000:0:0:0

But for IPTV I try to stream a URL like this but it fails:

http://192.168.1.201:8001/1:0:1:909:63:27:FFFF0000:0:0:0:http%3a//my.iptvprovider.net%3a8000/live/channels/mychannel.ts

@jbleyel
Copy link
Contributor

jbleyel commented Nov 1, 2019

This needs to do in Kodi because you are getting only the channel refs.
I don't want modify the srefs.

@phunkyfish
Copy link
Contributor Author

Can you explain a bit more? I.e. how I should modify the sRef so it would work?

@phunkyfish
Copy link
Contributor Author

I had assumed that the channelRef was the sRef.

@jbleyel
Copy link
Contributor

jbleyel commented Nov 1, 2019

You can use this small check
sref starts with 4097: or 5002:
or sref contains :http%3a or :https%3a

@phunkyfish
Copy link
Contributor Author

Ok, so if it’s any of those 3 types what should I do differently?

What I have noticed is that I can stream from kodi if I also play the channel directly on the receiver. But if I stop playing on the receiver it will stop on kodi. I’m wondering if a change is needed on Enigma2 to enable this.

@AbuBaniaz - any thoughts?

@jbleyel
Copy link
Contributor

jbleyel commented Nov 1, 2019

If you detect IPTV you need to remove the sref and start the stream directly.

1:0:1:909:63:27:FFFF0000:0:0:0:http%3a//my.iptvprovider.net%3a8000/live/channels/mychannel.ts

Remove 1:0:1:909:63:27:FFFF0000:0:0:0:
Replace %3a with : and play directly

@phunkyfish
Copy link
Contributor Author

phunkyfish commented Nov 1, 2019

Sorry, I think our wires got crossed. This I already do from the kodi addon. It works however as kodi handles the stream it’s not possible to timeshift.

As stated in my previous post I can however stream this URL from kodi so timeshift will work:

http://192.168.1.201:8001/1:0:1:909:63:27:FFFF0000:0:0:0:http%3a//my.iptvprovider.net%3a8000/live/channels/mychannel.ts

But this will only work if the Enigma2 is also viewing the same stream.

The intention is to be able to timeshift an IPTV stream whether you view it directly on the Enigma2 device or via the Kodi PVR addon.

@jbleyel
Copy link
Contributor

jbleyel commented Nov 1, 2019

This sounds like a enigma2 limitation and therefore not openwebif related.

@phunkyfish
Copy link
Contributor Author

phunkyfish commented Nov 1, 2019

I agree. I think once fixed on Enigma2 OpenWebIf will just work.

@AbuBaniaz
Copy link
Contributor

You can use this small check
sref starts with 4097: or 5002:
or sref contains :http%3a or :https%3a

DVB service references start with 1. If it does not start with 1, it is a stream
fields[0] != '1':

@jbleyel
Copy link
Contributor

jbleyel commented Nov 1, 2019

NO!!
This is also a valid IPTV ref 1:0:1:909:63:27:FFFF0000:0:0:0:http%3a//my.iptvprovider.net%3a8000/live/channels/mychannel.ts

@AbuBaniaz
Copy link
Contributor

Yes, you are right

Athoik committed this which might be better method.
OpenPLi/enigma2@8831e3a

@phunkyfish
Copy link
Contributor Author

phunkyfish commented Nov 1, 2019

Great, and do you think that is why the stream won't start via openwebif?

Happy to test it once it appears as a Vix update.

@AbuBaniaz
Copy link
Contributor

I don't know, sorry.

Doesn't OWIF not have a debug you can check?

@phunkyfish
Copy link
Contributor Author

This is what is in the standard enigma log:

< 36920.123> [eDVBServiceStream] stream ref: 1:0:1:909:63:27:FFFF0000:0:0:0:http://my.iptvprovider.net:8000/live/channels/mychannel.ts
< 36920.124> [eDVBResourceManager] allocate channel.. 0000:0000
< 36920.124> [eDVBResourceManager] available channel.. 0802:0002
< 36920.124> [eDVBResourceManager] channel not found!
< 36920.124> [eDVBServicePMTHandler] allocate Channel: res -5
< 36920.124> [eDVBServiceStream] STREAM service event 10
< 36920.124> [eDVBServiceStream] stop streaming m_state 1

@phunkyfish
Copy link
Contributor Author

If it's already playing on E2 device and it streams to kodi:

 37174.633> [eDVBServiceStream] stream ref: 1:0:1:909:63:27:FFFF0000:0:0:0:http://my.iptvprovider.net:8000/live/channels/mychannel.ts
< 37174.633> [eDVBResourceManager] allocate channel.. 0000:0000
< 37174.633> [eDVBResourceManager] available channel.. 0000:0000
< 37174.633> [eDVBResourceManager] found shared channel..
< 37174.633> [eDVBServicePMTHandler] allocate Channel: res 0
< 37174.633> [eDVBCIInterfaces] addPMTHandler 1:0:1:909:63:27:FFFF0000:0:0:0:
< 37174.633> [eDVBChannel] getDemux cap=01
< 37174.633> [eDVBServicePMTHandler] ok ... now we start!!
< 37174.633> [eDVBDemux] open demux /dev/dvb/adapter0/demux22

@AbuBaniaz
Copy link
Contributor

To me this usage can be described as a man in the middle approach. You are trying to make E2 play the stream so you can timeshift it on Kodi. When you stream a DVB item, DVB resources are being used on the receiver. If E2 does not have to use DVB resources, it won't play it, it will just refer it.

Your description suggests that the referral is being done.

It is and illogical approach to uses resources when you don't need to.

@phunkyfish
Copy link
Contributor Author

All this makes the assumption that the streams are viewed directly on the receiver. My receiver is purely used as a stream server I only view it directly when modifying settings. Many users use their receivers this way now.

I think it’s fair to support that use case.

@AbuBaniaz
Copy link
Contributor

I disagree.

People are likely to watch FTA and streams on their receiver. Not use their E2 boxes just as referrers.

What's the point having the box if you are not using it other than to provide a service reference for another device to use. No viewing, no recording.

Anyway everyone uses their boxes differently. Best to accommodate as many people as possible.

@phunkyfish
Copy link
Contributor Author

I think that’s the key point. Many users have evolved the way they use their devices. I see more and more users who use every function and more of their E2 device using OpenWebIf as the remote API.

The API can be enriched with the likes of the kodi addon adding features that were previously unavailable.

@jbleyel
Copy link
Contributor

jbleyel commented Nov 7, 2019

Hi @phunkyfish , i don't understand your real problem.
You are want to stream a IPTV via openwebif directly on a PC or other device.
This function is implemented already.

@AbuBaniaz
Copy link
Contributor

Then we go back to the original point jebyel made.

You are playing back the stream using Kodi. All you want is the stream details from the receiver. Receiver just hosts the list of streams.

IMO this is an OWIF issue, not E2.

What I gather you are saying is as follows: Kodi playing stream directly does not allow pausing.

You must use E2 as a man in the middle attack to facilitate the pausing.

If this is correct, we need a function in OWIF to stream out and play in background on E2.

@phunkyfish
Copy link
Contributor Author

Yes, I believe that is correct @AbuBaniaz

@jbleyel is this possible?

@jbleyel
Copy link
Contributor

jbleyel commented Nov 8, 2019

I have no idea how to implement this.

@charzelo
Copy link

Hey,

I've recently added support to the kodi pvr addon for Enigma2 to be able to play live IPTV streams. It's simply extracts the IPTV stream URL from the service reference and passes it to kodi.

Here's an example sRef: 1:0:1:909:63:27:FFFF0000:0:0:0:http%3a//my.iptvprovider.net%3a8000/live/channels/mychannel.ts

However this means the experience is different to DVB channels in that you can't use timeshift etc., you can only stop or record.

Would it be possible to stream these channels like other channels through OpenWebIf so the same feature set can be experienced regardless of channel type?

Thanks in advance.

Note: The majority of images now support viewing/timeshifting of IPTV.

Hello Mate, did you find a way around this. For It works perfectly fine with VLC on iphone but playing IPTV from openwebif on a pc comes out with errors

@phunkyfish
Copy link
Contributor Author

This is implemented in the kodi add-on now.

@charzelo
Copy link

This is implemented in the kodi add-on now.

Thanks I will check it out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants