Kodi Community Forum

Full Version: File plays on one Pi in network, but not other.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Blu Ray rips with an average bitrate >30Mbps play fine on one Pi 2B in my network, but buffer every 10 seconds or so on another Pi 2B in my network. The files are stored on a 5th Gen. Apple Time Capsule and served via SMB. Everything is wired via Cat5e, but the Pi that buffers (Pi #1) also uses a MoCa 1.1 adapter. Blu Ray rips with a bitrate <30Mbps work fine on both. My network layout:

Code:
Pi #1 <-----> MoCa 1.1 Adapter <-----> Airport Time Capsule <----------> Pi #2

I checked the network speed to Pi #1 using Iperf. With Pi #2 set as server and Pi #1 set as client, I get the following results:

Code:
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec   112 MBytes  94.0 Mbits/sec    0             sender
[  4]   0.00-10.00  sec   112 MBytes  93.9 Mbits/sec                  receiver

Since Iperf was showing Pi #1 getting full network speed, I also tried transferring a large file from my laptop (connected via AC wireless to Time Capsule) to Pi #1. Using a stopwatch and the file size, I consistently got a transfer speed of ~3.7MBps (~30Mbps). I then swapped the Pi #1's ethernet cable to my laptop, transferred a large file from the Time Capsule and consistently recorded a file transfer speed of ~10.4MBps (~83Mbps)

Changing the buffer mode to 1 and buffer size to 100MB in advanced settings only delayed the buffer period by a few seconds. I'm not sure what else to try as NFS isn't really an option without making major changes to my network. I've attached a log of me booting OpenELEC and playing back a movie that buffers. I've also attached the MediaInfo of that movie and a 2.5 minute sample clip. Any help would be appreciated.

Log
MediaInfo
Sample File
What distribution are you using?
In general using an OS mount (/etc/fstab) will probably give better performance than using the userland library inside Kodi.
NFS OS mount would be best of all, but it may be worth trying an OS SMB mount.

You'll probably want to tweak the buffer sizes up.

The issue is probably the latency added by the MoCa adapter.
When doing reads asynchronously or with large buffer sizes you can hide the effect of latency, but it hurts smaller synchronous reads.
Thanks for the help. I'm using OpenELEC 6.0.3 (Kodi 15.2).

I increased the buffer size until bcmstat showed ~200MB free memory, which ended up being ~512MB. My advancedsettings.xml currently looks like:

Code:
<advancedsettings>
    <network>
        <buffermode>1</buffermode>
        <cachemembuffersize>536870912</cachemembuffersize>
        <readbufferfactor>4.0</readbufferfactor>
    </network>
</advancedsettings>

Now starting a movie causes Kodi to buffer for ~1.5 minutes before throwing an error message saying "cache full: cache filled before amount required for continuous playback" and then starting playback. Bcmstat confirms that network speed is capped at ~4MB/s.

I'll try implementing an OS SMB mount and report back. It just seems odd to me that a laptop can pull >10MB/s over the same connection. I can't get the Pi to do over 4MB/s, either copying or streaming a file. Also, I pinged my Pi #1 from Pi #2 and received the following, for whatever it's worth:

Code:
101 packets transmitted, 101 packets received, 0% packet loss
round-trip min/avg/max = 2.552/3.398/4.414 ms
(2016-03-31, 00:43)ZwartePiet Wrote: [ -> ]Also, I pinged my Pi #1 from Pi #2 and received the following, for whatever it's worth:

Pinging the time capsule from both Pi#1 and Pi#2 would be more interesting. I suspect the problematic Pi will have a higher ping.
I finally implemented an OS SMB mount and am glad to say that fixed the problem. Big Grin I used the method recommended in the Kodi wiki. It was pretty self-explanatory, but the "Options=" section gave me a few problems. I've included it below for posterity.

Code:
Options=username=,password=mypasswd,rw,sec=ntlm

Apparently the Time Capsule doesn't require (or have) a username. I entered my TimeCapsule password here in plaintext, but if you have network security concerns you can Google how to set-up a credentials file instead.



(2016-03-31, 12:54)popcornmix Wrote: [ -> ]I suspect the problematic Pi will have a higher ping.
Oh, you're right, and when you're right, you're right, and you, you're always right. Tongue

Code:
Pi #1
round-trip min/avg/max = 2.839/4.050/5.863 ms

Pi #2
round-trip min/avg/max = 0.359/1.319/5.009 ms