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

VOD video problems - Missing support for Kodi stream buffering #392

Closed
CastagnaIT opened this issue Mar 12, 2020 · 20 comments
Closed

VOD video problems - Missing support for Kodi stream buffering #392

CastagnaIT opened this issue Mar 12, 2020 · 20 comments

Comments

@CastagnaIT
Copy link
Collaborator

Since always, and especially in recent months many users complain about problems in the playback

These problems are due to latencies in the VOD service or networks that are not always stable due to the ISP or WIFI.

The problem is the lack of a buffer,
getting the data in real time is not a good way to VOD playback

I do not know if it is already supported, in this case closed the Issue, i just need to know how to customize it and increase the size.

Myself have buffering problems and it starts to get worse:

  • at best, playback pauses and resumes after about 10/15 seconds
  • at worst, the playback is stopped and exit to the list screen, and you have to resume it

This can also happen several times in a single playback

It would be a good idea to use Kodi buffer to load as much data as possible in as little time as possible, in order to suppress these problems

@glennguy
Copy link
Contributor

This has come up a few times before, see #8 and #14 for example.

It would be great to have but it's not trivial to implement. At the moment from what I can see segments are only downloaded at Kodi's request (to fill 8 second internal buffer - cannot be changed) so there would need to be a whole new section built to have our own buffer within inputstream adaptive, associated logic, also buffering for different streams (for adaptive bitrate switching)... I'm sure more things!

If waiting for this isn't an option you could do a proxy server in python to pre-download future segments

@zero972
Copy link

zero972 commented Mar 12, 2020

I came across this issue also, 8 sek. internal buffer is propably to small for flawless playback, especially with 4k content. Adaptive bitrate switching is nice to have, but not a deal breaker since you can switch the streams by yourself if needed.

Maybe adding a buffer for the actual stream first (to fix the playback issues) would be a lot less work to do as to implement both features at once?

@yoshimo
Copy link

yoshimo commented Mar 12, 2020

How does this compare to https://kodi.wiki/view/HOW-TO:Modify_the_video_cache `?
That page describes how to increase the cache for

all video files, including local network, internet, and even the local hard drive. Default value is 0 and will only cache videos that use internet file paths/sources.

@dagwieers
Copy link
Contributor

I have asked for better triage in this project so we can make open feature requests more upfront, rather than having the same thing being brought up ever so often in another issue. It doesn't help to converge to a proper fix (or get the proper attention from those that can implement it).

@dagwieers
Copy link
Contributor

We can already use the Wiki to document and track features or known issues, so don't let that keep us from collaborating ;-)

@Besur
Copy link

Besur commented Mar 13, 2020

are you guys talking about artefacts with DRM vod playback like this https://i.imgur.com/8fuO9Px.png ? cause i don't know if i have to open an issue for my problem

ps : i tried everything with params, and when i say try, i mean all settings ... i have 1Gbps down and up

@CastagnaIT
Copy link
Collaborator Author

no we are just talking about buffer management here

@CastagnaIT
Copy link
Collaborator Author

someone know the code line where is set the 8 second of internal buffer?

@glennguy
Copy link
Contributor

glennguy commented Mar 16, 2020

I had a quick look on github but could not find it, it might be easier using an IDE to trace it back. Kodi calls DemuxRead() in inputstream.adaptive to get more data, you could start there...

edit: there are a few references in VideoPlayer.cpp to 8000 (ms) but I don't believe that's where the buffer is allocated.

It's probably not a good idea to change that value anyway, it would likely have other consequences. Much better to get a proper solution happening here.

@dagwieers
Copy link
Contributor

@CastagnaIT @peak3d already offered this as a solution for another issue (see xbmc/xbmc#16003 (comment)) and this was what he proposed: peak3d/xbmc@9b633ec

@yoshimo
Copy link

yoshimo commented Mar 17, 2020

A simple static increase feels wrong, what if a person wants to watch high res, and take a few minute buffering into account for something the internet connection usually can't do "live"?

@dagwieers
Copy link
Contributor

@yoshimo Read the discussion by following the link. No need to repeat the same discussion here.

@CastagnaIT
Copy link
Collaborator Author

thanks for the links

@dagwieers
Copy link
Contributor

@CastagnaIT Keep us posted about your findings, as I am sure you will 😉

@michaelarnauts
Copy link
Contributor

I just looked a bit into this issue, and the 8 second limit is the reason for all sorts of problems.

-> add-ons/plugin.video.viervijfzes#4
-> add-ons/plugin.video.vtm.go#139

Altough this issue is not in inputstream, but in Kodi itself.

@afxx777
Copy link

afxx777 commented Jul 22, 2020

i raised the video player internal buffers to 12 sec and recompiled it for android (Shield Pro 2019). Rasing the internal buffer doesnt fix this isse, i still have random duplicate / dropped frames when playing 4k content from Netflix.

@matthuo333
Copy link

Was this no result in the end?

@glennguy
Copy link
Contributor

The work is in #506 however it needs some adjustments before it can be brought in. Likely to be a Kodi 20 feature

@matthuo333
Copy link

The work is in #506 however it needs some adjustments before it can be brought in. Likely to be a Kodi 20 feature

So I need to add the 7 files in #506 to the project to compile? How does it fit into the current version?

@glennguy
Copy link
Contributor

Fixed in #732

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

9 participants