CoreELEC with IPTV Archive support


I feel we may have got off on the wrong foot, sorry. - m3u playlist

Have a look and we can continue from there.

Thank you for your time


Many Thanks!!! for great job of implementing this feature. Got here from OpenELEC/LibreELEC to test this feature. Unfortunately latest CoreELEC master tree build on fresh Ubuntu 16.04 server failed. First error was compiling dvb-latest (disabled it since I don’t use dvb) second fail is:
muca@ubuntu:~/CoreELEC$ PROJECT=RPi DEVICE=RPi2 ARCH=arm make image
Applied patch /home/muca/CoreELEC/build.CoreELEC-RPi2.arm-9.0-devel/kodi-newclock5_18.0rc3-Leia/xbmc/pvr/channels/PVRChannel.h cleanly.
APPLY PATCH (common) packages/mediacenter/kodi/patches/kodi-ce-010-add-pvr-archive-support.patch
patching file xbmc/FileItem.cpp
Hunk #1 succeeded at 820 (offset -16 lines).
patching file xbmc/FileItem.h
patching file xbmc/cores/VideoPlayer/DVDDemuxers/CMakeLists.txt
Hunk #1 FAILED at 5.
Hunk #2 FAILED at 16.
2 out of 2 hunks FAILED – saving rejects to file xbmc/cores/VideoPlayer/DVDDemuxers/CMakeLists.txt.rej
patching file xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpeg.h
Hunk #1 succeeded at 77 (offset 1 line).
Hunk #2 succeeded at 122 (offset 1 line).
patching file xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpegArchive.cpp
patching file xbmc/cores/VideoPlayer/DVDDemuxers/DVDDemuxFFmpegArchive.h
patching file xbmc/cores/VideoPlayer/DVDDemuxers/DVDFactoryDemuxer.cpp
patching file xbmc/cores/VideoPlayer/DVDInputStreams/CMakeLists.txt
patching file xbmc/cores/VideoPlayer/DVDInputStreams/DVDFactoryInputStream.cpp
patching file xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStream.h
Hunk #2 succeeded at 182 (offset 12 lines).
patching file xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStreamFFmpegArchive.cpp
patching file xbmc/cores/VideoPlayer/DVDInputStreams/DVDInputStreamFFmpegArchive.h
patching file xbmc/pvr/PVRManager.cpp
Hunk #1 succeeded at 921 (offset 62 lines).
Makefile:12: recipe for target ‘image’ failed
make: *** [image] Error 1

Is there any chance to get build working for RPi ?


The RPi build uses a Kodi fork, which has a modified xbmc/cores/VideoPlayer/DVDDemuxers/CMakeLists.txt file.
You can probably modify the kodi-ce-010-add-pvr-archive-support.patch file to reflect these changes and then it will apply cleanly and should work.


Ok, got it working by correcting CMakeLists.txt patch and disabling some other already applied patches. Testing now. Thank You!
It’s awesome! I like fast and flawless seeking with almost negligible buffering (if any). Couple of times got negative seeking (outside programm boundaries). In such case stream is stuck and unusable, but I can’t repeat such issue now. Also had some kodi crashes, but this could be due to custom build for RPi


I enabled “Play from EPG in Live TV mode” and the video plays fine, but I cannot seek back and forth. I enabled logging and found out that demuxer CDVDDemuxFFmpeg was opened for the video instead of CDVDDemuxFFmpegArchive. What could be the cause? I’m using CE 8.95.7.


Currently it only works when the URL ends with m3u8\php. Could you PM me a debug log?


Hi, musca78
how can you make image for rpi? I can’t find any instructions. I would be very grateful for a small manual just in few steps


You can follow this guide:
Just use the CoreELEC repo instead. You’ll also have to build the iptvarchive addon (after the image is finished building)
PROJECT=RPi DEVICE=RPi2 ARCH=arm scripts/create_addon pvr.iptvarchive


Thanx for link!
I get first compiling error with dvb:
FAILURE: make_target for package dvb-latest did not succeed!
how can I disable dvb?


It should be in projects/RPi/options.
But you’ll also have to modify the patch file, as discussed above with musca78.


Does this give more info


so, kodi-ce-010-add-pvr-archive-support.patch` patched Ok,
but there’s next error with patching Archive.h

APPLY PATCH (common) packages/mediacenter/kodi/patches/kodi-popcornmix-001-improved-file-buffering-in-carchive.patch
patching file xbmc/utils/Archive.h
Hunk #1 FAILED at 155.
Hunk #2 FAILED at 170.
2 out of 2 hunks FAILED – saving rejects to file xbmc/utils/Archive.h.rej
Makefile:12: recipe for target ‘image’ failed
make: *** [image] Error 1

I don’t know what to do… I cant’s see any difference in file code and patch
may be building image for RPI2 is not a good idea…


Maybe safest path would be to copy packages/mediacenter/kodi-binary-addons/pvr.iptvarchive from CoreELEC to LibreELEC and build there RPi2?:hugs:


@muca78 managed to build it. He should post the changes made for others to use if they want.
I don’t think just moving the pvr patch over will work.


Guys , it was a long time ago, (keeping in mind christmas and new year holidays). I had a lot of trial/error tries and now I don’t remember everything I did. Building pvr.iptvarchive in Libreelec is not working. Now I got armlogic “s905w 2G/16G” device just for 35$ and I am not interested to build it for RPi anymore. My last sucessful build is from 25.12 and it still have KODI crashing time to time after longer archive programm or YouTube watching. If somebody is interested I can share target (CoreElec images and addon ZIPs)


It looks like this patch was already applied since I renamed file “kodi-popcornmix-001-improved-file-buffering-in-carchive.patch” to disable this patch.


Hello all,
Been trying for hours to set this up with my iptv provide. I know it has catch-up because it works on iptv smarters app. But I can’t seem to set the proper settings on the add-on.

Below is the for one of the catch-up string, I have changed the personal info, if some could guide on what are the settings for the archive. I would highly appreciated. Ths!


Here the URL, http://Domain:80/get.php?username=Test&password=Test&type=m3u_plus&output=m3u8


It does not wok for me. Main m3u is like this:

#EXTINF:0 tvg-id=“channel-id” tvg-logo=“logo url” country=“pl” audio-track=“pl” group-title=“Tite” ,Channel Name

When I open http://url/m3u8ar2.php?token=token&name=1 I’m getting this:

Any ideas? I guess you don’t support this archive format.


You need to know how to access the archive for your IPTV provider.
Opening the m3u8 of a channel doesn’t provide you any information on that. What you see is pretty standard.