xbmc / inputstream.adaptive

kodi inputstream addon for several manifest types
Other
452 stars 241 forks source link

V20 | Video Freezing & Audio Buzzing (Viaplay) #1091

Closed kontell closed 3 weeks ago

kontell commented 1 year ago

Bug report

Describe the bug

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

When playing a live stream the playback either freezes or freezes with audio buzzing.

Expected Behavior

Here is a clear and concise description of what was expected to happen:

Normal playback.

Actual Behavior

Video freezes and then resumes temporarily after skipping forward. After restarting playback the video freezes & audio buzzes, skipping forward also temporality resumed playback.

Possible Fix

None

To Reproduce

Steps to reproduce the behavior:

  1. This appears to happen with some live streams from Viaplay, I've no way to consistently recreate it.

Debuglog

The debuglog can be found here: Freeze-Buzzing_kodi.log freeze_kodi.log

MPD/M3U8s/ISM

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

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:

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.

kontell commented 1 year ago

These streams have issues on V19 as well, in the below log the video freezes and skipping forward brings it back to normal (similar to the second log above). Freeze_V19-kodi.log

glennguy commented 1 year ago

Hey @kontell thanks for all the details and logs.

It's hard to tell the problem but I think it's because the audio segments aren't downloading. Looking at the freeze-buzzing log it gets stuck trying to download the audio segment after seeking: AddOnLog: inputstream.adaptive: Download failed with error 500: https://live-dash-cdn7-vp.cdn.viaplay.tv/vp/vpsports1uk/vpsports1uk.isml/dash/vpsports1uk-eng_standard=128000-80276890659967.dash

And in the freeze_kodi log, the same thing happened except with the video stream.

I can't access this stream because of geoblocking, but if you could capture another log and also download and attach the mpd file (like https://live-dash-cdn7-vp.cdn.viaplay.tv/vp/vpsports1uk/vpsports1uk.isml/index.mpd?t=2022-12-30T18%3A29%3A40.000-2022-12-31T04%3A30%3A00.000&filter=(FourCC%3D%3D%22AVC1%22%26%26systemBitrate%3C10000000%26%26systemBitrate%3E400000%26%26framerate%3C60%26%26maxHeight%3C2161)%7C%7C(type%3D%3D%22audio%22%26%26(FourCC%3D%3D%22AACL%22)%26%26(systemLanguage%3D%3D%22eng%22))) and post it here that would be great.

Does this also happen on other platforms?

kontell commented 1 year ago

Sorry I didn't get back to you on this but was unable to test and then forgot.

It's happening on Debian too, which the below log is for along with the mpd.

Buzzing.zip

kontell commented 1 year ago

Some streams work fine with this service and others have this problem.

I downloaded a couple of MPD files for bad streams and one for a good stream. The bad ones are identical and there are some differences to the good one FWIW.

index_good-bad.zip

glennguy commented 1 year ago

Thanks for coming back. Unfortunately the last posted log isn't of much use, debug logging only turned on after the problems started occurring.

Looking at the attached mpds, the 'good' ones are using a slightly older packager version (unified streaming). Maybe the bad ones are using a buggy version? Could be worth contacting the provider with this info/suggestion? Complaint should look something like "I've noticed only on channels X/Y/Z that live streams fail/pause/freeze, looking at the mpd files they all use version 1.10.28-22802 of Unified Streaming Platform" - can you please ask your development team to look into this?

I've looked at the other logs again, my conclusion is that these streams are unreliable. The last one you posted shows a ton of 500 server errors when trying to get segments. Eventually the player is starved of input, either video or audio.

For Freeze_V19-kodi.log, a timeout with no response happens for a video segment. This takes 20 seconds to happen, by this point the video buffer is empty again.

My suggestion would be try the official viaplay app, and compare where in time they play the live streams, to where they are in Kodi. You'll probably find that Kodi runs much closer to the live edge by default. So, rewind the stream by 30 seconds in Kodi 20 and let the buffering hopefully take care of at least some of these problems.

There's not much that can be done from inputstream.adaptive point of view. We can't keep hammering the server as the 10 retries that are done now are even too generous.

kontell commented 1 year ago

Thanks for that, I'll have a go with your suggestions.

Rimtef commented 1 year ago

Serait il possible de détailler la procédure en français pour des chaines qui laggent ( France2) ou qui se limitent à l'audio (TF1) avec CUTV béta ? merci par avance

Brucey1976 commented 1 year ago

I have same problem of video freezing & buzzing on www!player on kodi 20 Shield 2019 pro. It happens at same point on videos everytime i play them. Thanks. Just letting you know its happening on that app.

glennguy commented 1 year ago

@Brucey1976 are these live or VOD streams? Are you able to provide a debug log, in case this is a different issue?

Brucey1976 commented 1 year ago

Its live streams. I,m out at the moment. So i switch logging on on kodi then run stream with fault & post on here?

glennguy commented 1 year ago

Correct

But first -

It happens at same point on videos everytime i play them.

If this is live streams, do you mean that it always happens after the same time has elapsed from starting playback?

Brucey1976 commented 1 year ago

Sorry. My mistake its on demand its doing it.

glennguy commented 1 year ago

If you could post a log file that would be great!

Rimtef commented 1 year ago

Where can I find the log file ?

Brucey1976 commented 1 year ago

Sorry havent had time to do it. Ill get onto it today. -------- Original message --------From: Rimtef @.> Date: 5/2/23 3:20 am (GMT+09:30) To: "xbmc/inputstream.adaptive" @.> Cc: Brucey1976 @.>, Mention @.> Subject: Re: [xbmc/inputstream.adaptive] V20 | Video Freezing & Audio Buzzing (Viaplay) (Issue #1091) Where can I find the log file ?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

glennguy commented 1 year ago

Where can I find the log file ?

https://kodi.wiki/view/Log_file/Easy

Sorry havent had time to do it. Ill get onto it today.

No rush at all

Brucey1976 commented 1 year ago

Here is the debug log file. it happens at around 11.17am on the file.

cheers kodi.log

echoes80 commented 1 year ago

Hello everyone. I have the same problem audio frizzing via play. Android Nvidia shield pro Is there some fix?

glennguy commented 1 year ago

Thanks heaps @Brucey1976

Could I also trouble you for a copy of the .mpd file that is being played? I get access denied here but you might be able to get just from this link: https://vod-dash-uk-live.akamaized.net/usp/auth/vod/piff_abr_full_hd/93aa19-m001h5lv/vf_m001h5lv_b762be3b-7e78-4b78-a3ec-4ab38b13404d.ism/pc_hd_abr_v2_dash_master.mpd or this one https://vod-dash-uk-live.akamaized.net/usp/auth/vod/piff_abr_full_hd/93aa19-m001h5lv/vf_m001h5lv_b762be3b-7e78-4b78-a3ec-4ab38b13404d.ism/pc_hd_abr_v2_dash_master.mpd?__gda__=1675664084_ffc8881ea7f4c39760be09848b5dd93f

If neither work, play the file again in Kodi and check the log for a link that looks very similar to the second, just the ending after ? would be different.

Rename to .txt and attach here if you have time.

Thanks again

glennguy commented 1 year ago

Also, can you try downloading this segment https://vod-dash-uk-live.akamaized.net/usp/auth/vod/piff_abr_full_hd/93aa19-m001h5lv/vf_m001h5lv_b762be3b-7e78-4b78-a3ec-4ab38b13404d.ism/dash/vf_m001h5lv_b762be3b-7e78-4b78-a3ec-4ab38b13404d-audio_eng=96000-451.m4s This is where the stream fails - this returns with a 404 error, as if it doesn't exist on the server.

Brucey1976 commented 1 year ago

Probably dosent play as i had my vpn set to uk as it only plays in uk

Brucey1976 commented 1 year ago

Problem persists after latest update on Kodi 20 on iplayer.

glennguy commented 1 year ago

@Brucey1976 I managed to get a hold of a VPN to use. I can reproduce it here (Eastenders 29/12/2022)

There's nothing that we can do about the missing file. If the file doesn't exist on the server (when it should) then we run into problems.

Can you play this episode using the official app and see what happens at that 28:20 timestamp? Maybe their player handles it more gracefully and we can look at doing the same...

Brucey1976 commented 1 year ago

I live in Australia so i cant get the official app. It dosent do it on kodi 19.5 but theres a different problem on it the video freezes randomly. Maybe they are doing it to stop 3rd party apps using their streams.

glennguy commented 1 year ago

So is it always at the end of an episode? That segment 451 is the last segment. Video goes to 451 but it's only a very small segment.

Brucey1976 commented 1 year ago

Yes always at same point on that episode but does it on all episodes at different points.

glennguy commented 1 year ago

Do you have another concrete example (i.e show/episode no.) for me to look at on my end?

Brucey1976 commented 1 year ago

I managed to sideload the official app. It plays fine on it.

Brucey1976 commented 1 year ago

I can get a log from a different episode for you

Brucey1976 commented 1 year ago

kodi.old.log Happens at 15.50 on file

CastagnaIT commented 1 year ago

by looking at mpd manifest there is the UTCTiming tag for the syncronization that is currently not implemented in ISA this could be the reason of http 500 errors

ref from exoplayer https://github.com/google/ExoPlayer/blob/f72ca8338399c9e3c19e73fc0779f24baff14d35/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/DashMediaSource.java#L724-L741

CastagnaIT commented 3 months ago

Can someone provide a new log+manifest of problem with Kodi 21? if still occurs?

CastagnaIT commented 3 weeks ago

closed for inactivity