PDA

View Full Version : Play audio CDs from Jivelite



fvzeppelin
2017-04-17, 02:18
UPDATE 1: Added details on autostarting and a Jivelite addon

Hello community,

this is one of my first posts here.
My goal: I am building a music player box with an integrated amp, turntable, CD player, a Raspberry Pi (+touchscreen) based streaming client and whatever may seem appropriate to me in the future ;)

I got a little stuck with the CD player, as I wanted to use Squeezelite / Jivelite for the streaming client and there are no controls for a CD player and no player software included either.

After some testing of different approaches, my preferred solution is to use VLC (http://www.videolan.org/vlc/) as player and control it from Jivelite. As I may not be the only one who wants to add a CD player to Jivelite, I share what I think is necessary to do so:

1. Prepare appropriate Squeezelite / Jivelite configuration
In order to use VLC as player, Squeezelite needs to release the sound card when not active. This can be achieved by calling it with the "-C" option. While this sounds very easy, it actually needs some preparation on the Pi as the currently provided debian package does not yet support this option. So:

Install Raspbian Lite
Install minimum X system, e.g. here (https://www.raspberrypi.org/forums/viewtopic.php?t=37564&p=312573)
Download, build and install Squeezelite and Jivelite, e.g. here (http://www.hagensieker.com/jivelite/index.php) (start with the Squeezelite section). I haven't found a different way to autostart Squeezelite on the Pi than to install the debian package and overwrite the binary with the self-built one. If someone knows better, please let me know ;)
Now you should be able to configure Squeezelite to start with the "-C 3" option


2. Install VLC, e.g.
sudo apt-get install vlc

3. Autostart VLC with the R(emote)C(ontrol) interface and bind to a Unix socket. Unfortunately, VLC seems to require a terminal to run the rc interface. Therefore you will need the screen package to run VLC as a job, e.g. by adding this to crontab on reboot:

screen -d -m /usr/bin/vlc -I oldrc --rc-unix ~/vlc.socket --extraintf=http:logger --verbose=2 --file-logging --logfile=~/vlc.log >/dev/null
If you want to get more metadata from VLC than just the title, you will have to build it by yourself an use my commit (https://patches.videolan.org/patch/16418/) to the VLC sources.

5. Configure Jivelite to control VLC via the socket
Extract my example applet in the Jivelite applets folder. The applet is just a first try with a lot of coding mistakes. So please provide improvements, if you like!

6. Enjoy :)

So far, any hints or suggestions are highly appreciated! :p

fvzeppelin
2017-04-20, 12:01
First post updated

Greg Erskine
2017-04-20, 15:21
hi fvzeppelin,

Seems like a really cool project. :D

Am I understanding correctly, when playing a CD, you are not using the SB/LMS environment at all. :confused:

regards
Greg

fvzeppelin
2017-04-20, 22:40
hi fvzeppelin,

Seems like a really cool project. :D

Am I understanding correctly, when playing a CD, you are not using the SB/LMS environment at all. :confused:

regards
Greg

Hi Greg,

thanks :D
Yes, I am only using Jivelite to control VLC.
I think you can use the LMS CD player plugin, if your drive is connected to the machine which is hosting the LMS. But this is not the case for me.

Regards
Frank