I have been experimenting with using a Kodi device to connect to my Encoder :
https://www.amazon.com/dp/B07TKMPCZH
On the kodi device (I'm running Raspberry Pi 3B currently using LibreELEC) :
- Install Matt Huisman's HULU addon (yes, you need paid account):
- Install Matt Huisman's IPTV Merge (used to get epg/m3u8 data available):
-
start Hulu addon and "login"
-
Then start addon IPTV Merge and:
go to "Playlists" > "Add Playlist" , select "Add-on", Select "Hulu"
- In IPTV Merge setting, enable:
"General" > "HTTP API Server"
( This opens up a server on the device port 52104, where EPG and m3u8 can be accessed)
At this point, you have installed existing addons developed by Matt Huisman , and then one more piece is needed, a "middle man" addon that I am working on:
(you can download the zip at https://github.com/kcook98765/service.IPTVEncoderRedirect/archive/refs/heads/main.zip).
Currently it is hard coded ip addresses in the addon, but it is a small addon, and I will be adding settings to enable setup of custom ip addresses (like the encoder IP, port this addon runs on, etc).
Anyone should be able to play with this by editing the default.py file (only 89 lines long), to modify ip address and/or port.
This addon listens on (currently) port 9191 of the kodi device, and handles 3 types of requests:
- playlist.m3u8
This in turn calls the IPTV Merge http://localhost:52104/playlist.m3u8 url (enabled above in step 5)
This raw data though, has url's meant for internal kodi usage, so a simple substitution is made to instead call this addon, passing the original kodi link as a query parameter.
- epg.xml
This simply returns the IPTV Merge epg via http://localhost:52104/epg.xml
- play (this is intended to be called via the links modified in the playlist.m3u8 above)
This intercepts request for the channel, internally calls the kodi xbmc.executeJSONRPC on the kodi link (originally in IPTV Merge playlist.m3u8) which starts the video streaming.
It then sends a redirect to the requester to the Encoder IP using 0.ts
Anyway, this is a rough setup, but I have tested and it works, in Channels I set up a custom Channels:
http://192.168.2.9:9191/playlist.m3u8
http://192.168.2.9:9191/epg.xml
And it worked, populated the Channels EPG, and then I can play from channels (slight delay as you watch Kodi respond, then it starts the stream).
The neat thing is, you can tune the DRM channels ( as long as your Kodi can run the Widevine as noted in Matt Huisman's HULU addon, tested my local NBC and worked fine )
Also, Other streaming services can be added to kodi if they support IPTV Merge, and they should just work!)
I will be doing further work, setting up a settings area for the addon to manage Encoder url, port to run this addon on, etc.
Or maybe Matt might want to add such functionality himself to existing IPTV Merge