Help with Buffering / Cache settings

  • Hi all

    Please can someone help me with this dilemma. here is my issue.

    I have a stream on my local server in HLS/TS format. When I load the stream with VLC via my pc, that stream plays fine with no buffering at all. If I take the exact stream and load it in to simplepvr player with kodi, on my s905 with libreelec. That same stream will buffer and stop, freeze and sometimes even kick me out.

    How can I make the stream play without any hassles ?

    I am playing around with the advancedsettings.xml configuration, but is there any other way to edit or somehow increase the Cache or even record the stream to external sdcard or HDD and then replay it delayed, but atleast the stream will play flawless without any hassles ?

    Could it be that my flash ram on the device is too slow ? in that my network speed is faster then it can buffer ?

    I am using LibreElec on an amlogic S905 chipset with 8gig Storage ram and 1 gig ddr3 memory.

    Thanks in advance.. Love this build and all the contributions, thank you.

  • I've been having some trouble with caching lately (nothing wrong with the wifi, maybe with SMB sharing, not sure).

    These values seemed to work for me. However, I have a 2GB box, so you might at least want to half the memorysize.

    As usual, YMMV.

    <buffermode>1</buffermode>

    <memorysize>314572800</memorysize>

    <readfactor>5</readfactor>

  • Thanks for the reply.

    I am using Ethernet, which then connects to leased line router, limited to 100 megs, which then connects to the server on my network.

    if I do trace it only passes three network hops to the server, each router on each side and the server network card.

    here are my settings:

    <network>
    <curlclienttimeout>45</curlclienttimeout
    </network>

    <cache>

    <buffermode>1</buffermode>

    <readfactor>20</readfactor>

    <memorysize>139460608</memorysize>

    </cache>

    that's the current settings I am using, but still the video lags and buffers , stops occasionally and then i need to rerun the stream ?

    • Official Post

    Is the router acting as an Ethernet switch between two devices in the same network, or is it actually routing between the HTPC in one network and a remote location where the server is located? (over the leased line).

    100-BaseT is fast enough for streaming BR discs.

  • Hi Chewitt

    its not an ethernet switch, Its a router over the leased line to the server in my office at work, both sides i have Cisco routers with NAT enabled. I can copy or transfer a file over this network at around +-15mbits/s with my pc. its connecting my home to my office. two seperate locations. Thats why i do not understand why my pc VLC plays perfect, but my s905 struggles, drives me nuts. I use the S905 box for my parents to watch content and its easy for them to navigate it, but the buffering is driving me nuts.

    Thank you for your help

  • I think I found a fix.. I added the code below to the advancedsettings.xml and its working much better.

    Code
    <advancedsettings>
        <pvr>     
            <minvideocachelevel>25</minvideocachelevel>     
            <minaudiocachelevel>25</minaudiocachelevel>
        </pvr>
    </advancedsettings>
  • I think I found a fix.. I added the code below to the advancedsettings.xml and its working much better.

    Code
    <advancedsettings>
        <pvr>     
            <minvideocachelevel>25</minvideocachelevel>     
            <minaudiocachelevel>25</minaudiocachelevel>
        </pvr>
    </advancedsettings>

    That's amazing consider that those cmds were removed

    • <minvideocachelevel>, <minaudiocachelevel>, and <cacheindvdplayer> have been removed in v17.

    advancedsettings.xml - Official Kodi Wiki

  • Hi Dazed,

    Maybe I am imagining things ... If i look into the log file , kodi loaded <minvideocachelevel>25</minvideocachelevel> but failed on line with <minaudiocachelevel>25</minaudiocachelevel> .. So I removed the <minaudiocachelevel>... seems to play better,

    does anyone know how or what i can use to monitor the buffer values to see what is happening in the cache files? I have no ideas any more and even if i experiment with <memorysize> doesn't seem to make a difference... anyhow , thank you for pointing that out. i didn't know:):)

  • Hi dazed,

    The forward buffer value never fills up?.. but if I try an addon on then I notice that the addons use the foward buffer and the value changes in M/b.
    The percentage varies between 95 -100%. Does this mean the buffer is not been used ?