Kodi Community Forum
IPTV Simple now supports Catchup and Timeshifted Catchup in Kodi Matrix - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: PVR & Live TV Support (https://forum.kodi.tv/forumdisplay.php?fid=167)
+---- Forum: IPTV Simple Client (https://forum.kodi.tv/forumdisplay.php?fid=215)
+---- Thread: IPTV Simple now supports Catchup and Timeshifted Catchup in Kodi Matrix (/showthread.php?tid=351431)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34


RE: IPTV Simple now supports Catchup and Timeshifted Catchup in Kodi Matrix - ultraman - 2020-07-02

(2020-07-01, 23:04)phunkyfish Wrote:
(2020-06-30, 14:52)ultraman Wrote: Or to play some channel at specified time?
It should be possible via the JSOn api
Sure, it should. The question is how? Smile  I can't find any time parameter.


RE: IPTV Simple now supports Catchup and Timeshifted Catchup in Kodi Matrix - phunkyfish - 2020-07-02

(2020-07-02, 14:32)ultraman Wrote:
(2020-07-01, 23:04)phunkyfish Wrote:
(2020-06-30, 14:52)ultraman Wrote: Or to play some channel at specified time?
It should be possible via the JSOn api
Sure, it should. The question is how? Smile  I can't find any time parameter.

I would assume you would have to read the EPG entries via the API and then then play one of those entries. You wouldn't be able to play a particular time without there being an EPG entry for it.


RE: IPTV Simple now supports Catchup and Timeshifted Catchup in Kodi Matrix - ultraman - 2020-07-02

(2020-07-02, 14:45)phunkyfish Wrote: I would assume you would have to read the EPG entries via the API and then then play one of those entries.
Even this is unknown how. But if I can't specify exact time then it doesn't really matter.

Maybe I should describe what I'm doing (with hacky way) for almost 3 years. I'm using some python code which monitors when TV channel playback is stopped. At that time I save the information for current channel and it's stop time. And later I can start playing TV channel exactly at that same time - to continue playing. But to pass information about time to start playing I'm using temporary file connected between my pyton code and pvr.iptvsimple addon where I overwrite time set by addon itself. And it works great.


RE: IPTV Simple now supports Catchup and Timeshifted Catchup in Kodi Matrix - phunkyfish - 2020-07-02

(2020-07-02, 14:52)ultraman Wrote:
(2020-07-02, 14:45)phunkyfish Wrote: I would assume you would have to read the EPG entries via the API and then then play one of those entries.
Even this is unknown how. But if I can't specify exact time then it doesn't really matter.

Maybe I should describe what I'm doing (with hacky way) for almost 3 years. I'm using some python code which monitors when TV channel playback is stopped. At that time I save the information for current channel and it's stop time. And later I can start playing TV channel exactly at that same time - to continue playing. But to pass information about time to start playing I'm using temporary file connected between my pyton code and pvr.iptvsimple addon where I overwrite time set by addon itself. And it works great.
That sounds like a pretty good feature for catchup. I don't think it would be too hard to implement either. The hard part is I don't know how to differentiate between live playback and resumed playback. Any ideas?


RE: IPTV Simple now supports Catchup and Timeshifted Catchup in Kodi Matrix - ultraman - 2020-07-02

(2020-07-02, 16:23)phunkyfish Wrote: That sounds like a pretty good feature for catchup. I don't think it would be too hard to implement either. The hard part is I don't know how to differentiate between live playback and resumed playback. Any ideas?
I don't know how you would implement this but my current hack is something like that (not yet fully implemented on Kodi Matrix - was spending time on others 2/3 PR's Smile).
I noticed that the start time of playing tv channel is here https://github.com/kodi-pvr/pvr.iptvsimple/blob/Matrix/src/iptvsimple/CatchupController.cpp#L65

I write epoch time in temporary file and start playing LIVE channel with json command
Code:
'{"jsonrpc": "2.0", "id": 1, "method": "Player.Open", "params": {"item": {"channelid": %d}}}' % channelid
Here I overwrite m_timeshiftBufferStartTime with a value from a temporary file set before. And this value is actually time in seconds from epoch.
cpp:
m_timeshiftBufferStartTime = my_resume_epoch_time - Settings::GetInstance().GetCatchupDaysInSeconds();
It starts playing channel at specified time and also EPG info is correct for current event. And I can also seek forward and backward.

I'm 100% sure you can do it properly and others can enjoy in a new feature.

So you need to save end time for every channel and enable new menu for playing.

I also have another feature working: start last TV channel playing live or from last time :-)


RE: IPTV Simple now supports Catchup and Timeshifted Catchup in Kodi Matrix - phunkyfish - 2020-07-02

Cool, let me take a look. Do you have this in a branch somewhere @ultraman


RE: IPTV Simple now supports Catchup and Timeshifted Catchup in Kodi Matrix - ultraman - 2020-07-02

(2020-07-02, 16:51)phunkyfish Wrote: Cool, let me take a look. Do you have this in a branch somewhere
No, because it is such a hack Rofl

But you can easily test if this works for you by changing m_timeshiftBufferStartTime line like I wrote above. Just use some hardcoded value in
cpp:
second now - 3600
and you should get playing a channel from one hor back.


RE: IPTV Simple now supports Catchup and Timeshifted Catchup in Kodi Matrix - phunkyfish - 2020-07-03

(2020-07-02, 17:00)ultraman Wrote:
(2020-07-02, 16:51)phunkyfish Wrote: Cool, let me take a look. Do you have this in a branch somewhere
No, because it is such a hack Rofl

But you can easily test if this works for you by changing m_timeshiftBufferStartTime line like I wrote above. Just use some hardcoded value in
cpp:
second now - 3600
and you should get playing a channel from one hor back.

Yes, that will work.


RE: IPTV Simple now supports Catchup and Timeshifted Catchup in Kodi Matrix - Franky Doparoma - 2020-07-08

Hello phunkyfish,
I´d like to ask you if you can help me with another problem. My provider changed catchup url for some channels. Instead of {Y}{m}{d}_Channel_{Y}{m}{d}_{H}{M}{S}, provider is using timestamp in catchup url.
Now it looks like this:

https://archive/Channel/m3u8?starttime=1594128300000&stoptime=1594130400000.

And I don´t know how to solve it, what I should to write in catchup url in my mu playlist.

My playlist looks like this, but it doesn´t work:

#EXTINF:-1 tvg-id="Channel" tvg-logo="" group-title="" catchup="default" catchup-days="7" catchup-source="https://archive/Channel/m3u8?starttime={utc}&stoptime={utc}",Channel
https://live/channel.stream/chunklist.m3u8

Can you please help me?

Thank you very much for your time.


RE: IPTV Simple now supports Catchup and Timeshifted Catchup in Kodi Matrix - phunkyfish - 2020-07-08

For the second value use {utcend} instead of {utc}.


RE: IPTV Simple now supports Catchup and Timeshifted Catchup in Kodi Matrix - Franky Doparoma - 2020-07-09

(2020-07-08, 21:51)phunkyfish Wrote: For the second value use {utcend} instead of {utc}.
Hello phunkyfish, thanks for answer. I used utcend as you suggest, but it doesn´t work in kodi. The kodi.log shows correct catchup url, but kodi plays still the same video, it doesn´t matter if play catchup from today or yestarday, still the same. If I use the catchup url from kodi.log in vlc, everything works, but in kodi not.

EPG Catchup URL looks like: https://archive/Channel/m3u8?starttime=1594272600&stoptime=1594276200, its OK.

Edit: I just noticed, that instead of catchup it still plays current live stream, anyway catchup doesn´t work.

Any ideas what´s wrong?

Thanks for your time.


RE: IPTV Simple now supports Catchup and Timeshifted Catchup in Kodi Matrix - phunkyfish - 2020-07-10

(2020-07-09, 10:32)Franky Doparoma Wrote:
(2020-07-08, 21:51)phunkyfish Wrote: For the second value use {utcend} instead of {utc}.
Hello phunkyfish, thanks for answer. I used utcend as you suggest, but it doesn´t work in kodi. The kodi.log shows correct catchup url, but kodi plays still the same video, it doesn´t matter if play catchup from today or yestarday, still the same. If I use the catchup url from kodi.log in vlc, everything works, but in kodi not.

EPG Catchup URL looks like: https://archive/Channel/m3u8?starttime=1594272600&stoptime=1594276200, its OK.

Edit: I just noticed, that instead of catchup it still plays current live stream, anyway catchup doesn´t work.

Any ideas what´s wrong?

Thanks for your time.

Can you PM me a test stream/epg I can use to reproduce this. I can look at it on Monday. Also a full debug log would help.


RE: IPTV Simple now supports Catchup and Timeshifted Catchup in Kodi Matrix - Franky Doparoma - 2020-07-10

[/quote]

Can you PM me a test stream/epg I can use to reproduce this. I can look at it on Monday. Also a full debug log would help.
[/quote]

Hi phunkyfish,
I'll send you PM tomorrow or sunday.


RE: IPTV Simple now supports Catchup and Timeshifted Catchup in Kodi Matrix - routir - 2020-07-10

Hi, phunkyfish! Thank you for great addon!

Can you explain the pause/resume mechanism? Specially for flussonic type? 
My platlist contains catchup=“default” catchup-days=“7” catchup-source=
As well as catchup-days=“7” catchup-type="flussonic"
I set All channels support catchup using mode to disabled and everything works fine.

Does your addon makes new session upon resuming playback or just keeping the current session alive?

I need to figure out how to make the same feature into the CoreELEC IPTV Archive addon.


RE: IPTV Simple now supports Catchup and Timeshifted Catchup in Kodi Matrix - phunkyfish - 2020-07-10

(2020-07-10, 22:50)routir Wrote: Hi, phunkyfish! Thank you for great addon!

Can you explain the pause/resume mechanism? Specially for flussonic type? 
My platlist contains catchup=“default” catchup-days=“7” catchup-source=
As well as catchup-days=“7” catchup-type="flussonic"
I set All channels support catchup using mode to disabled and everything works fine.

Does your addon makes new session upon resuming playback or just keeping the current session alive?

I need to figure out how to make the same feature into the CoreELEC IPTV Archive addon.

Pause and resume should just make a call to play the stream from the pause time when you hit play. All channels support catchup using mode should be disabled by default. It’s for users where they only have one type of catchup but it’s not set in the M3U so allows them to set a default.

This addon was originally based on IPTV Archive. Once CoreElec has a Matrix version you should just be able to use this. It will be quite difficult back port features though due to this being based on a different version of kodi and is a full inputstream implementation external to kodi which allows much more control and freedom to make niche changes.

The sessioning on the addon is whatever ffmpeg does. There is nothing specific to do with sessions built in the addon.