|
Post by Pinch on Apr 13, 2015 11:34:19 GMT
As I noted in Martin's main thread, I've recently been experimenting with using the Pi for video as well as audio. This is for use in my lounge, where the main screen and the second system reside. Up til now I've been using a somewhat knackered (but still quite powerful) old laptop for streaming video, and playing locally stored video and music files. My goal is to render this laptop redundant. I've picked up one of the new RPi 2s - the added power will be useful when it comes to playing HD videos - and a Digi+ board, as well as the other standard peripherals. The goal is to have it do at least the following:
-play locally stored music and video files to the same standard as the laptop, and (hopefully) play the music files to the same standard as a Pi running Volumio. The laptop is connected to a DAC via USB, but the Pi will ideally output audio from the Digi+ board via coax. -flawlessly stream video from the internet. This is vital since, between us, my partner and I make heavy use of the BBC iPlayer (and other network equivalents) and Twitch; we don't have a TV box or aerial connection.
The interface must also be sufficiently user-friendly that my mildly technophobic partner will be happy to use it. I initially experimented with simply using Raspbian with a development build of JRiver. This didn't last long though, as it seems that there isn't a version of flash that will run on an ARM processor, so no way to access the iPlayer or other streaming services via a web browser. Also, this fell down on user-friendliness - Raspbian's UI is a little clunky. So next I looked into Linux distros designed for running the Pi as an HTPC (Home Theatre PC). There are a number of options here, but I've settled for now on OpenELEC (Open Embedded Linux Entertainment Center). OpenELEC is designed to run Kodi - a media player - on an embedded device, rather than as an application within another OS. The relationship between the two is - I take it - similar to the relationship between Volumio and Music Player Daemon. There's a daunting array of options within OpenELEC, and there's still quite a bit for me to figure out and fix. But I think it at least has potential to do everything I want - the UI is very nice. So far I've had it playing local music and video files without any trouble, but streaming video is quite iffy, with buffering problems, so I need to experiment with various things to fix that. I'll update with some stuff on the basic set up, and maybe even some pictures, later on
|
|
|
Post by John on Apr 13, 2015 11:49:14 GMT
Great work I am sure many people be interested in your results
|
|
|
Post by MartinT on Apr 13, 2015 12:07:48 GMT
Thanks, Tom, much to think about there. Personally, I have no need for video as I use the Sky box for everything off air and downloadable. I am about to implement a 2nd RPi for upstairs (bedroom) audio via headphones, though.
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Apr 13, 2015 15:27:31 GMT
Great job, thanks for sharing. I'll follow the thread with interest for further details.
Is Kodi (OpenELEC) equal in audio quality compared to MPD (Volumio) ?
|
|
|
Post by Pinch on Apr 13, 2015 15:57:45 GMT
I won't be able to tell til I have things set up better for making comparisons - at least, a Volumio install on a second microSD card, or (better) a second Pi with Digi+ running Volumio, so I can switch back and forth between OpenELEC and Volumio playing the same track. This is something I plan to do at some point.
My expectation is that Volumio will take some beating, simply because it's completely optimised just for audio, and my experience so far has been that this approach pays dividends. There are a number of settings in OpenELEC to play with - mostly just turning stuff off I think (for example, by default it's set to automatically resample).
But initial impressions of the sound are fine. I'll be satisfied so long as it does a good job with embedded audio in video files, since even if it can't compare to Volumio on music, it won't be too much trouble to have both a Volumio and an OpenELEC microSD card in circulation (or maybe even dual boot - something to look into).
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Apr 13, 2015 20:13:28 GMT
... My expectation is that Volumio will take some beating, simply because it's completely optimised just for audio, and my experience so far has been that this approach pays dividends. Yes, I suspected that this would be the case, but was tempted by the idea to have two in one. ...it won't be too much trouble to have both a Volumio and an OpenELEC microSD card in circulation (or maybe even dual boot - something to look into). Oh, that would be a pain for me. As for dual boot I'm not sure it's possible, but will make some search in the net. But maybe it's better to have a 2nd RPi for video Thanks again for the immediate response. :thumb up:
|
|
|
Post by Pinch on Apr 14, 2015 7:54:06 GMT
A quick googling suggests that dual boot could be option - if that can be made to work then it would be ideal for me. I'll look into it properly once I'm satisfied with OpenELEC. New Build Parts List
Here's what I've gone for... Raspberry Pi 2 Model B - £29.99 Hifiberry Digi+ board - €34.90 excl. VAT SanDisk Ultra microSDHC UHS-I Class 10 Memory Card - £10.55 - I went for the 8GB, since it's not necessary for me to store anything on the Pi but the OS, but it is possible to play video files directly from its own hard disk, in which case more space would probably be an advantage. Edimax EW-7811UN 150Mbps Wireless Nano USB Adapter - £7.18 - reputed to play nicely with the Pi, and it's tiny. CAMAC Clear Transparent Case - £6.34 - I like this case as it allows for a lot of air flow, which is handy for overclocking (which may or may not be necessary for playing full HD videos). Great price also. Logitech Wireless Combo MK520 - £36.00 - unlike previous builds, this Pi will be connected to a screen, and won't be controlled remotely, so a keyboard/mouse combo will be handy. I went for this one primarily because it's known to work with the Pi, and the receiver is tiny. Stontronics T2526ST AC-DC Linear PSU, 5V 1A 2.1MM - £9.86 - this is a cheap linear PSU which is a fine match for the Pi. I might experiment again with batteries later on, but at least initially this will be more convenient for me. CJE Micros 2.1mm socket to microUSB plug - £9.00 - necessary to connect the PSU to the Pi.
|
|
|
Post by MartinT on Apr 14, 2015 8:20:24 GMT
Great stuff, Tom. That nano wi-fi 'n' adapter does work well with the Pi, I got one with an early kit and have just started using it for the upstairs streamer and it seems stable with my BT Home Hub 5.
|
|
|
Post by MartinT on Apr 14, 2015 8:21:57 GMT
One observation: with the Digi+ providing audio and HDMI providing video, you run the risk of lip-sync errors unless there is compensation in the software.
|
|
|
Post by Pinch on Apr 14, 2015 8:43:38 GMT
Good point. So far I've not noticed syncing errors, but I'll keep an eye (and ear) out for it now. The Digi+ is there so I can use the Pi for music without the intermediary of the screen - essential if I want to have music playing while the screen is off, or occupied by a console. But obviously this isn't a concern for video, and HDMI could be used for audio as well - the TV also runs into the DAC, so it would still utilise the sound system this way. I think OpenELEC has some 'profile' options, so it may be possible to have different profiles for music and video, which differ in the output device. I'll wait for the problem to emerge though - I'm going to stress test the Pi at some point soon with some crazily high quality blu-ray rips, so this might turn something up. EDIT Ah! It seems there are indeed options within OpenELEC for addressing lip sync issues, so hopefully it'll be fine
|
|
|
Post by Pinch on Apr 14, 2015 10:01:55 GMT
Installing OpenELECThe (model specific) OpenELEC image for the RPi can downloaded here. As usual, the microSD card (if not brand new) is formatted with SD Formatter, and then the image is written to the card using Win32 Disk Imager. Here's the new Pi in situ: I need to grab some screen shots from OpenELEC, and then will go over some initial set-up stuff.
|
|
|
Post by Pinch on Apr 17, 2015 13:07:20 GMT
Configuring OpenELEC - Pt. IHere's what you see on connecting everything and booting OpenELEC. It's possible to navigate through these tabs, and their embedded menus, either with the mouse or with a remote control (my TV remote worked with it automatically, though I later disabled it for reasons I'll get to later). From here, the system menu and sub-menus can be accessed, for setting up and tweaking OpenELEC. But before that, it's worth activating the Digi+ board, which is done at the command line via an SSH client (I'm using Putty). The Pi will need to be connected to the network via either ethernet or wifi. The latter can be configured in OpenELEC: Ensure that wifi is active, by checking the option under System > OpenELEC > Network, shown here: Then look under 'Connections', where you can add and save your wifi network details. Here you'll also find the IP address that the Pi is using - use this to connect to the Pi via Putty. Also check under 'Services' that SSH is activated. The username to use on connecting with Putty is 'root' and the default password is 'openelec'. The Digi+ is activated by adding a couple of lines to config.txt, but before doing this it's necessary to make /flash (the directory in which config.txt is stored) writeable, via: mount -o remount,rw /flash then goto flash via: cd /flash and edit config.txt via: nano config.txt This brings up the following wall of text: Scroll to the bottom and add the following two lines: dtoverlay=hifiberry-digi dtdebug=1 Then ctrl+X to exit, Y to save changes, and reboot the Pi. Then, from the main screen, if you navigate to Settings > System > Audio output, you should see the Digi+ listed as the output device, like so: More to follow...
|
|
|
Post by MartinT on Apr 17, 2015 13:44:21 GMT
Great information and screen captures, many thanks Tom.
|
|
|
Post by John on Apr 17, 2015 16:18:48 GMT
Well done Tom I am sure it will help others threading a similar path
|
|
|
Post by Pinch on Apr 17, 2015 17:08:05 GMT
Configuring OpenELEC - Pt. IIUnder the 'System' header there are several tabs: Here's what I've done under 'Settings' and 'OpenELEC'... Under 'Settings' (with the 'Settings level' set to 'Expert'(!)) there's a list options to play with: So far I've set the following... Under Appearance > International I've changed the region to UK and the clock to 24h, set the keyboard layout, and timezone: Under Music > Playback I've disabled replay gain (incompatible with bitperfect output), crossfading (undesirable), and visualisation (unnecessary): Under Services > General I've set the device name to 'Lounge' - this is useful in my case since I have a number of Pis in a number of rooms, and naming them by room makes certain things easier to keep track of and control: Under Services > UPnP I have everything turned on, but most of these services are actually unnecessary for me and will probably be turned off, with the exception of "Allow control of Kodi via UPnP", since this will enable me to stream content to OpenELEC from JRiver: More info on the various services and what they do here. Under System > Video output I've changed the resolution to my TV's native resolution, and set the refresh rate at 60: Under System > Audio output (aside from setting the Digi+ as the default output) I've set 'Output configuration' to 'Best Match', to ensure the closest match between source and output, and the sampling rate limit to 192, to prevent downsampling of hi-res files: That's it for 'Settings', but wait, there's more... Under OpenELEC > System the system name can be set, and keyboard layout and type. I think I have the latter set incorrectly - certain keys aren't behaving as they should - something to play with. Under OpenELEC > Services various services can be enabled or disabled. Here I have SSH enabled, else access via Putty wouldn't be possible, and I've since enabled Samba (easiest way to grab all of these screenshots off the Pi!). Also worth a look: Under System info > Hardware there's some useful information on the Pi itself - most notably CPU usage and temperature. Also, if the Pi has been overclocked then this will be discernible here in the figure for the CPU speed. There's probably more here that's worth fiddling with - at least, a number of services could probably stand to be switched off - but this is at least enough to ensure that the Pi is outputting sound and video optimally, and sets me up to integrate this Pi into my current set up with JRiver. To follow: playing music and video.
|
|
|
Post by ChrisB on Apr 17, 2015 17:31:46 GMT
This is great stuff Tom, keep up the good work. I'm sure this will prove to be a valuable resource for many people.
|
|
|
Post by John on Apr 17, 2015 19:46:27 GMT
Tom let us know if you want us to move the images on a separate thread for others to follow
|
|
|
Post by Pinch on Apr 18, 2015 7:40:22 GMT
Thanks for the encouragement chaps! Tom let us know if you want us to move the images on a separate thread for others to follow Thanks John, I'm happy with keeping everything here for now, unless it would somehow be more useful to have images elsewhere(?)
|
|