From f9f6ca8dba90f0a24b7787e524c2e78ef124b2b0 Mon Sep 17 00:00:00 2001 From: Andreas Date: Mon, 17 Mar 2014 11:57:55 -0700 Subject: [PATCH] Created Clementine on Raspberry Pi (markdown) --- Clementine-on-Raspberry-Pi.md | 74 +++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 Clementine-on-Raspberry-Pi.md diff --git a/Clementine-on-Raspberry-Pi.md b/Clementine-on-Raspberry-Pi.md new file mode 100644 index 0000000..4cf7bc8 --- /dev/null +++ b/Clementine-on-Raspberry-Pi.md @@ -0,0 +1,74 @@ +This is a tutorial on how to build Clementine on the Raspberry Pi. I used revision B with 512 MB ram and the Raspian OS. + + +Note: Building Clementine on the Pi takes a lot of time, around 8 hours. + +### What you need + * A [Raspberry Pi](http://www.raspberrypi.org/) obviously + * At least a 8GB flash card (16GB recommended) + * [Raspbian](http://www.raspbian.org/) + + +### Dependencies +The same as on any linux distro: + + sudo apt-get install liblastfm-dev libtag1-dev gettext libboost-dev \ + libboost-serialization-dev libqt4-dev qt4-dev-tools libqt4-opengl-dev \ + cmake libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev \ + libglew1.5-dev libqjson-dev libgpod-dev libplist-dev \ + libusbmuxd-dev libmtp-dev libcdio-dev \ + protobuf-compiler libprotobuf-dev libqca2-dev libqca2-plugin-ossl \ + libfftw3-dev libsparsehash-dev libsqlite3-dev + +### Get the source +We will compile the stable 1.2.2 release. If you want to compile the master branch, don't execute `git checkout release-1.2`. I haven't tested it, so it might not work! + + git clone https://github.com/clementine-player/Clementine.git && cd Clementine + git checkout release-1.2 + cd bin + +### Preparing the build enviroment +Since the Raspberry Pi has only a limited amount of ram, we need to create a swap file. Without it, compiling fails when building the translations. + + sudo dd if=/dev/zero of=swapfile bs=1M count=512 + sudo mkswap swapfile + sudo swapon swapfile + +### Compile + cmake .. + make -j2 + +Wait. A (very long) time. + +### After compiling +A swap file on a flash memory is not healty, so we remove the created swap file after compiling. + + sudo swapoff swapfile + sudo rm swapfile + +### Install Clementine runtime dependencies +Raspbian doesn't have gstreamer plugins installed by default, so we have to do this now. + + sudo apt-get install gstreamer0.10-alsa gstreamer0.10-tools gstreamer0.10-ffmpeg + gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-fluendo-mp3 + gstreamer0.10-pulseaudio pulseaudio + +Set pulseaudio as default output: + + gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosink pulsesink + gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosrc pulsesrc + +This should give you a better audio quality. + +### Setting up Clementine +Start Clementine with `./clementine`. The first start takes quite long as Clementine has to setup the database. After you see the main window, you should disable moodbar generation and glowing. They take too many resources you need for playback. + +Now you can add your music to your library and listen to it! + +Note: Clementine is quite slow on the Raspberry Pi, so be patient when using it. I experienced a few stutters when playing FLAC files as well. Other formats I haven't tested yet. Clementine Remote works as well. + + +### Credits +http://sentryytech.blogspot.de/2012/10/compiling-retroshare-for-raspberry-pi.html for swap file + +http://blog.scphillips.com/2013/01/using-a-raspberry-pi-with-android-phones-for-media-streaming/ for gstreamer tips \ No newline at end of file