-
Notifications
You must be signed in to change notification settings - Fork 245
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
Add support for Periods #287
Comments
@mediaminister Maybe you have some knowledge of this? |
Take a look at my test branch: https://github.com/mediaminister/inputstream.adaptive/tree/test Maybe @peak3d can give us some tips where to start in the codebase to implement this? |
@peak3d can you take a look at how we solve this best? |
I've thought a bit about this, and talked with @dagwieers about this, I guess the only correct implementation is some kind of playlist that contains all the Periods and plays them one by one. Please correct me when I'm mistaken with some of my assumptions.
|
thx @michaelarnauts, this helps to get an idea about the topic and makes sense. |
I've just struck a multiple period stream as well. Maybe a good start is first just updating the code to use the 1st period found. |
With other streams the first period may be a commercial... |
I'm thinking if there is anyway I can proxy the mpd file to merge the periods myself. |
Yeah, so choosing the first or last period will most likely makes one party happy, and breaks it for another party. At least it may break things that were working flawlessly today (e.g. VTM GO children shows). Another option coined by @peak3d was to play the largest segment, which would be the better option for the cases where there is only one real segment. But it would fail for the reporter of the issue. So personally I would not look at quick fixes as they are a distraction for doing what is needed. PS I was honestly surprised that Kodi (or inputstream.adaptive) is having its own implementation for handling manifests etc. Surely other Open Source media players have the same needs and possibly a better/more complete implementation? Possibly something we can collaborate on? |
Anyone can point me to a free resource / .strm file where protected content is inside a multi period manifest? |
IMO we don't want to skip the ads per se. If the business model of the content provider is advertisements, I think we need to respect that. If that is technically not possible, then that is how it is and up to the add-on developer to either make the user aware of the terms of use or disclaim any rights. If it would be possible to also avoid forwarding ads then I would keep such an option open for the add-on. That's my opinion. |
VTM Go works fine here, thx @dagwieers . Prevent forwarding is currently not supported by kodi, we can think later about it. Edit: Fact is also that inputstream.adaptive does not know if a period is advertisment or not. So if someone wants a special logic for adverts, the first step is to provide a logic how to dect it. |
thx @mediaminister, too, good to have different sources |
Wow peak3d moves fast: |
Nice improvement, but when I try to watch VTM Go live tv Kodi crashes with a |
@mediaminister pls. make an issue report including kodi log and maybe stack traces |
@peak3d It appears to work and on VTM GO it tends to start with a commercial (everytime a different one). The subtitles for the show however starts immediately. So somehow the subtitles ought to track the show periods only, and not the commercials to work correctly. During a period-transition the video stalls for a few seconds, and then the audio goes silent when video restarts, and then after a few seconds everything is fine again. Maybe this is related to #133 (which also still affects me). I am using the latest master build (1f109197) @michaelarnauts Normally you can use Up and Down to skip forward and backward through chapters, but this does not appear to work here. |
@dagwieers I pushed a new commit for VTM Go VOD stream types which should at least make seeking better. For your idea with external dash library: parsing the files is easy and currently there is no need to care about an external lib. The implementation, in special aligning it to kodi capabilities, takes the most time, this is completely independend from having all data read. |
@dagwieers chapter skip (up / down) only works if you have kodi installed with the IChapter PR merged |
Seeking works correctly now. Also restarting from previous offset now works correctly too. (I hadn't noticed this was broken, but now it is fixed !) |
@peak3d Oh right 🙄 |
@dagwieers The subtitles are not part of the MPEG-DASH manifest that InputStream Adaptive opens, VTM Go uses separate WEBVTT files and cues for commercials are available in the non-standard json file that contains the MPEG-DASH manifest url. Fixing the subtitle timings should be done in the VTM GO add-on. |
@mediaminister Let's discuss this in a separate ticket. My concern is that it means the VTM GO add-on needs to reimplement a lot of the Period logic in order to fix the offsets. I was hoping there was a better solution for this (i.e. get playback offset from Kodi for non-commercial periods, if that is at all feasible). |
I'll create an issue in the VTM GO repository. |
@mediaminister but therew are subs in the manifest. why provide external? |
@mediaminister created this issue: https://github.com/michaelarnauts/plugin.video.vtm.go/issues/51 I also remember seeing subtitles in the manifest, but maybe we should continue discussion regarding the subtitles in the above issue. |
@peak3d Using your latest master build, I can't play past the first period. |
@matthuisman they should play as a single stream, pls. make sure that you really have inputstream.adaptive 2.4.0 installed, master version is smaller than current Matrix. And disable auto updates of inputstream.adaptive. If this doesn't help, provide information pls. log / url / strm / mpd. whatever. |
Windows 64 Kodi 18.4 Video shows as 03:32:29 in length (correct) It stops playback at 00:37:38. If I then try to resume from that time, it fails to play. Log & MPD attached It's behind a paywall and region locked unfortunately so hopefully having a look at the mpd may help. Via their webplayer, it uses same mpd and the same total time and seeking through is ok. |
Oh wait, it appears it is actually the fullstream but the kodi timeline is out. OK, I see the issue. However, if I seek forward any, kodi jumps to the 2nd period and seeks on that. Appears seek forward or seek back both cause it to jump to 2nd period. Starts playing at start of period 1 Start playing at start of period 1 This stream does not have commercials. Attached is a new log. Once it has skipped to period 2, seeking works correctly (can't get back to period 1 though) and only plays until 37:58 |
@matthuisman I have pushed some changes today (inputstream.adaptive), but all the things will only work well if my avsync PR goes into kodi. Without this PR the chapter change is not working correctly. |
@peak3d Uses latest commit (b796ea4) build from here and latest kodi nightly (KodiSetup-20190924-7a9ced55-master-x64.) Can now seek around on 1st and 2nd segment without issue. |
@peak3d With the avsync PR being reverted, how will this continue? |
@piejanssens I'll have to spend more time on it for a different solution. |
It seems that the recent commits (I think the one related to seeking), broke seeking with periods. I can't seek beyond a period. When a new period is started, the current time position is that one of the period playing, not of the total. I've tested this with the vtm go addon. |
Thank you. And yes, you are completely right. I pushed the fix commit in master branch |
Since Periods supports is now in the Matrix branch, and soon backported in the Leia branch I would close this issue. Please open new issues for any problems encountered with the existing implementation. This makes it easier to track in isolation. Thanks everyone! cc @peak3d |
I've opened a tracking issue at https://github.com/michaelarnauts/plugin.video.vtm.go/issues/139 to keep track of the avsync issue after playing a short period. The relevant issue in inputstream.adaptive is #332 I think this issue can indeed be closed since the implemantation of Periods is done. |
I have a DASH manifest with multiple Periods, but currently, only the last Period is played (not the first as documented in the README.md).
Is there any progress being made to support this? Is this something that has to be parsed in this codebase, or does a lot has to change for this? I'm thinking about the total stream duration that should be the sum of all periods, seeking outside a period...
The text was updated successfully, but these errors were encountered: