bennypr0fane
Posts: 16
Joined: Sun Mar 03, 2013 2:35 pm

The Pi is to weak for XBMC (solved)

Mon Jul 29, 2013 6:57 pm

Hello,
I am completely and utterly frustrated with the Raspberry Pi,
as after many hours-long sessions of tinkering and tweaking, I ahve still found it not suited for the task I intended it for, namely running XBMC. Specifically, I wanted to connect it to my NAS headless, to stream MUSIC (not video!) and control it via an Android remote control from my Android tablet.
Well, that was frustrating. I don't believe my music collection is very large for current standards. It's not small, but definitely doesn't exceed what a standard media player application should be able to handle with ease.
Anyway, it takes XBMC-distros on the Pi several minutes to bring up a list of the titles shared from the NAS.
The hardware is simply too slow to handle this task in a decent time (I excluded the NAS being the culprit. It easily saturates the network with 1,2GHz and 512MB ram).
I cannot fathom how it could have been advertised as being a good tool for use as a media centre.
I am writing to see if anyone can tell me why I should not sell my 2 Raspis (I really never thought it'd require that much Zen to use them - for anything) and keep trying.
(Btw I can't even use them for the lowly task of a print server, because my printer drivers do not come compiled for arm and they won't compile on the Pi either)
"You won't tell me, they won't tell me - I'll never know what to google!"

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24129
Joined: Sat Jul 30, 2011 7:41 pm

Re: The Pi is to weak for XBMC

Mon Jul 29, 2013 7:06 pm

Odd. I use XBMC using DNLA to wireless stream video from a desktop PC and its absolutely fine. TBH I'm surprised how fast it actually is. So your contention that the HW is too slow is incorrect, since others have not got a problem. So, that leads me to think that you have a setup issue somewhere.

So, how does you NAS share its data - DNLA or Samba? Like I said DNLA seems to work fine, and I think that Dom uses Samba and that works fine. Do you have you music in one folder on the NAS or in a tree structure? How many titles? Are you wired or wireless? Which version of XBMC are you using? I use OpenELEC, so you could try that as a reference. There's not really enough information in your post to to any real diagnosis though.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

dspolleke
Posts: 114
Joined: Thu Feb 07, 2013 7:09 pm
Location: Netherlands

Re: The Pi is to weak for XBMC

Mon Jul 29, 2013 7:23 pm

Two of my pi's work wonderfully with OpenElec. I play audio, video streams from the internet, movies on my Samba server.. No problem at all.

So, Don't give up to soon. Set up OpenElec.. It is a dedicated stripped down Linux distro for Embeded systems.. It is fast and smooth and i don't recognize any of your complaints..
Please read: http://www.biblegateway.com/passage/?search=Matthew+7%3A7&version=NIV

Use loads of sunscreen, use the search, be elaborate in questions, paste commands and error messages, and remember google is your friend!

smithg400
Posts: 148
Joined: Sat Dec 24, 2011 3:37 pm

Re: The Pi is to weak for XBMC

Mon Jul 29, 2013 8:18 pm

Have you imported the directory into the library? Scanning the filesystem will take a while as it has to open each file to read the artist, album and track info. Once this is in the library though it is a lot quicker.

bennypr0fane
Posts: 16
Joined: Sun Mar 03, 2013 2:35 pm

Re: The Pi is to weak for XBMC

Tue Jul 30, 2013 12:28 pm

jamesh wrote:Odd. I use XBMC using DNLA to wireless stream video from a desktop PC and its absolutely fine. TBH I'm surprised how fast it actually is. So your contention that the HW is too slow is incorrect, since others have not got a problem. So, that leads me to think that you have a setup issue somewhere.
Maybe you are correct. But there comes a point where you just want stuff to work already, and it gets really tiring hunting down those issues, and you just never get there...
So, how does you NAS share its data - DNLA or Samba? Like I said DNLA seems to work fine, and I think that Dom uses Samba and that works fine. Do you have you music in one folder on the NAS or in a tree structure? How many titles?
I tried both UPnP and Samba I got the same slowness with both. What/Who is Dom?
My music on the NAS is in a folder structure, mostly just 1 directory deep. Maximum depth of the tree is 3 embedded folders. Album art is also in those folders (I can't seem to keep that stuff away from mp3s, regardless which OS/device they reside on). I'm not sure about the number of titles, wild guessing around a thousand. Anyhow not larger than what I have often seen on other people's computers. I'm sure the number is not a problem, or is not SUPPOSED to be one.
Are yo wired or wireless? Which version of XBMC are you using? I use OpenELEC, so you could try that as a reference. There's not really enough information in your post to to any real diagnosis though.
Wired.
I tried Xbian, RaspBMC, XBMC on Raspbian (broken, won't install), and the last one was a custom build of OpenELEC by Rbej. I used that custom build because it supports usb hotplugging (see herehttp://www.raspberrypi.org/phpBB3/viewt ... 9&p=316342 - in German - or here http://forum.xbmc.org/showthread.php?tid=158229 or here http://forum.stmlabs.com/showthread.php?tid=7430 or here http://openelec.tv/forum/124-raspberry- ... fail#67217).
"You won't tell me, they won't tell me - I'll never know what to google!"

bennypr0fane
Posts: 16
Joined: Sun Mar 03, 2013 2:35 pm

Re: The Pi is to weak for XBMC

Tue Jul 30, 2013 12:30 pm

dspolleke wrote:Two of my pi's work wonderfully with OpenElec. I play audio, video streams from the internet, movies on my Samba server.. No problem at all.

So, Don't give up to soon. Set up OpenElec.. It is a dedicated stripped down Linux distro for Embeded systems.. It is fast and smooth and i don't recognize any of your complaints..
complaint no 2: Even the UI is slow, the mouse pointer lags, and buttons take their sweet time for responding to clicks
"You won't tell me, they won't tell me - I'll never know what to google!"

User avatar
Davespice
Forum Moderator
Forum Moderator
Posts: 1662
Joined: Fri Oct 14, 2011 8:06 pm
Location: The Netherlands
Contact: Twitter

Re: The Pi is to weak for XBMC

Tue Jul 30, 2013 12:31 pm

I use Open Elec and it's always been great. It does like the extra ram of the 512 MB Model B though :)
*shrug*

bennypr0fane
Posts: 16
Joined: Sun Mar 03, 2013 2:35 pm

Re: The Pi is to weak for XBMC

Tue Jul 30, 2013 12:39 pm

smithg400 wrote:Have you imported the directory into the library?
Yes.
Scanning the filesystem will take a while as it has to open each file to read the artist, album and track info. Once this is in the library though it is a lot quicker.
In fact, it took more than a whole night, and interrupting to ask for confirmation to unpack some large (zipped) files, no idea what for.
Issue no3.: Not only would it take up to 15 minutes for bringing up the complete list of titles - from the library - but also it showed up to 11 instances of many titles, just the same title listed 11 times in a row. I made sure though those files were not present in the directory multiple times. Probably the explanation why it took so long - and the point where I finally got fed up and stopped trying. Took me 2 months now to work up the patience and try again...
"You won't tell me, they won't tell me - I'll never know what to google!"

User avatar
RaTTuS
Posts: 10498
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: The Pi is to weak for XBMC

Tue Jul 30, 2013 12:58 pm

Is this wired ?
or wireless
what is the power supply
how have you attached everything on the RPI?
is your network dropping
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24129
Joined: Sat Jul 30, 2011 7:41 pm

Re: The Pi is to weak for XBMC

Tue Jul 30, 2013 1:02 pm

bennypr0fane wrote:
smithg400 wrote:Have you imported the directory into the library?
Yes.
Scanning the filesystem will take a while as it has to open each file to read the artist, album and track info. Once this is in the library though it is a lot quicker.
In fact, it took more than a whole night, and interrupting to ask for confirmation to unpack some large (zipped) files, no idea what for.
Issue no3.: Not only would it take up to 15 minutes for bringing up the complete list of titles - from the library - but also it showed up to 11 instances of many titles, just the same title listed 11 times in a row. I made sure though those files were not present in the directory multiple times. Probably the explanation why it took so long - and the point where I finally got fed up and stopped trying. Took me 2 months now to work up the patience and try again...
Obviously something very wrong there. And not the Raspi, since it works fine for others. Try the very latest OpenELEC (not a custom build from someone else as that could have anything wrong with it), and ensure your power supply is up to scratch.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

drgeoff
Posts: 9912
Joined: Wed Jan 25, 2012 6:39 pm

Re: The Pi is to weak for XBMC

Tue Jul 30, 2013 5:12 pm

bennypr0fane wrote:What/Who is Dom?
dom is a colleague of jamesh. Both have inside knowledge of the RPi and can be considered gurus.

surfatwork
Posts: 62
Joined: Mon May 06, 2013 8:26 am

Re: The Pi is to weak for XBMC

Tue Jul 30, 2013 9:01 pm

just to add that the Raspi works great as a media server/player with Arch too - mine is headless. I have several thousand music files (flac/mp3/ogg) on a USB HDD, served up as a mpd music DB, and also served through minidlna. I can choose to play them on the Raspi which is connected to my music system, or on my laptop using a DLNA browser. Adding them to the libraries took perhaps few tens of minutes, defly less than an hour.
Have you tried connecting a USB HDD to your Raspi, instead of having the files on a NAS drive and accessed over the network? This will eliminate (i) issues with your network (ii) issues with your Raspi and NAS not playing nice for whatever reason.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5370
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: The Pi is to weak for XBMC

Tue Jul 30, 2013 9:31 pm

jamesh wrote:Obviously something very wrong there. And not the Raspi, since it works fine for others. Try the very latest OpenELEC (not a custom build from someone else as that could have anything wrong with it), and ensure your power supply is up to scratch.
Actually the rbej custom builds are good - I tell him all the good patches to pull in, and he tests them pretty well. I use them myself.
They are bleeding edge though (not just top of github, but with even newer patches), so not for everyone.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 24129
Joined: Sat Jul 30, 2011 7:41 pm

Re: The Pi is to weak for XBMC

Tue Jul 30, 2013 9:34 pm

dom wrote:
jamesh wrote:Obviously something very wrong there. And not the Raspi, since it works fine for others. Try the very latest OpenELEC (not a custom build from someone else as that could have anything wrong with it), and ensure your power supply is up to scratch.
Actually the rbej custom builds are good - I tell him all the good patches to pull in, and he tests them pretty well. I use them myself.
They are bleeding edge though (not just top of github, but with even newer patches), so not for everyone.
Cheers Dom, good to know. Didn't know the source, so thought it best to be on the safe side. Any ideas of the cause of the problem here?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

bennypr0fane
Posts: 16
Joined: Sun Mar 03, 2013 2:35 pm

Re: The Pi is to weak for XBMC

Tue Jul 30, 2013 9:36 pm

RaTTuS wrote:Is this wired ?
or wireless
what is the power supply
how have you attached everything on the RPI?
is your network dropping
everything is wired. The ethernet cable goes from the router to a switch, from the switch to the Raspi. the NAS is also attached to the router via ethernet cable, as is my desktop pc. Everything checks out in the router's control panel, so I have no reason to believe there is something wrong in the network setup.
My desktop pc shares the monitor and mouse/kb with the Raspi, I just need to switch the input source and swap the mouse/keyboard's usb dongle.
The power supply is the one I ordered with the Raspi from RS Components, it is found there as recommended accessories and has 1,2A power output.
"You won't tell me, they won't tell me - I'll never know what to google!"

bennypr0fane
Posts: 16
Joined: Sun Mar 03, 2013 2:35 pm

Re: The Pi is to weak for XBMC

Tue Jul 30, 2013 9:46 pm

surfatwork wrote:Have you tried connecting a USB HDD to your Raspi, instead of having the files on a NAS drive and accessed over the network? This will eliminate (i) issues with your network (ii) issues with your Raspi and NAS not playing nice for whatever reason.
I absolutely want music to be played from the nas, because of how I manage my music collection.
The point is to have the files in sync across all my devices (desktop, laptop, smartphone - achieved by Dropbox). The NAS (Zyxel NSA325) pulls the files from dropbox and serves it up to the Raspi. Such a setup wouldn't be possible if I had the music files served from a usb hdd.
Last edited by bennypr0fane on Tue Jul 30, 2013 9:53 pm, edited 1 time in total.
"You won't tell me, they won't tell me - I'll never know what to google!"

User avatar
bob_binz
Posts: 441
Joined: Thu Feb 02, 2012 7:58 pm
Location: Stockport, UK

Re: The Pi is to weak for XBMC

Tue Jul 30, 2013 9:47 pm

Do you have another SD card you can try, just to eliminate that? I have one player with a Sandisk Extreme and it flies, then I have another with a standard Sandisk x4 card that is significantly more sluggish (albeit not to the extent you have described)

bennypr0fane
Posts: 16
Joined: Sun Mar 03, 2013 2:35 pm

Re: The Pi is to weak for XBMC

Tue Jul 30, 2013 9:52 pm

So it seems there is a consensus here about OpenELEC being the best choice for an XBMC distro?
Does anyone prefer something else?
- Does it allow for overclocking? My device is fine with it up to 900Mhz. The OE custom build I tried was not overclocked (didn't know how, either).
- I *need* usb hotplugging to work. Trying to set everything up headlessly is another thing that has made me very tired and frustrated.

Thanks everyone for taking a look at this!
"You won't tell me, they won't tell me - I'll never know what to google!"

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5370
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: The Pi is to weak for XBMC

Tue Jul 30, 2013 9:52 pm

jamesh wrote:Cheers Dom, good to know. Didn't know the source, so thought it best to be on the safe side. Any ideas of the cause of the problem here?
Handling big lists of files is slow in xbmc. You are either iterating a directory (which tends to involve round trip network messages per file), or doing SQL lookups (if you have scanned into a library). (*)

For me this is most noticable going into movies view. I have a list of about 1300 films, and that takes about 8 seconds.
TV view is better as the list just contains the tv series (and a couple of hundred series takes a couple of seconds).

Now music can be much worse that videos. A collection may contains ten thousand tracks for example.

If they are nicely organised through a artist/album/song directory hierarchy it will probably be fine. If you have ten thousand files in a flat directory it will take forever.
If you have your music scanned into a library, I would expect it to be quick when browsing through nicely hierarchical menus, but flat lists would be slow.
(However I don't generally play music on the Pi, so am not an expert).

Obviously a slow network would make things worse.
I also don't know how the Android app interacts with xbmc (reading every music track every time it connects, before letting you do anything would not be ideal).

(*) there is also a stage where all the data is put into an archive class and pulled out, which is slow. We have someone who's looking into improving this.

bennypr0fane
Posts: 16
Joined: Sun Mar 03, 2013 2:35 pm

Re: The Pi is to weak for XBMC

Tue Jul 30, 2013 9:56 pm

bob_binz wrote:Do you have another SD card you can try, just to eliminate that? I have one player with a Sandisk Extreme and it flies, then I have another with a standard Sandisk x4 card that is significantly more sluggish (albeit not to the extent you have described)
I have been using 2 SanDisk Extreme 32GB (class 10, 45MB/s) cards for everything.
"You won't tell me, they won't tell me - I'll never know what to google!"

surfatwork
Posts: 62
Joined: Mon May 06, 2013 8:26 am

Re: The Pi is to weak for XBMC

Tue Jul 30, 2013 10:03 pm

Have you tried raspbian + mpd + minidlna? If you are using it for only music, then why use xbmc/derivatives?

bennypr0fane
Posts: 16
Joined: Sun Mar 03, 2013 2:35 pm

Re: The Pi is to weak for XBMC

Tue Jul 30, 2013 10:13 pm

dom wrote:Handling big lists of files is slow in xbmc. You are either iterating a directory (which tends to involve round trip network messages per file), or doing SQL lookups (if you have scanned into a library). (*)(*) there is also a stage where all the data is put into an archive class and pulled out, which is slow. We have someone who's looking into improving this.
I don't understand this really, but it sounds like it could be the reason for titles returning 11 times?
Now music can be much worse that videos. A collection may contains ten thousand tracks for example.
Mine is definitely not that large. Must be under 5000.
If they are nicely organised through a artist/album/song directory hierarchy it will probably be fine. If you have ten thousand files in a flat directory it will take forever.
I don't have that hierarchy mostly, only where I have multiple albums from one artist.
If you have your music scanned into a library, I would expect it to be quick when browsing through nicely hierarchical menus, but flat lists would be slow.
That would make sense to me when browsing the directories in the file manager, but why would it cause a slowdown when browsing the library? Isn't the whole point of the library to eliminate that problem?
Obviously a slow network would make things worse.
I am starting to suspect the Zyxel NSA325 more and more of improperly handling transfers. It's been working, but always with one hiccup here, another one there - in fact I've never gotten round to really trusting it to work "as advertised" - much like the Raspi.
I also don't know how the Android app interacts with xbmc (reading every music track every time it connects, before letting you do anything would not be ideal).
Except for some failed attempts at connecting Android to XBMC, I have barely gotten to that part really, given that my mental sanity is already compromised at XBMC on the Pi. Go figure bringing the next device into the game... I do hope it reads the library metadata, not the files
"You won't tell me, they won't tell me - I'll never know what to google!"

bennypr0fane
Posts: 16
Joined: Sun Mar 03, 2013 2:35 pm

Re: The Pi is to weak for XBMC

Tue Jul 30, 2013 10:20 pm

surfatwork wrote:Have you tried raspbian + mpd + minidlna? If you are using it for only music, then why use xbmc/derivatives?
What's mpd? The idea behind using XBMC is to be able to remote control it, headlessly (because basically the remote control - in the form of an Android tablet or my Nokia N900 - is the screen). The stereo playing music from the NAS in the living room, I have complete control from my tablet, sitting at the kitchen table, or wherever. No need to see the screen and point with the mouse.
I don't believe that would be possible with the setup you're suggesting. Can you think of alternatives?
"You won't tell me, they won't tell me - I'll never know what to google!"

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: The Pi is to weak for XBMC

Wed Jul 31, 2013 1:58 am

If you're suspecting the NAS of having issues, then best to rule it out by temporarily transferring some music to a USB hard drive and see how OpenELEC handles the media on the hard drive...
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

surfatwork
Posts: 62
Joined: Mon May 06, 2013 8:26 am

Re: The Pi is to weak for XBMC

Wed Jul 31, 2013 6:51 am

bennypr0fane wrote:What's mpd?
you know what to google now!!
With mpd, it is actually quite trivial to get the setup you are after which I understand to be: music on NAS, Raspi connected to stereo, plays music from NAS and can be controlled remotely, headless.
It is exactly what I have, except that my music (~6000 files) is on a USB HDD instead of a NAS drive. that difference is irrelevant if your network is working correctly.

Return to “Troubleshooting”