Dynamic buffer size increase
#1
Hi,

when I stream a video file via WLAN (SMB, but that doesn't matter) sometimes my connection is not that great. So the video starts stuttering. Sometimes it makes a video not watchable, because it's stuttering every minute.

I think it should be recognized that a video stops - maybe for the third time (due to empty buffer) - and then the video buffer size should be doubled temporarily to have a better playback and to bride the HQ parts of the file. It's better to wait once for 20 sec. than multiple times for 10 sec. And if the buffer is doubled once and the video stops again for the thrid time, why not double the buffer size again?

It would be nice it you could add that feature (optional).

A small notification about the buffer size change would be nice too :-)

Greets!
Reply
#2
The bigger issue is how much RAM a given device has. If someone is interested in coding up a system that figures out how much RAM there is, regardless of buffering, then that might be considered. We just want to avoid crashing low-RAM devices by requesting too much RAM, which is where the buffer/cache is by default (and XBMC/Kodi tries to be flash-memory friendly, so we don't like to do a lot of read/writes to the local drive memory). A lot of devices only have 512 MB or 1 GB of RAM (the lowest we support is 256 MB via ARM like Raspberry Pi model A), so the buffer/cache needs to stay pretty low. I wouldn't go above 100 MB of cache for a lot of those devices, which is still only going to be maybe a minute or two on SD videos, and less on many HD videos.

The cache either has to be set to use the local drive, or you need a lot of RAM, for this to be actually useful. Even then, the video isn't loading any faster, it's simply not stopping to buffer as often.
Reply
#3
Hi,

I have interest to precache whole movie to RAM because of HDD sound (i use HTPC in bedroom). I have in advancedsettings:

<buffermode>1</buffermode>
<cachemembuffersize>2097152000</cachemembuffersize>
<readbufferfactor>10</readbufferfactor>

but after press "o", I can see only 1,24 GB as max of cache (movie have 3,5GB). I have 8GB RAM, Windows 7 Pro x64. It is problem in RAM capacity (I read, that I must have 3x more RAM, that is cache size)? But, 1,24x3=3,72 and I have about 6,5GB of free RAM.

Or, maybe, can I set buffering to precaching maximum, then stop caching and after movie position will be at end of precached part, XBMC start next precaching? It is, because I set HDD sleep to 1min, so, 3x precaching is better, than wait to precaching last movie part to sleep HDD.

Thanks for helping me.
Reply
#4
That might be due to a limit of XBMC/Kodi being 32-bit for Windows. I'm not sure.
Reply
#5
get a cheap ssd and use cachemembuffsize 0 for having a silent cache - beside that i agree its a limit of 32bit apps.
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS (wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf (wiki)
READ THE IOS FAQ!: iOS FAQ (wiki)
Reply
#6
I have SSD (for system, apps and major data - 256GB), but If I play each day 15-30GB of movies (and few movies have 10-25GB per file), will be SSD gone soon.
Reply
#7
(2014-12-18, 11:48)swenak Wrote: I have SSD (for system, apps and major data - 256GB), but If I play each day 15-30GB of movies (and few movies have 10-25GB per file), will be SSD gone soon.

How soon? Here calculates that with 30GB of writes per day an SSD will last for 24 years. Is that an issue for you?
Reply
#8
Wink OK, so, i try it, thanks!
Reply
#9
I really appreciate the foregoing discussion and I believe I understand the limitations discussed.

I would like to ask if someone is able to provide some "tutorial"-like guidance on how to set the buffer-size for optimum results. Perhaps a running standard "test file" would permit a calculation to be made that would make setting the buffersize a bit less hit-and-miss and shorten the time to set it up the best that is possible for the given network and Kodi hardware platform.

In addition, I wonder if there is any way of making it possible to set the buffersize a bit more interactive, possibly by spawning an editor, rather than shutting down Kodi, finding the advanced setting file and tweaking it and restarting Kodi? I realize that Kodi only looks at the file during startup, so editing it would need to have a reboot of Kodi as an implicit final step in the editing process.

Please note that I do recognize that the network, the Kodi plaform and the version of Kodi, all play a role in determining a buffer size figure. I also recognize that for a given setup, it may not be possible to adequately buffer the data-stream. That said; if I know that I've tuned the current setup as best I can, I can then justify looking at the expense of changing the hardware/network components to hopefully improve the situation.
Reply

Logout Mark Read Team Forum Stats Members Help
Dynamic buffer size increase0