Cannot play movies/audio from NAS SMB share

Hi all,

I’m completely new to the media center world and osmc, so pardon me if I my question is noobish O:)
I’ve used my raspberry pi as a Webserver for over a year but recently formatted that and installed the latest version of osmc. I’m used to SSH and used that to enable debug and get the logs etc.

SETUP:

  • Raspberry PI 2:
    — USB sound card (from logitech gaming headset)
    — USB3 stick, 64gig with music/movies/series folders and respective test files.
  • NAS (Old Iomega home media … thing):
    — Has multiple SMB shares: Music/Movies/Series/Pictures/…
    — Has the exact same test files as on the USB drive inserted in RPI2 in their respective SMB shares
    ==> Both have a wired ethernet connection, plugged into the same gigabit switch.
    (Switch has wired ethernet connection to router that’s on other floor)

PROBLEM:
When trying to play audio from the SMB share, the system freezes for a few seconds.
Then displaying a message the file could not be played and therefore doing nothing.
(Note: when debugging this to make this topic, it completely crashed OSMC to its smiley bluescreen)
This is with FLAC files as well as MP3 files.
When playing the exact same files who are located on the USB stick, they play just fine.
Same problem go’s for my test movie, although it sometimes plays for up to 1~2 seconds before closing back to the homescreen. The Kore remote claims it’s playing, but when tabbing to full screen mode it’s just a black screen.
The test serie “allo allo”, also located on it’s respective SMB share, works just fine! Tried multiple episodes, no problem at all. Pictures from the pictures smb share do load, although slow and sometimes corrupted?

NONE of the files have a problem when playing on my laptop, directly from the NAS through ethernet.
So files seem to be ok in my opinion?

DEBUG SCENARIO:

  • Enabled debug mode through SSH
  • Cleared kodi’s 2 log files through SSH
  • Rebooted PI through SSH
  • Tried to play SMB flac file using Kore remote app on android ==> Osmc smiley bluescreen + restarts
  • Tried to play USB flac file using Kore remote app on android ==> Plays just fine
    (Both above navigating on screen, not from library visible in remote app)
  • Took printscreen of phone, noticing 0:00 song length on the mp3 songs when searching library on remote app. (Printscreen below.)
  • Tried to play SMB Movie file using Kore remote app on android ==> Described problem occured (Nothing + black screen)
  • Tried to play SMB Serie file using Kore remote app on android ==> Played just fine.
  • Log into Pi through SSH and created “Grab-log -A” link
  • Made this lengthy topic

WHAT I’VE TRIED:

  • Rebooting PI
  • Rebooting NAS
  • Unmounting NAS + Clear Music library + Mount NAS + Update music library

MY GUESS:

  • Something with buffering (allthough no mention of that on screen)
  • Something with NAS not responding fast enough and connection timing out???
  • Something with file bitrates…

DATA:

I’ve found multiple other topics who seem to have the same or similar problems,
but none of them seem to be answered with a solid working solution.
I hope my book of text above can help you guys figure this out, as I don’t get it.

Thanks,
Vincent

There are tons of read errors in the logs.

ERROR: Read - Error( -1, 103, Software caused connection abort )

Certainly looks network related. Have you tried another network cable on the Pi? And different port on the switch?

Also trying SSH into the Pi and copy a file from your NAS. Does it transfer successfuly with decent speeds?

Hi gmc,

Thanks for your reply.
I noticed the errors indeed.
But I thought maybe the error code 103 had an underlying meaning not displayed in the log.

I will try other network cables if I can find some (I used my last one one the PI O:) )
The current one’s are normal Cat5 ethernet cables
The switch is only few months old, provided for free by my ISP to extend my network.
It’s a gigabit switch and seem te work just fine. I will try other ports altough I’ve used 4 out of 5 atm.

As requested I did some transfer speed tests, quickly with windows explorer due to my time schedule today.

Flac file from NAS to laptop (all wired connections):

Flac file from NAS to PI sd card (all wired connections):

Flac file from NAS to PI usb stick, wich uses the samba server addon (all wired connections):
*(see next comment, new user 5 pictures limit)
*(see next comment, new user 5 pictures limit)

Folder structure:
*(see next comment, new user 5 pictures limit)

As you can see there is a speed difference between transferring from NAS to laptop versus NAS to PI.
But speeds seem consistent and descent imho? Not?

My network layout:
ISP router with Wifi and 4 port integrated switch
→ One ethernet cable to laptop
→ One ethernet cable to switch other floor
------> Ethernet cable to NAS
------> Ethernet cable to PI
------> Ethernet cable to ISP digital tv box

Any idea why the Kore remote app displays song lenghts of 0:00?
Because looking at the log files, it seems to loop over the whole cd, erroring on all songs.
Maybe this might be related to the problem?

I hope this helps for now…
Will do cable replacement tests when I can find some.

Vincent

Other images:
Flac file from NAS to PI usb stick, wich uses the samba server addon (all wired connections):

Folder structure:

Hmm. Those network speeds are fine.Your laptop is probably on a GBe interface so your transfers are a lot faster. The Pi has a 100Mbit network adapter so will be slower but graph speeds show its ok. Can’t be a cable/port issue then. (But wouldn’t hurt to try another port/cable to at least rule it out)

If you leave a constant ping running from the Pi to the NAS, when you play the files and you have issues do you get any dropped packets?

iperf test is the best way to check for network issues.

So, let’s bump this up and find a solution… :innocent:

What I’ve done in the meantime:

  • Wanted to do iperf speed test as requested but couldn’t.
    I’ve installed iperf on the pi through ssh, but on my old nas I can enable ssh but there isn’t a single website that can tell me the default root pass for it. I can’t change it, can’t guess it (believe me I tried… A lot…) so there’s no way of installing iperf on the nas for doing the test. (Old iomega home media storage…) But because you guys told me the speed isn’t probably the problem (see speed tests above) we’ll have to assume that to be ok…
  • Then I thought it might have something to do with caching, buffering or connection timeout ( as in nas not responding fast enough?) So I’ve tried some advancedsettings.xml changes, copied from other topics. Although I’m not sure these are the best settings. Advice would be welcome.

I’ve no idea what to do next to fix this. I’m out of suggestions, any help is appreciated.

Dag Tomcent :).

Tell me If I’m wrong, but so far the SMB was tested from different devices to the same iOmega smb “server”. Can you try to read the same set of files on a diffrerent SMB server (e.g. your laptop with a share).

Why am I asking? Well my story was with different devices but matches your scenario. The issue was the SMB implementation in the device acting as the server. File management was not a problem but streaming well.

Can you please follow the instructions in the post below and provide a full debug log that shows the issue? (Turn on debug logging, replicate the issue using a file from an affected share, then upload the logs).

Our wiki contains detailed steps for providing the relevant info we need to help you.

As you can’t install iperf on your NAS can you at least ping your NAS from the RPi and paste the output here?