Raspberry Pi and Subsonic : the Jukebox mode !
Using Subsonic and Raspebbry Pi to the Airplay with a smartphone, It is possible.
For my part, for example, my raspberry pi is stashed in a Cabinet, which emerge two stereo speakers. When I do a night, I get out my phone, I run the subsonic client, and I run the music playback. The homies are subjugated.
In fact, the mode is used “Jukebox” incorporated in Subsonic. This mode allows to play music directly there or is the server. Of course, You must have set up a subsonic account that allows the execution of the Jukebox mode. So let's use our subsonic client to require its daemon running on your Raspi read music directly from its audio output. And, hang in there, because by doing this, the RAM doesn't take anything, Since after all it is that play a sound directly from storage internal/external media, nothing gourmand, Therefore.
The problem is that, by default, This mode does not work towards a Raspberry Pi, at least not with a (huge) majority of people. So here is the procedure to follow in order to achieve :
First, We need to download a version a little special JAVA8. This version supports add-on JavaFX from the JDK for ARM processors. This archive is located here !
Once downloaded, go to his site via a “cd”, and do the following :
We first create a folder of extraction :
mkdir -p /opt
In which we will unzip/install archive previously downloaded :
sudo tar zxvf [le nom complet du tar] -C /opt
Then, We need to make it clear to Raspian that the new version of Java that you just installed is to use default :
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/jdk1.8.0/bin/java" 1
sudo update-alternatives –set java /opt/jdk1.8.0/bin/java
Now it's Subsonic that we do understand, creating / updating the JAVA_HOME environment variable :
sudo nano /etc/environment
Add/edit line :
Then it also updates the bash console :
sudo nano ~/.bashrc
Add at the end :
export PATH = $PATH:$JAVA_HOME/bin
If it is not already selected, Installing blade and ffmpeg for an optimum transcoding :
sudo apt-get install ffmpeg lame
We created symbolic links to be updated blade and ffmpeg in subsonic :
sudo ln -fs /usr/bin/ffmpeg /var/subsonic/transcode
sudo ln - fs/usr/bin/blade/var/subsonic/transcode
We then need to go change the source code of subsonic to recognize directly the Raspi sound card :
sudo nano /usr/bin/subsonic
Find the line “-verbose:GC “, and just above, add it :
The last step is to choose which audio output of the Raspi you want to use (Jack3.5/HDMI/auto) .
Use the Jack3.5 or the HDMI, the car tends to not work.
sudo amixer -c 0 cset numid=3 N
N is replaced by (1= Jack/2 = HDMI)
Following this, do a :
sudo service subsonic restart
Voilà, There is more to test it on your smartphone via an application client subsonic mode jukebox connected to this server on raspberry pi.
If this does not work despite hours ironing all previous manipulations, make sure though that you have connected the speakers to the Zhao.(= Experience :] )