SMB streaming problems
#1
I'm using the latest RASPBMC build from the RPI web site.

I'm trying to stream 1080p (bluray remuxes) from an SMB share, over a wired network connection[/code]. The streams play fine from a USB stick.

Over SMB though, some are ok, but some will periodically freeze. Interestingly when its playing, the network bw is lower. Then it'll freeze, and the network bw will increase for a few seconds (duration of the freeze) then drop back down again when it resumes playback.... (observed from the PC hosting the share).

I did notice it's using SMB 1 to connect. SMB 1 is ancient, and only supports 64kb max request size. Still, shouldn't be a limiting factor here since we're only talking about a few MB/s.

I tried creating an advancedsettings.xml (below) which had no visible impact on the playback or the observed network behavior.

Any ideas or anything more I can do to troubleshoot?

Thanks.

Code:
pi@raspbmc:~/.xbmc/userdata$ cat advancedsettings.xml
<advancedsettings>
<network>
<buffermode>1</buffermode> <!-- Comment: Default is 1 -->
<cachemembuffersize>31457280</cachemembuffersize> <!-- Comment: Default is 20971520 bytes or 20 MB -->
<readbufferfactor>4.0</readbufferfactor> <!-- Comment: Default is 1.0 -->
</network>
</advancedsettings>
Reply
#2
The inbuilt SMB and NFS clients in Kodi are not very efficient. You get much better results using OS mounts (especially with NFS using UDP and large block sizes). See:
http://forum.osmc.tv/showthread.php?tid=16239
Reply
#3
Is your RPi overclocked ?

All your problems will likely go away when Overclocked, but you need a 2 Amp power supply.

As an example I can smoothly play a 1080p/60Mbps Jellyfish test file over wired SMB (from an iMac to the Kodi client) on my Overclocked RPi running Openelec.

Reply
#4
It's not. It does appear to be a CPU limitation issue.

I switched to using CIFSFS mount, doesn't help much. Kodi 4.95.5.

CPU is pegged at 85%+. I noticed that with movies which can play back ok (one is "The Lego Movie") the BW drawn from the (Win 8.1) file server is actually higher than the BW I see when playing back problem (most) streams that stutter.

Switching to "passthrough" audio noticeably helps the video (although it's still not smooth) which further supports the CPU being the issue.... I guess the pi doesn't quite cut it. As a workaround I'm going to put an old SSD in a portable 2.5in USB case, and use 'sneakernet" to play back these streams.

What level of overclock are you using?

Thanks.
Reply
#5
CIFS I believe will use the SMB1 protocol, thats what it does on my Mac anyway.
If your using SMB1 to share high bitrate files thats where the problem likely is.

I mount all my Shares on the RPi (Openelec) with Zeroconfig if that helps. Its SMB2 or 3 from my Mac to RPi.

Just tested the 60Mbps H264 file again and getting no more than 60% CPU usage.
When you pull up Codec info (O on keyboard) on the screen when playing problem files check your getting dc:omx-Huh?? Mb/s in the text.
This signifies Hardware decoding on the RPi.

You are aware that some windows wmv files using the VC-1 codec (and mpeg2) need a licence code in the config.txt file on the RPi to playback correctly ?

Stable Overclock settings:

arm_freq=1100
core_freq=550
sdram_freq=600
over_voltage=6
over_voltage_sdram=4
force_turbo=1

temp never gets above 64 degrees C.

Reply
#6
Ok, so using "Moderate" overclock settings (from the .config choices, no overvoltage) along with HDMI passthrough and an HDMI audio splitter allows this to work fine. Running the latest RC.

I can stream bluray 1080P files from SMB shares (wired network) with no glitches. The pointer is pretty choppy during playback, but that's to be expected I guess and isn't a problem.

Thanks.
Reply
#7
Cheers.

Just go the full monty Overclock if you have a proper power supply, the RPi will not start smoking, and SD card corruption issues have all been sorted out.

I use an old iPad 1 charger with the above overclock and that combo has not given me any problems in 6 months now on my RPI B+

http://elinux.org/RPi_VerifiedPeripheral...r_adapters

Reply
#8
Have you done the dirty regions mod?
HTPCs: 2 x Chromecast with Google TV
Audio: Pioneer VSX-819HK & S-HS 100 5.1 Speakers
Server: HP Compaq Pro 6300, 4GB RAM, 8.75TB, Bodhi Linux 5.x, NFS, MySQL
Reply
#9
From memory it made my RPi with Openelec unstable and corrupted the GUI.
Dirty regions is set at 3 by default anyway for the RPi running XBMC.

Other hints are: (RPi B+ 512k)
- Turn off RSS Feeds, this sucks the life out of the CPU.
- XBMC > System > Settings > System > Video Output > Vertical blank Sync > Always enabled
- increase the GPU memory in config.txt eg. gpu_mem=224
- use a low textured skins eg. Confluence, Eminence, Conq

I also highly recommend NFS, especially if you are Sharing files from a Mac whereby is very easy to setup.

Reply
#10
(2014-12-15, 11:56)wrxtasy Wrote: From memory it made my RPi with Openelec unstable and corrupted the GUI.
Dirty regions is set at 3 by default anyway for the RPi running XBMC.

Other hints are: (RPi B+ 512k)
- Turn off RSS Feeds, this sucks the life out of the CPU.
- XBMC > System > Settings > System > Video Output > Vertical blank Sync > Always enabled
- increase the GPU memory in config.txt eg. gpu_mem=224
- use a low textured skins eg. Confluence, Eminence, Conq

I also highly recommend NFS, especially if you are Sharing files from a Mac whereby is very easy to setup.

Not so. It isn't on by default in Openelec, not sure about RaspBMC. I changed mine to 3 and the processor usage at idle dropped by 30%.

I have taken on board what you have said about NFS. So I have setup my PC (all of my PCs run Lubuntu) as a temporary NFS server as a proof of concept, it works very well. So then I went and bought a used Acer Revo R3600 (a little Net-Top PC running an Intel Atom 1.6 CPU, 2GB of ram and a 160GB HDD), the plan is to install the biggest external USB HDD I can afford and then install Lubuntu on it and use it purely as an NFS media server. I have been using SMB shares up till now and found the experience to be a bit laggy on HD video. So last night I download a show from the BBC in HD, using get_iplayer, and tried it over NFS to the RPI in my Bedroom. I got perfectly smooth playback. Happy.Big Grin

I had already implemented all of the other mods you have suggested and I am overclocked to this...

arm_freq=1000
core_freq=500
sdram_freq=500
over_voltage=6

I have also moved my Storage partition to an external HDD and load from that. It makes for much faster boot times.

Setup as I have done my RPIs are now a very smooth and rival any professional setup I have tried.
HTPCs: 2 x Chromecast with Google TV
Audio: Pioneer VSX-819HK & S-HS 100 5.1 Speakers
Server: HP Compaq Pro 6300, 4GB RAM, 8.75TB, Bodhi Linux 5.x, NFS, MySQL
Reply
#11
(2014-12-16, 11:04)speedwell68 Wrote: Not so. It isn't on by default in Openelec, not sure about RaspBMC. I changed mine to 3 and the processor usage at idle dropped by 30%.

The default <algorithmdirtyregions> is 3 for _all_ platforms. OpenELEC doesn't set it on the Pi (or any other architecture) as the stock Kodi default is the most suitable setting. It may have set it at some point long ago with Frodo (and possibly early Gotham) but it hasn't been part of OpenELEC for quite some time now.

If you've got this setting in your advancedsettings.xml, remove it and trust the default value.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#12
Glad to hear its all sorted, Lounge Lizard Time ! Smile

Disabling RSS Feeds and Vertical blank Sync - Always, will be the ones responsible for reduce CPU load.

Dirty regions has been hard coded to the value 3 in Openelec since XBMC Frodo.

http://openelec.tv/forum/124-raspberry-p...by-default
http://kodi.wiki/view/XBMC_v12_%28Frodo%...Regions.3F

Reply
#13
(2014-12-16, 16:18)wrxtasy Wrote: Glad to hear its all sorted, Lounge Lizard Time ! Smile

Disabling RSS Feeds and Vertical blank Sync - Always, will be the ones responsible for reduce CPU load.

Dirty regions has been hard coded to the value 3 in Openelec since XBMC Frodo.

http://openelec.tv/forum/124-raspberry-p...by-default
http://kodi.wiki/view/XBMC_v12_%28Frodo%...Regions.3F

TBH I have had that setting enabled since Eden.
HTPCs: 2 x Chromecast with Google TV
Audio: Pioneer VSX-819HK & S-HS 100 5.1 Speakers
Server: HP Compaq Pro 6300, 4GB RAM, 8.75TB, Bodhi Linux 5.x, NFS, MySQL
Reply

Logout Mark Read Team Forum Stats Members Help
SMB streaming problems0