Kodi Community Forum

Full Version: Random pauses during playback
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello. I am having issues with playback of videos with xbmc on my htpc...specifically when streaming over the wired gbit lan. It happens randomly through the video, but does it with pretty much every video I try to stream over the network. If I copy the same files to a usb flash drive and play from the flash drive plugged into the htpc, I do not get any freezing or pauses. I've tried to look at the debug log myself, but could not make heads nor tails of anything in it.

htpc hardware:
ASUS p5wdh deluxe mobo
c2d e6600
2gb ram
ASUS geforce gt630 video card (gt630-sl-2gd3-l)

software:
OpenELEC-Generic.x86_64-4.0.7

content stored on and streamed from:
QNAP NAS and a
networked desktop pc


Debug log
http://pastebin.com/9FPiBwdS


Thank you for your help!
Is there any other information I need to provide to help in troubleshooting this?
I noticed you have your readFactor up to 4.0. I'd suggest increasing buffer size & have it apply to smb as well... add this into your <network> node in advancedsettings.xml:

Code:
<cachemembuffersize>367001600</cachemembuffersize>  
  <buffermode>0</buffermode>

This will let your client buffer up to 350MB of the file, even if it's SMB over the LAN (note this has the potential to consume up to 1050 MB of RAM, which should be OK with your 2GB total).
OK, not sure what you mean when you say readfactor up to 4.0. I didn't set that setting...is it a default of some sort?

I don't currently have an advancedsettings.xml so I am creating one from scratch...is this what it should look like? Since I am experiencing issues with local streaming, should I set the buffermode to 1 instead of 0?
http://kodi.wiki/view/Advancedsettings.xml


Code:
<advancedsettings>
    <network>
      <cachemembuffersize>367001600</cachemembuffersize>  
        <buffermode>0</buffermode>
    </network>
</advancedsettings>

edit: I also just updated to OpenELEC-Generic.x86_64-4.2.1, but that did not help with this particular issue.
See HOW-TO:Modify the video cache (wiki) for a better guide.
(2014-11-14, 02:15)imagamer2k Wrote: [ -> ]OK, not sure what you mean when you say readfactor up to 4.0. I didn't set that setting...is it a default of some sort?

I don't currently have an advancedsettings.xml so I am creating one from scratch...is this what it should look like? Since I am experiencing issues with local streaming, should I set the buffermode to 1 instead of 0?
http://kodi.wiki/view/Advancedsettings.xml


Code:
<advancedsettings>
    <network>
      <cachemembuffersize>367001600</cachemembuffersize>  
        <buffermode>0</buffermode>
    </network>
</advancedsettings>

edit: I also just updated to OpenELEC-Generic.x86_64-4.2.1, but that did not help with this particular issue.

Ah, apologies, I just realized you were running openelec... it comes with a built-in advancedsettings.xml (according to your log, anyway), so you'll want to find a way to either supplement that or update it (I'm not 100% familiar with that distribution)... A setting of 1' should enable buffering for *all* sources, even local disk files, I believe (it's what I have all my clients set to).

EDIT: You were right, '1' is what you want, not '0'!
Thanks for the advice so far, to both of you. I have created an advancedsettings.xml and set the cachemembuffersize to '367001600' and the buffermode to '1' and it seems to be improved.

@isamudaison, fyi:

Code:
0  Buffer all internet filesystems (like "2" but additionally also ftp, webdav, etc.) (default)  
1  Buffer all filesystems (including local)  
2  Only buffer true internet filesystems (streams) (http, etc.)  
3  No buffer



But my next question is, what is causing the buffer issues? I'd really prefer to fix the root of the problem, if I can. I've checked the eth0 link speed and all components are definitely connecting at Gbit, and I've done some large, test file transfers via windows explorer to the local drive on the htpc and the transfer speeds averaged ~75 mB/s, so I would think that would rule out any hdd or lan hardware/cabling issues. Is this an inherent, smb thing? And, if so, why is the issue not more widespread?
If I had to throw a shot in the dark I would say it's your networking stack... I've had nothing but problems with performance of my 'gigabit' realtek chips in linux, and even my intel chip'd gigabit controller needed manual driver updates, I would suspect your Asus board with the Marvell controller may be of issue here:

Dual Gigabit LAN controllers
*2 x Marvell 88E8053 Gigabit LAN Controller, both featuring AI NET2

You *might* be limited by the openelec distro, but it may be worth it to investigate the state of the drivers for this chipset.
Hmmm...ok, thanks. Setting the buffer seems to have solved the issues I was having. I noticed something interesting though; using the value '367001600' only ever displays a max cache of 184MB in the Codec Information Dialog, which seems to be 1/2 of the 367MB that was set.

I'll see what I can find in the way of updated drivers for my nic, and if it would even be possible to somehow install them in openelec.