• 1
  • 2(current)
  • 3
  • 4
  • 5
  • 7
IPTV Simple Client with archive support
#16
Later today, I'll post my current code to GitHub so we can sync up on what I'm talking about.
Reply
#17
I made some quick proof of concept working but have major problem. When seek is executed function SeekLiveStream(position, whence) is called. The problem is that position is in bytes but I need time in seconds. How can I get this info somehow?
Reply
#18
@The Coolest ; Are you "arthur-liberman" (Arthur Liberman) on GitHub and is this the same thing being discussed here?

https://github.com/xbmc/xbmc/pull/14736

...and here?

https://github.com/CoreELEC/CoreELEC/pull/138

Sorry if that is obvious to everyone else, just wanted the reference.
Reply
#19
Isn't the archive feature the same thing as the replay/recall feature which is already implemented in zattoo pvr?
Reply
#20
@RockerC Yes, that's me.

@bruddha I am not familiar with pvr.zatoo, but it looks like the repository is dead. No new commits were made for almost 2 years.
It doesn't support playing from EPG. From a quick look, it seems to be using local caches for recordings.

iptvsimple works really well. The only problem with it is that currently it only works with live channel streams.
As I explained in more detail in post #4, some IPTV services let you start playback from a specified time instead of what is currently airing.
It's still a real time stream, it's just not of what is currently airing on the channel.
For example: You wanted to watch the latest episode of your favorite show, but you forgot or were busy. What you do, is go to the EPG, scroll back to that show, hit Play and start watching. That's the archive feature.
Now to tie this back to the "pseudo-timeshift" I'm talking about. Since you can specify any time stamp to start the stream at, as long as it's within the bounds of the service provider's buffer, we can "timeshift" back or forward in Live TV mode without keeping a physical buffer on disc, by reopening the stream with a new timestamp in the URL.
Say you start watching a show from EPG, but it has already started, you can seek back a couple of minutes and catch it right when it starts. Or if there's a commercial break, you can seek forward a few minutes to skip it. All that without using a physical buffer on your device.
Reply
#21
pvr.zattoo is not all dead. You looked at the wrong repo. @rbuehlma is the maintainer. Code is in his repo.
Reply
#22
@ksooo  @bruddha
Sorry, I guess I found the original repo.
Yes, I think it's exactly what I'm talking about. I'm not familiar with how this works on Zattoo, though.
Does Zattoo do on demand non-realtime streams? Or are the streams real time? In that case how do you skip back or forward while watching a show?
Reply
#23
(2018-10-31, 18:27)The Coolest Wrote: @ksooo  @bruddha
Sorry, I guess I found the original repo.
Yes, I think it's exactly what I'm talking about. I'm not familiar with how this works on Zattoo, though.
Does Zattoo do on demand non-realtime streams? Or are the streams real time? In that case how do you skip back or forward while watching a show?

Non real time. Implented using approach 1)

This is what I call "epg event playback". Seeking within a show is handled by Kodi (inputstream.adaptive).

What is not possible is seeking across epg event boundaries. This can currently only implemented with real timeshift support in the add-on. No other possibility for that, atm.
Reply
#24
@ksooo Ok, that's what I was thinking.
Do you have any suggestions/ideas on how to approach "our timeshift" implementation?
I'm still quite confused about inputstreams and demuxers. Maybe what we need here is a custom inputstream rather than a demuxer? After each seek, we need to reopen the stream, maybe there's no need to do anything with demuxer. Although I've spent many hours going over the code, I don't think I have a good grasp on how this whole video chain works.

Should we ping peak3d? Maybe he can shed some light on this?
Reply
#25
I will ask again: I'm sending raw stream data to Kodi (suggested implementation #2). But SeekLiveStream() call gives me bytes instead of time. How could I get actual time? If this is not possible could Kodi be extended in the future?
Reply
#26
Calculate time from offset in bytes and stream metadata like bitrate etc?
Reply
#27
IMO, we already have everything in pvr core / player we need, except "seek across epg event boundaries without a timeshift buffer". For the rest, no Kodi extensions are needed.

For that, I'm still thinking about a lightweight generic implementation in Kodi that can easily be reused by any pvr add-on.

I need a bit more time for this and if I have a (good) idea I will share it here.
Reply
#28
Why not implement 2). This will deal with the currently playing stream (live or not, it shouldn’t matter).

If you try to go beyond the current buffer it could close and reopen the stream at the new point and the local timeshift buffer would restart.

Then you get the best of both worlds. Or is the idea to completely avoid any local buffer?
Maintainer of Enigma2 PVR addon: repo, docschangelog
How to create a full debug: here
Reply
#29
We could do that, but I think it'll just over-complicate things at this stage.
The idea is to first make it possible to restart the stream with the correct URL, we could consider adding a local buffer after that works.

I've pushed a preliminary implementation of archive support to my fork of pvr.iptvsimple, here: https://github.com/arthur-liberman/xbmc/...hasarchive
Live TV works fine.
Playing from EPG doesn't display the length of the program, it doesn't poll the add-on for the length or streamtimes. In my case DVDInputStreamFFmpeg and DVDDemuxFFmpeg are used.
Image

You can also use it to test the PR I submitted to Kodi a couple of days ago: https://github.com/xbmc/xbmc/pull/14736
There's a new tab in the add-on's configuration where you can add different values to play with it if your playlist doesn't include the catchup-source/catchup-days tags, by adding a random archive URL format and choosing the number of days for archive.
The "Play from EPG in Live TV mode" is not going to work in this implementation, I just didn't remove it.
In this example I have the archive set to 1 day:
Image

I updated Confluence and pushed the changes for this feature into my repo for now.
https://github.com/arthur-liberman/skin....ts/archive
Reply
#30
(2018-11-01, 00:54)phunkyfish Wrote: Why not implement 2).
As you could read I'm trying to do that. But as I wrote
Quote:When seek is executed function SeekLiveStream(position, whence) is called. The problem is that position is in bytes but I need time in seconds. How can I get this info somehow?
So I have no information for how many seconds seek should be executed and I can't make new url for a stream to be closed and reopen.
Reply
  • 1
  • 2(current)
  • 3
  • 4
  • 5
  • 7

Logout Mark Read Team Forum Stats Members Help
IPTV Simple Client with archive support2