Skip to content
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

Sample HLS with DISCONTINUITY cause high playback delay #1228

Open
1 of 7 tasks
CastagnaIT opened this issue Apr 18, 2023 · 2 comments
Open
1 of 7 tasks

Sample HLS with DISCONTINUITY cause high playback delay #1228

CastagnaIT opened this issue Apr 18, 2023 · 2 comments

Comments

@CastagnaIT
Copy link
Collaborator

CastagnaIT commented Apr 18, 2023

Bug report

Describe the bug

Here is a clear and concise description of what the problem is:

Following sample stream

#KODIPROP:inputstream=inputstream.adaptive
#KODIPROP:inputstreamaddon=inputstream.adaptive
#KODIPROP:inputstream.adaptive.manifest_type=hls
#KODIPROP:inputstream.adaptive.license_type=com.widevine.alpha
#KODIPROP:inputstream.adaptive.license_key=https://cwip-shaka-proxy.appspot.com/no_auth||R{SSM}|
https://storage.googleapis.com/shaka-demo-assets/angel-one-widevine-hls/hls.m3u8

have a discontinuity and looks like that switching to a new period due to it cause
reinitialization of DRM and reset kodi VP with DEMUX_SPECIALID_STREAMCHANGE
this cause a high delay on the playback and then bad playback experience

atm i have not investigated on what could be done,
if we find a way to avoid reinitialize the DRM could be already an improvement
since DEMUX_SPECIALID_STREAMCHANGE is currently a stone in the #ss
that we already know that its behaviour is not so suited to adaptive streams

To Reproduce

Steps to reproduce the behavior:

  1. play strm above

Debuglog

The debuglog can be found here:
kodi.log

MPD/M3U8s/ISM

An example or copy of a manifest (or manifests for HLS - master and variants) can be found here:
manifest_1681819270_master.txt
manifest_1681819272_masterchild-video.txt

Screenshots

Here are some links or screenshots to help explain the problem:

Additional context or screenshots (if appropriate)

Here is some additional context or explanation that might help:

Your Environment

Used Operating system:

  • Android

  • iOS

  • tvOS

  • Linux

  • OSX

  • Windows

  • Windows UWP

  • Operating system version/name: windows 11

  • Kodi version: tested on 19/20/21

  • inputstream.adaptive version: Omega branch

note: Once the issue is made we require you to update it with new information should that be required.
Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.

@glennguy
Copy link
Contributor

I'm familiar with this stream

The first 2 segments are no encrypted so the discontinuity is there to signal that something must be done for the incoming encryption for segments 3+.
Therefore this is not a reinitialization of DRM but initialization.

It's more noticeable than a typical period change because there's actually no change or discontinuity in the video itself, compared to say having ads in a program where the screen would normally fade black as a transition.

I think previously either you or Matt Huisman tested the effect of stream changing on multiple devices which gave different results depending on the platform. Some are able to give a more seamless change but my understanding is that VP only allows one codec open at a time, so maybe when the device can't act quick enough we see a small black screen?

It would be useful to create a test with the clear version of that stream by modifying with a discontinuity tag in the same spot, and seeing if we get the same artifacts. I can try to organise this.

@CastagnaIT
Copy link
Collaborator Author

hmm yes also depends from device, better mention this
for example i tested over "cheap" android device
results that when change period playback stuck for ~4secs after that playback its weird and stop

testing over windows as debug build
works better but bad transition

i have opened this issue to keep in mind it
we will see in future we have a lot of other things to do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants