Raspberry PI and NDX
Posted by: Simon-in-Suffolk on 14 April 2013
Just to advise if anyone is interested I have successfully set up the Raspberry Pi to act as uPNP server and successfully work with the NDX and Nstream in fullI operation mode with playlists.
For those that are not aware, the Raspberry Pi (RPI) is a tiny computer about the size of a large box of matches and is powered by a USB connector and costs about $35.
I have mounted my NAS shares and am using MiniDLNA and am running it headless using athe RPI's inbuilt wired Ethernet adapter.
It sounds as good as any other UPNP server, but then why shouldn't it.. Very impressed.. and it is very quick with Nstream.
No transcoding sorted yet...
Simon
Simon, I do think your ethernet over mains devices are most likely causing the issues. I have yet to get my Pi to stutter in normal mode of operation. I am working on it, but I am using wired duplex sessions. Being duplex is probably the most important aspect.. As remember there are many TCP/UDP sessions open rather than just the TCP one transferring the media.
thinking of options why not remove istatd, I simply use 'top' to get the performance stats. Is your istatd writing to a local file?
BTW if you hammer the Pi when it's streaming and/or raise the nice value (lower priority) of the main upnp process on the Pi, when transcoding I get a crackle rather than a drop in buffer.
Your buffer issue does tend to imply TCP challenges between the Pi and your Naim network player.
But as I said streaming a 192/24 WAV source file on your setup should be enlightening.. Ie does it make any difference? Another idea, when you browse the library with Nstream and do a search across the track titles for example, does the buffer run out, or the search fail to happen or take a ridiculous amount of time to happen ? If not again it suggests your buffer issue is not linked to Pi resources.
Simon
I would like to keep iStat, so I could view the performance of the NAS and Pi on the iPad/iPhone and not on the Laptop (I sometimes are able to get away from it).
No, when I view Albums, Artist or Titles is all very quick, much much quicker than with Twonky Server running on the NAS, where Track view would take a while and the artwork would take forever.
I have given AssetUPnP a -19 priority, so it is just behind the System functions but ahead of anything else. Is this setting persistent, or do I need to make a config change so it remains at this level after a reboot? I can't remember.
As I said, in my setup, there is some network/processing performance at the edge when trying to transcode the 24/192 files to WAV. I am happy with playing the FLAC reliably.
I can't change the Home plugs and go hardwired - this is a listed building, a Georgian house, with the 'Front of House' equipment in one of the reception rooms, and the NAS(s), UPS, switch, AP etc in the far corner of another, hidden away, with no possibility of any cabling between them.
Getting a decent Wireless signal around was a challenge.
However 24-foot high ceilings makes for good sound, though a little chilly on a night like this.
Thanks,
Simon.
My goodness - 24 foot high ceilings - that will sounds more like a castle.....
Yep - I quite often access my Pi from the iPad using a SSH terminal client - and I can run 'top' from that - as that automatically refreshes the console display screen on the iPad.
BTW 802.11ac can be very impressive in my expierience - its worth playing with - although only ratified last summer so kit is thin on the ground. A good signal has 1Gbps throughput - a poorish signal varies from usually around 100Mbps. It can run on 5Ghz where there is less wifi congestion and use double size cells. (obviously you couldn't wifi into Naim with it directly - yet.. )
Simon
Hi folks,
I have placed an update version of the Configuration Guide at https://www.dropbox.com/sh/bu8etep76nu4v5z/aMw624ZA5U
I corrected some mistakes in the 0.1 version, plus also have been customizing the views presented to n-Stream which is covered in the 0.2 version.
The 'trees' view is configured in the txt file AssetUPnPDefinedBrowseTreev4 which can be found in the directory /home/pi/.dBpoweramp/uMediaLibrary-v2
Please take a backup before modifying and losing the original settings.
I have found it useful to remove the A-Z listing on a number of the views, so that all Albums, Artists, Tracks, Composers, etc. are listed alphabetically, allowing you to select using the touch-sensitive A-Z bar on the right of the size of n-Stream.
I have retained the A-Z listing and the ability to search by letter in the Advanced Search views.
Health warning on the Title view with really large collections on the Title view, as there may be a performance hit, but for my 16,841 tracks in 1369 albums on an iPad Mini, Gen2 with Retina display, running iOS 7.0.4 on a 802.11n network connection, performance is acceptable in just under a minute to list all tracks, but I don't normally use that view, as I prefer to go in by Album view which is loaded in under 5 seconds. Plus n-Stream on iPad caches the views, so if you are jumping views to locate a particular track, subsequent loads are instantaneous, which is nice.
These changes mean that I can get to view Albums and their 'upstream' Album Artwork with fewer 'clicks' on the iPad and therefore select and play an Album or select individual tracks for replay faster.
I have included a copy of my modified AssetUPnPDefinedBrowseTreev4.txt file with this Configuration guide in the dropbox link, if you wish to try these modified views or use them as a starting point for your own customized views.
This was/is much easier than with Twonky Server, where you had to modify the XML in the views directory.
Enjoy,
Simon.
Also, discovered that you can rename the Asset UPnP version.
Just change the entry in the Asset-UPnP.txt file in /usr/bin/asset/bin/Versions directory. So mine now says "R14.2 for Naim" reflecting my version with customized tree views.
Oh yeah, if you delete the 'Unreg' file in the /home/pi/.dBpoweramp directory, the Trial is reset to 30-days without having to blast the .dBpoweramp directory and lose all your configuration details.
Of course I will be purchasing Asset UPnP for Raspberry Pi, when it is released and make it permanent!
Simon.
New version of Asset for the Pi out.. Now with browse tree with config...
Just for those using Asset UPnP for the Raspberry Pi, a further Beta release was made available last week (30th January).
Just a case of downloading, extract the executable and rebooting (in some case, a full rescan)
All seems stable and functional. A couple of additional configuration points in this release, as well as some further bug fixes. Certainly well on the way to a full release.
Simon
A further Beta release is available for Asset UPnP on the Raspberry Pi.
Installing directly on to the RPi, and seems to be all stable and functioning without issue.
Enjoy,
Simon.
yep, the 10th February beta seems to have nicely improved scan times for my 1000 + CD library. Still sounds like one of the best UPnP servers I have heard into my Naim.
Simon
I've used the Pi continuously for about three months and its worked faultlessly. It's proved to be a perfect, cheap replacement for a noisy, elderly lap-top. Although there is plenty of useful information around about getting it to work, it's going to have to be a hell of a lot easier before non-technical users are comfortable with it - I think all the people using it on this site work in IT in some capacity.
Chris
Chris - indeed the Pi is designed as a 'building block' tool for people who know or want to learn how to use it. By its nature it can't be a recommended solution for those who are are unable to configure micro computers using Unix from a technical / engineering perspective as opposed to a general non technical consumer basis.
If you are the latter then other consumer solutions including the Unitiserve are the appropriate options. If you are technically profficient however its a great UPnP solution (that also sounds superb with Naim) for around £30.
Simon
A further Beta release was made 19th February.
Updated without issue and all functioning and stable.
Enjoy,
Simon.
Asset now out of Beta and released for the Pi.....
Simon
How is the feature set now it is out of beta?
Richard
Richard I will try later - but the final beta had most of the key capabilities with the notable exception of per control point customisation and per network player/renderer customizations.
Simon
Asset on RaspberryPi - It does everything I want a UPnP server to do, namely:
- It serves high-resolution AlbumArt to the controlling end-point, which for me is the Retina screen iPad Mini, so they look great. Plus it provides up-stream Artwork for Artist, Album etc. which makes browsing more graphical.
- It handles the AlbumArtist field (which Twonky on my ReadyNAS Duo didn't, but LMS did)
- It handles Compilations correctly (which Twonky on my ReadyNAS Duo didn't, but LMS did)
- The Browsing Menus are configurable - there is a GUI, but can also be done in a simple txt file, which is easier than Twonky's XML based configuration.
- It is responsive and performs well when navigating the trees and that's even with my customized views with full A-Z views (with a library currently of 18701 Tracks, 1500 Albums)
- Once I resolved some network issues, it transcodes FLAC, ALAC, MP3, AAC to WAV up to and including 24/192 without issue. The transcode of the lossy formats (MP3 & AAC) allows n-Stream to perform Seek2Time on these tracks, which isn't possible with them in their native format.
- I have the use of a selection of PC-based tools to rip, and manage my library of FLAC-5 & ALAC files. These include:
- dBPoweramp (R15 with 64-bit support) for Ripping & Tagging, Converting formats and Editing IDtags
- foobar2000 for extracting FLAC from SACD, DVD-A ISOs & DTS files
- CUETools for extracting FLAC files with CUE files
- eac3to, for extracting PCM from m2ts files off Blu-ray ISOs
- mp3Tag for managing the Metadata for complete folders
- PerfectTunes for managing AlbumArt, dedup and Accuraterip checks
- WinSCP & Putty for managing the RPi
So for under £100 (RPi, Case, SD Card), a USB PSU with microUSB lead and some inexpensive software (plus opensource software) you have a performing UPnP Server, plus all the tools for ripping and managing your Library.
Plus you have separated the UPnP function from the NAS, allowing the NAS just to be network-attached-storage, plus your Library can now be spread over more than one NAS, or to a Backup NAS incase of failure of your Primary NAS. So giving increased flexibility in your configuration.
What else do you need?
Enjoy,
Simon.
Asset on RaspberryPi - It does everything I want a UPnP server to do, namely:
- It serves high-resolution AlbumArt to the controlling end-point, which for me is the Retina screen iPad Mini, so they look great. Plus it provides up-stream Artwork for Artist, Album etc. which makes browsing more graphical.
- It handles the AlbumArtist field (which Twonky on my ReadyNAS Duo didn't, but LMS did)
- It handles Compilations correctly (which Twonky on my ReadyNAS Duo didn't, but LMS did)
- The Browsing Menus are configurable - there is a GUI, but can also be done in a simple txt file, which is easier than Twonky's XML based configuration.
- It is responsive and performs well when navigating the trees and that's even with my customized views with full A-Z views (with a library currently of 18701 Tracks, 1500 Albums)
- Once I resolved some network issues, it transcodes FLAC, ALAC, MP3, AAC to WAV up to and including 24/192 without issue. The transcode of the lossy formats (MP3 & AAC) allows n-Stream to perform Seek2Time on these tracks, which isn't possible with them in their native format.
- I have the use of a selection of PC-based tools to rip, and manage my library of FLAC-5 & ALAC files. These include:
- dBPoweramp (R15 with 64-bit support) for Ripping & Tagging, Converting formats and Editing IDtags
- foobar2000 for extracting FLAC from SACD, DVD-A ISOs & DTS files
- CUETools for extracting FLAC files with CUE files
- eac3to, for extracting PCM from m2ts files off Blu-ray ISOs
- mp3Tag for managing the Metadata for complete folders
- PerfectTunes for managing AlbumArt, dedup and Accuraterip checks
- WinSCP & Putty for managing the RPi
So for under £100 (RPi, Case, SD Card), a USB PSU with microUSB lead and some inexpensive software (plus opensource software) you have a performing UPnP Server, plus all the tools for ripping and managing your Library.
Plus you have separated the UPnP function from the NAS, allowing the NAS just to be network-attached-storage, plus your Library can now be spread over more than one NAS, or to a Backup NAS incase of failure of your Primary NAS. So giving increased flexibility in your configuration.
What else do you need?
Enjoy,
Simon.
All I can say is +1 to the post above and would like to thank both S-in-S and s_p for their help and guidance in setting this practical little system up.
Maccaa
Asset now out of Beta and released for the Pi.....
Thanks for the information. I am still using the beta trial version. Is there an easy way to upgrade to the final version or is a fresh installation required?
No, just replace the files in the bin directory, as you did with the Beta versions, then reboot.
The only difference is the download wget command, which now references your order number.
Simon
No, just replace the files in the bin directory, as you did with the Beta versions, then reboot.
The only difference is the download wget command, which now references your order number.
Simon
Thanks. Sounds easy enough. Will give it a try tomorrow.
I have just bought the release version. As simes_pep says the only difference is the install process where the 'wget' instruction contains your order number.
Functionality appears the same as final beta, with the obvious exception that there is no trial count down on the info homepage.
Simon
A question of settings?
I have asset (official release) running on my Pi, it works beautifully however when I am in Album Artist/Album view a few of the Album sleeves shown next to the Artist in this initial list are incorrect, i.e. Elbow has a Jamie Cullum sleeve next to it, Extreme has a compilation album cover, Heaven 17 a compilation cover, Kate Bush a Christmas compilation cover Kasabian a Marc Ronson cover, having said that its maybe 10 in 1000 albums so no great issue, I have ensured the tags on the compilation albums are all set as "compilation" I have cleared the cover art cache etc, if you click on the album artist themselves all the albums the next level down are correct. i.e. Kate Bush just has Kate Bush Albums in it etc etc, is there a "tick" I need to set in the asset settings?
Sorry for the ramble.
Have you tried clearing the UPnP cache, then the Image cache, then killing the nStream application (double click of the home button and then up swipe). I find that corrects any infrequent misalignments in nStream.
If so, then you need you look carefully at the album art, as the 'Upstream Artwork', in my understanding works with the first image it finds for the Artist.
Now I am not sure if this selection is done by timestamp or the first item in the folder structure Asset is pointed at. I think/believe Compilations and albums of Various Artists could be confusing the 'Upstream Artwork'
Certainly the Artwork presented for Antonio Forcione, and Antonio & Sabina Sciubba does not represent the Albums I have, but the Artwork I have used for Naim Sampler Compilations they are present on. In terms of their presence in my library, the Naim compilations predated the individual albums.
It would be good to understand how this is working, to see if there was a way to 'promote' desired 'UpStream' Artwork. Or maybe in a later release some way of selecting what is used.
Or how about an jpg file at the top of the folder structure for that Artist?
My folder structure, for the majority (100% the case if there more than one Album from an Artist) is:
Music
|_ Artist
|_ Album (tracks embedded with Artwork, but also folder.jpg)
|_ Album (tracks embedded with Artwork, but also folder.jpg)
Anyway, as a test, I have just 'touch'ed my Antonio Forcione, and Antonio & Sabina Sciubba tracks in the Compilations, so that they have a timestamp newer than the individual albums and see if that changes what is presented.
Simon.
Maybe you should post this query on the dBPoweramp forum, and ask how Asset determines the Upstream Artwork to be served to the UPnP Control point.
Simon.
Hi Simon, thanks for your response have cleared UPnP cache and image cache and killed nStream as suggested, still no joy, as mentioned this is purely for perfection, it works really well other than these few minor points, I guess the really odd one is Elbow (added 2 days ago) with the Jamie Cullum artwork, can't see any link on that at all., I may "cut and paste" my query onto spoon's site as you suggest as your understanding of my issue is clearly better than mine