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

Playback using MPEG-DASH stutters and there is a lot of buffering #426

Closed
das-osi opened this issue Mar 3, 2023 · 16 comments
Closed

Playback using MPEG-DASH stutters and there is a lot of buffering #426

das-osi opened this issue Mar 3, 2023 · 16 comments
Labels
bug Something isn't working

Comments

@das-osi
Copy link

das-osi commented Mar 3, 2023

Context

Please provide any relevant information about your setup

  • Add-on Version: 6.8.25+matrix.1
  • Kodi Version: 19.5.0
  • Kodi GUI Language: English
  • Operating System: LibreELEC 10.0.4
  • Operating System Language: English

Expected Behavior

Fluid playback


Current Behavior

When playing back videos using MPEG-DASH the video will pause and buffer after just a few seconds.
Playback will continue after buffering completed, but will fail again after another few seconds.
But this doesn't happen if I disable audio by setting InputStream Adaptive - Media to "Video".
Also doesn't happen if I disable MPEG-DASH.
On my computer and other devices on the same network there are no issues at all.
The same machine plays local 4k movies just fine.
Seems to me like Kodi is "thinking" that video and audio got out of sync and therefore reloads the streams.


Steps to Reproduce

Really got no idea how to reproduce this issue, seems to me that I'm the only one facing it.


Log


Additional Information


@das-osi das-osi added the bug Something isn't working label Mar 3, 2023
@spitzenidee
Copy link

spitzenidee commented Mar 4, 2023

I have the same issue / bug (also Kodi 19.5 via Libreelec 10.0.0.4, Youtube addon 6.8.25+matrix.1, running on a x86 Ryzen 3200U, 16 GB RAM) and have - until now - unsuccessfully trying to pinpoint it to either general Kodi buffering woes, my wifi or even my internet provider. After reading this bug description I deactivated MPEG-DASH for testing (resulting in 720p as max resolution for YouTube videos) and immediately I found that all problems & high latencies with the following are completely gone:

  • Starting a VIDEO taking several seconds
  • Seeking in a Video taking 5-10s until playback resumes
  • Stopping a video often also takes multiple seconds until "back to the Kodi UI"
  • Audio being available and audible many seconds before video is shown / has caught up
  • Sometimes buffering in the middle of watching a video, regardless of the video's bitrate (even 3Mbit videos sometimes buffer multiple times despite my internet connection being 100MBit and the media PC being easily able to saturate it with non-YouTube services or downloads)

Reactivating MPEG-DASH brought back video resolution >720p up to 4k and also all of the above hiccups.

I also have no idea on how chase down this issue in Kodi and how to provide meaningful data, e.g. logs etc - hints and guides are very welcome so I can actually be helpful ;)

@GrimChaos
Copy link

Same problem on an android box, Kodi 20.0, Youtube 7.0.0, Internet 300 Mbps down and up

spitzenidee describe the problem pretty well.

I would just add, scrubbing ahead doesn't work as well. Holding (or pressing a few times) the skip forward x seconds, it doesn't skip forward more than once (mine is set to 30 seconds). I don't know if I explained it clearly but I tried.

Thanks! This Addon has been amazing!

@Fludizz
Copy link

Fludizz commented Mar 4, 2023

Similar buffering issues observed on LibreELEC 9.2 (Kodi 18) and on LibreELEC 10 (Kodi 19.5).
Watching video's with DASH enabled for Video's causes lots of buffering issues - this is a new issue that we first started noticing about a week or so ago.

Work-around to get stable video feeds is to disable DASH for video and only leave it enabled for Live-streams. However, that results in a maximum resolution of 720p.

However, as disabling InputStream (via DASH) for Video "works around" the issue, it may actually be a problem in InputStream rather than in the Youtube plugin itself.

@spitzenidee
Copy link

I would just add, scrubbing ahead doesn't work as well. Holding (or pressing a few times) the skip forward x seconds, it doesn't skip forward more than once (mine is set to 30 seconds). I don't know if I explained it clearly but I tried.

Now that you mention it, yes, scrubbing is weird for me, too:

Video is playing at e.g. 1 minute 30 seconds. I scrub ahead / forward for 30 seconds (just as an example), ie. "skip to 2:00". First of all, it often takes 5-10 seconds until playback resumes at (approximately) 2:00. But also quite often the video resumes at a completely unrelated position, e.g. 0:40 or skips back to the start (but skips back always to a point earlier than the position when scrubbing was initiated).

@gatecrasher777
Copy link

This issue: yt-dlp/yt-dlp#6400

Solution: The latest YouTube players require a valid &range=start-end added to the stream urls (along with the usual decipher and n transform).

Once this is supplied, everything is fast again.

@anxdpanic
Copy link
Owner

We don't have any decipher or n transform atm, and afiak that's an unrelated issue to what we're facing.

No one has provided the proper information for this either, debug logs reproducing the stuttering would be a start.

@das-osi
Copy link
Author

das-osi commented Mar 4, 2023

kodi.log
@anxdpanic I'm sorry, there you go

@neo-neo1
Copy link

neo-neo1 commented Mar 5, 2023

Need an additional debug log?

Buffering issue has been almost getting progressively worse day by day. Numerous users also reporting buffering issues on the Kodi forums. I reproduced the same problem on multiple machines and on multiple ISPs.

I still remember the great buffering saga last year. I guess this is PT 2

@XxAcielxX
Copy link

XxAcielxX commented Mar 5, 2023

I'm also facing this caching issue as well. It was working smooth till 6.8.25~alpha3+matrix.1 and last week it updated to 6.8.25+matrix.1, and it started causing this caching issue.

On playing, seeking and randomly it caches and video gets stuck while audio is playing. Look at the changes made between this two versions and look for the issue.

I'm have been using this add-on for more than 5 years now.

Edit 1:
When you play any video, look at the popup info notification. It says something like <Video Title> - <Weird Time>/<Video Total Length>

Example:
.... - 1:47:35/2:54

@neo-neo1
Copy link

neo-neo1 commented Mar 5, 2023

You can mitigate the buffering and seeking issues by disabling MPEG-DASH in YouTube options. Of course if you watch live streams, it may prove problematic. Not a fix by any means.

@XxAcielxX
Copy link

Today the issue is not happening, that's a surprise. Anyone else?

@das-osi
Copy link
Author

das-osi commented Mar 6, 2023

@XxAcielxX can confirm, suddenly even 4k 60fps is smooth as butter.
What changed?

@XxAcielxX
Copy link

What changed?

I have no idea, but I guess this was a backend issue maybe, coming from Google perhaps.

@spitzenidee
Copy link

@XxAcielxX can confirm, suddenly even 4k 60fps is smooth as butter. What changed?

Can also confirm (my location is Germany btw) - a 4k 55 Mbps video has no latency problems when starting, stopping, seeking, jumping around in the video's timeline. Since I changed absolutely nothing on my side including Kodi and addon versions I suspect Google's backend, as well.

Buffering is still different than I would expect (from Kodi in general) but this may be a characteristic caused by MPEG-DASH? I mean: without MPEG-DASH Kodi fills the buffer as fast as possible to 100% (I have set it quite high via advancedsettings.xml) saturating my 100 MBit ISP connection, but with MPEG-DASH buffering happens more or less with exactly the video's bitrate.

@GrimChaos
Copy link

@XxAcielxX can confirm, suddenly even 4k 60fps is smooth as butter. What changed?

Darn, mine still isn't working right

@Shadowevil1666
Copy link

I have run LE NIGHTLY on S912 box. I have a Let's play that's show 2 Episodes with AV1, they stuttering. The other episodes with h264 running smoothly. With MPEG-DASH off the AV1 episodes running fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants