Replacing Google Music

I've been using Google Music for years...I spent about a week while in Glenrosa ripping and uploading all my CD's across about 4 PC's, having all the CD drives whirring full-time, and I have/had a gloriously curated ~6,000 song/50Gb library of music. I've made a lot of use of the hybrid downloaded/streamed data model on my phone (I spend a fair bit of time out of network connectivity...be it holidays or cycling in the middle of nowhere).

Google are now jumping on the "paid services for everything" bandwagon, including shutting down Google Music and transferring everything to YouTube Music...which is not really very good. The main kicker for me is that downloading music to your device is only available in the Premium subscription (£9.99 a month, or ~£120/year). Off-ski fuck-ski they can with that. In the short-term I've moved over to Pulsar, which is an ad-free off-line mp3 player for Android...however the only-offline bit is a bit annoying unless I want to upload the entire library (and as Pixel phones don't have expandable storage, a 50Gb library is approximately half of the available device storage).

So, after a bit of reading, and with literally no prior experience, I'm going to try and do my own in-house media server. The fairly high cost of YouTube Music means I can purchase hardware, purchase one-off licenses (to a limit) and still be up on the deal in very short order.

Aims

  • Subscription-free access to existing music catalogue on phone (no interest in streaming services)
  • Hybrid online/offline - selected tracks/playlists offline, entire music online (current Google Music functionality)
  • Only interested in Audio (no interest in video/film/tv services...primary use case is cycling)
  • Keep total solution cost under £120 (or 1 year of YouTube Premium, which is what I'm trying to replace)

Current Solution Options

Option 1

This seems the most common solution. Main challenge would be that I have zero experience with Linux or Raspberry-pi...or anyhting even vaguely similar. From some reading, I would probably also want it headless (aka controlled from my main machine). I have a 128Gb Micro-SD card that can be used as both OS install and library storage. Hardware cost is ~£60 (4Gb model is recommended...2Gb version would work, but very close to the wire), including a case.

For the PlexAmp app, I'm pretty sure that I would need to pay for a "PlexPass" license, and to avoid monthly/year subscriptions, that would be just shy of £100, putting me slightly over budget.

Option 2

A slightly-less mainstream solution, this doesn't seem to offer a music-specific Android client, however activation costs for the cleint are approximately £5, so significantly cheaper than Plex. Server hardware costs are pretty much the same. I haven't seen any implicit confirmation that the Android client supports offline play (PlexAmp definitely does).

It seems that a pi-based solution is certainly the best way of going about this, however I've so far found even basic setup guides to be a tad confusing (even moreso when you look at headless setup...pretty much every "beginners guide" has some assumption of prior command-line experience...and when you consider that my only assocaition with the word "sudo" is "make me a sandwich" you hopefully get an idea of where I'm starting from here).

The "ideal" for both would be that the Pi would be plugged directly into the router downstairs, and then I somehow (probably something to do with static IP addresses and doing something complex on the router software that I might have once done years ago when I had the Minecraft server sat on my desk) have the client able to stream directly from that from outside the network.

I think Step 1 is ordering the Raspberry Pi and seeing if I can get it running and accessible from my laptop.

Comments

So it's all going rather well. For some reason the standard shipping from The Pi Hut was done as next day delivery. The Pi turned up just before lunch. This morning I'd gone through the steps on Toms Hardware on how to create a MicroSD Headless Raspberry Pi OS install, including the wifi option.

I hit a bit of a hurdle getting VNC working, as it's true headless I needed to start a virtual desktop session, using notes from Real VNC's own site. I've now installed Plex, following instructions from PiMyLifeUp, and now copying my music to a 64Gb USB Stick (I've gone away from just using a large SD card for everything...probably easier to just use an old USB stick , as it's more portable if I want to mass add anything, rather than send it via network/VNC).

I've gone down the Plex route rather than Emby as it turns out the "download to device" option is a premium feature in Emby, which costs ~£90 for a license...thus making it more expensive than Plex.

I think I'll need to mount the USB Stick (it's using NTFS file structure, so already set that up on the Raspberry), and then tell Plex to index that file location.

//edit - so file permissions are a complete ball-ache, and there are 2 groups on the internet.
Group 1 will tell you "set Plex to run under the "pi" default user, it's simple"
Group 2 will tell you "NOOOOO! Do this very complex process around un-mounting, setting up a file location, mount the drive to that location, then do an obscure text edit to re-mount on reboot" and then send you to a tutorial which is over 5 OTHER tutorials which are all equally linked.

I was totally for option 1, but the config file telling Plex which user to run has been moved, and the Group 2 brigade are also all server managers, and seem to have deleted all the posts telling you where to do Option 1. And you wonder why Linux has never gone mainstream...

babychaos's picture

And streaming to phone (in network). The Pi's CPU maxes out (passive cooling only) when you swap tracks, but no issues on playback (and thats still on wireless).

My music library structure has not been picked up, looks like I'll need to folderise it, which is a bit of a pain.

babychaos's picture

Looking pretty swish! I'd like to congratulate you on buying a Pi and then actually using it. I'm willing to bet many Pis gets bought and then gather dust. I've been following this concept keenly to help reduce costs although the family loves streaming whatever it fancies and that isn't going away for us.

brainwipe's picture

It's actually been quite an enjoyable little project...the "hard" bits were completely not where I was expecting.

Easy - Installing the OS and connecting remotely (via SSH and VNC)
Easy - Installing Plex and the various other packages
Fiddly - Getting VNC working on a completely headless setup (most guides assumed a monitor was plugged in)
Stupidly Hard - getting a USB stick working as storage
Easy - Linking a client to the server (so far only in-network, not yet done the Port Forwarding setup for external access)
Tedious - re-structuring my mp3 collection into a suitable format (all the in-file metatags were set, but Plex favours file named file structures)

I ended up spending a good hour with Picard de-duping files, and getting the file structure sorted. Then I had to re-mount the bloody USB drive (formatting changed the UUID)...finally the Pi spent about an hour indexing and analysis all the tracks correctly.

The Pi is getting rather warm, so I'm going to get a heatsink case (basically a lump of metal that acts as a big passive heatsink, including thermal pads that fit to the CPU and other key areas), and then move it to it's final home plugged into the router via a cat-lead. That will probably change it's IP addresss, so once that is settled I'll do the port forwarding and see if I can access it from out-of-network. Once that is sorted I'm done I think, it's just stumping up for the PlexPass license, installing PlexAmp and sorting out Playlists.

babychaos's picture

I find a lot of good tutorials for raspberry pi on the adafruit learning site

https://learn.adafruit.com/

Although they obviously are more on the project side of things than the media server aspect

Evilmatt's picture

I can't see myself waving a soldering iron around really. I recently replaced the motor in the auto-cat-flap downstairs (soldering 2 wires onto motor contacts), and considered that a huge acvievement.

I did spend some time looking at a security system based on Raspberry Pi Zero's a while ago (mainly for the garage, as there is a fair chunk of expensive gear in there...the insurance for my bikes is higher than the home insurance). Now I have a slightly better understanding of how they work, and I have one I can muck around with on the network, I might re-visit that. I think at a high level it would be Pi-Zero's with a camera module and PoE (I think you can do both) as that wold be simpler than running USB power cables everywhere.

babychaos's picture

While I said I wasn't interested in Video, the music stuff has gone so well I thought I'd try a little bonus action. I've had (for years now) the old HDD's from the Glenrosa/Highmead/Fishcon with a bunch of DVD rips...obviously all quite low res, but more than good enough for viewing on a phone or small screen. I also have an IDE/SATA -> USB connector with a power adaptor, so I can (if required) still access them.

Overnight I took ~50 of these, and converted them to MKV/AAC (recommended format to avoid any on-the-fly transcoding, which the Pi really can't do...slight increase to file size, but given you're not aiming at 770Mb), popped them on another USB stick (I have plenty lying around), and then went through the rigamarole of mounting that on the Pi, before getting Plex to index it (it also pulls in loads of metadata, cover art etc)...

...and it streams (wifi-to-wifi at the mo) really well. Playback starts immediately, and you can jump around with virtually no lag. Looks fine on a phone screen (I doubt that casting it to a big screen would be so flattering, but I'll definitely try it).

I now have the Zwift PC transcoding the others (my poor laptop did not enjoy the night), and I'll stick them on (remembering not to re-format the USB Stick this time, thus changing it's UUID).

babychaos's picture

....and end of the weekend project. I was fairly apprehensive going in, but it's all gone very well. Most of my time has been spent re-organising media rather than fiddling too much with the hardware.

I now have the Pi plugged directly into the Router downstairs via ethernet, with 2 USB Sticks wedged in it (one with my music library, and the other with ~100 films in .mkv format, with space for another ~30). It's confirmed accessible outside of the home network (by using my phone on 4G), and capable of streaming both music and video.

  • Subscription-free access to existing music catalogue on phone - Done
  • Hybrid online/offline - selected tracks/playlists offline, entire music online - not done, requires PlexPass purchase
  • Only interested in Audio - Done, with bonus video library
  • Keep total solution cost under £120 - hmmm.....

So I'm probably going to be over on cost once I get the PlexPass. Current costs are;

  • Raspberry Pi 4B - £54.00
  • Plastic Case - £5.00
  • Shipping - £2.99
  • Metal "heatsink" case - £14.00
  • 2 USB Sticks (1 x 64Gb, 1 x 128Gb) - free (spares)
  • USB Charger and cable - free (old phone "fast charger")
  • 16Gb Micro-SD Card - free (spares)
  • Android App activation - £3

So currently £78.99. A lifetime PlexPass is £94, which would put me on £172.99 (or just over 17 months of Youtube Music Premium, which is the benchmark to price against). I'm going to wait on Black Friday, as apparently they sometimes do sales, but unless it's massive (it won't be...25% discount is considered huge) I won't get under £120. I could have saved a bit (~£3 on the Pi and £3 on shipping, and I could have done without the original £5 case).

I can definitely see myself doing a Pi-based exercise again, especially as I now have one to try stuff on before committing any more money. I still find the entire terminal-based operations a bit weird, and a lot of the instructions I'm just cut/pasting (I get the basics, but knowing which additional operators to use with the -a, -I and the like) feels very random. I'll also re-iterate that mounting a drive should not take 10 minutes and copying down unique codes.

babychaos's picture

So I'm quite enjoying having a random PC on the network to try stuff on, even if it does involve a lot of Googling to try and get anything to work. The media library project has grown arms and legs (currently ripping all the DVD's in the house on the one remaining laptop with a DVD drive...a project that reminds me of the week I spent ripping CD's years ago), and (given the recent news about Google Photos also being a far more limited service) looking at a more long-term general storage solution before I get too dependant on "free" services that can be suddenly taken away.

...however tonights fun was getting GeForce Now running on the Pi. This is the benchmark result in Tomb Raider running at max settings at 1080p.

babychaos's picture

Cool! I really don't have a need for a Pi in the home as we're streaming everything but this certainly does look cool.

brainwipe's picture