Quantcast
Channel: Recent Discussions — Plex Forums
Viewing all articles
Browse latest Browse all 151235

[Howto] Running Logitech Media Server's SqueezeLite Client on Rasplex/Openelec

$
0
0

Hi there

 

Finally managed to get SqueezeLite running on Rasplex/Openelec. I now have only one Raspi running both Plex for my videos as well as SqueezeLite to stream music to my TV setup using a Logitech Media Server. Awesome combination :-).

 

Notes:

  • I'm using a Raspberry Pie 2 with Rasplex version 0.7 (clean install).
  • And now upgraded to LibreElec 7.0.1 on a Raspi 3 running PlexKodiConnect :-)
  • LMS and video output is over HDMI to my receiver
  • You need to manually shut-down your new LMS Rasplex Client before using Plex again by using your LMS controller. Otherwise, Plex playback won't start.
  • SqueezeLite and Rasplex can't play audio simultaneously. However, with the undocumented SqueezeLite v1.8 "-C x" option, SqueezeLite will relinquish its use of alsa audio after x seconds. This should prevent most scenarios where you'd be playing simultaneously. You do not need to manually shut down the SqueezeLite player instance either.
  • With Rasplex 0.7, SqueezeLite and Rasplex can now simultaneously play audio. Does not sound pretty though :-).
  • If you run into problems e.g. unresponsive Rasplex because you did use two audio streams, a simple reboot should help.

[attachment=48271:Unbenannt.PNG]

 

1. Get static SqueezeLite binary

Non-static versions did not work for me. I found a static version here (squeezelite-1.7.1-armv6hf-static): ralph_irving.users.sourceforge.net/pico/. New static binary here (SqueezeLite -> Linux -> squeezelite-1.8.0-584-armv6hf.tar.gz): https://www.mediafire.com/folder/4q8dvq20iyz9e/Builds#lllwjg7xjl1by

Upload the binary to your Raspi to a new folder using e.g. WinSCP; username "root", password "rasplex". I used the new folder /storage/.plexht/userdata/squeezelite. Rename the binary to e.g. squeezelite-1.8-armv6hf-static. Set the file permissions to 755. 

 

2. Load module

SSH into your Rasplex installation with the same credentials. Type the following:

cd /storage/.config/modules-load.d
nano squeeze.conf

In the new, empty windows, just enter "snd_bcm2835" without the quotes. Safe and exit nano.

 

3. Disable LIRC

Don't know whether this is really needed; other posts seem to suggest that disabling LIRC improves stability.

cd /storage/.config/modprobe.d/
nano disable-lirc.conf

In the new, empty windows, just enter "blacklist lirc_rpi" without the quotes. Safe and exit nano.

Reboot

4. Figure out the correct audio device

You need to tell SqueezeLite which audio device to use.

cd /storage/.plexht/userdata/squeezelite
./squeezelite-1.8-armv6hf-static -l

Copy-paste the correct audio device for you. In my case "default:CARD=ALSA".

If at this point you don't get any meaningful output devices, try this:

mount -o remount,rw /flash
nano /flash/config.txt

Search for any line containing "dtparam" and put a hash "#" in front of it to disable it. Add instead "dtparam=audio=on" (without a hash). Save and exit nano. Then:

mount -o remount,ro /flash
reboot

 Then start over again with this fourth step. 

5. Test SqueezeLite

./squeezelite-1.8-armv6hf-static -n "SqueezeLite-Test" -o "default:CARD=ALSA"  -a "200"

The command prompt should be "stuck" at this point without any output. If you check your Logitech Media Server, you should now see a new player "SqueezeLite-Test". Press Ctrl + c to stop SqueezeLite and return to prompt.

 

6. Setup SqueezeLite to start on boot

Create or update your autostart.sh:

cd ~/.config 
nano autostart.sh

In the new window, enter the following:

#!/bin/sh

# ALSA-SETUP
############
# Force Alsa output to HDMI (2=HDMI)
amixer cset numid=3 2
# Set Alsa volume to 100%
amixer cset numid=1 400

# SQUEEZELITE-SETUP
###################
# Variables
# Path to squeezelite bin
PATH=$PATH:/storage/.plexht/userdata/squeezelite
SL_BINARY="squeezelite-1.8-armv6hf-static"
# the name for the squeezelite player (-n option):
SL_NAME="Wohnzimmer"
# Set the soundcard
SL_SOUNDCARD="default:CARD=ALSA"
# Highest bitrate, find highest number in line starting with
# "output_init_common:394 supported rates:"
# when running squeezelite -d output=debug. E.g. 384000
SL_BITRATE="384000"
# Set buffer (CHANGE THIS IF YOUR OUTPUT STUTTERS)
SL_BUFFER="50000"
# Set timeout (for squeezelite >= 1.8 only!)
SL_TIMEOUT="3"

# Start SqueezElite
$SL_BINARY -n $SL_NAME -o $SL_SOUNDCARD -a $SL_BUFFER -r $SL_BITRATE -C $SL_TIMEOUT -z 

Safe and exit nano. Make autostart.sh executable and reboot:

chmod +x autostart.sh
reboot

That's it. You should now be able to EITHER have your normal Rasplex Plex audio OR stream your Logitech Media Server audio. Do remember to always shut-down your LMS Player "SqueezeLite" with your LMS controllers of choice before starting to use Plex.

 

Edit: added "and set the file permissions to 755"

Edit2: updated from v1.7.1 to v1.8 and included the "-C" option of SqueezeLite

Edit3: wtf?!? My email showed up as discussion title

Edit4: update from Rasplex 0.6 to 0.7

Edit5: Update step 4 and PlexKodiConnect and buffer up to 50'000 (from 5'000)



Viewing all articles
Browse latest Browse all 151235

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>