Syncing Music to Pandora


kaprikawn

Very Active Member
Joined
Sep 28, 2008
Messages
421
Location
UK
Website
kaprikawn.wordpress.com
I've got my music on a server in a mixture of FLAC, mp3 and AAC format. And I've got my playlists set up in the root music folder in .m3u format with relative filepaths.


Does anyone have any ideas how I can transfer (or preferably sync) this setup to my Pandora, transcoding FLAC > OGG, but leaving the mp3 and AAC as they are, and maintaining my playlists, all at the same time?


I can access it from whatever platform is best, Windows, Linux, straight from the Pandora, whichever gets the job done really. I've been googling this quite a lot, so vague 'You can do this with Foobar2000' replies won't be helpful, I need more detailed instructions than that.


Cheers
 
On Windows, you can use a free, highly customizable media player called Foobar2000, though this program will not sync to devices (at least in my experiences, there's probably an addon for that). You will also need to install 'oggenc' to be able to convert to OGG. You could filter with '%codec% IS FLAC', which would show only FLAC files, and then select all, go convert, etc.


There's probably a more user-friendly application out there, but foobar does everything I want it to.
 
For syncing my reply would be using 'rsync'. That's pretty much my one stop shop for syncing two directories (even across different boxes) and is nice since it won't copy identical files that are already on the Pandora (only copying files that changed).


For preserving the paths on your playlists, that'll require a short script. Obviously the locations of the music will be different from your server to your Pandora. But if you're familiar with Unix you can use 'sed' to find all uses of "/Music/" on your server to be "/media/SDCard/Music/".


Obviously you can script the rsync and the sed commands together (copy the files over, then modify the playlists accordingly).


As for going from Flac to Ogg, if you have the hard drive space on your server, I'd recommend just having a copy of the Ogg Vorbis files ready to go on the server. There are probably ways to script together a Flac to Ogg, then rsync the files over to your Pandora, but it would just be a hassle. Plus you wouldn't want to convert the Flac files to Ogg Vorbis on your Pandora itself; make your server do all the heavy lifting.


Let me know if you have any questions, I can probably help a bit with the scripting if that's the route you wish to take.
 
@vadsamoht


Thanks, but I've already looked at Foobar2000 quite a lot and I'm yet to come up with an appropriate solution. When you google, you tend to get some old and defunct posts. When you try some of these old posts, sometimes the component is no longer available, sometimes you get messages saying 'This module is outdated and shouldn't be used anymore'. It's very difficult sorting through the appropriate solutions.


@Mr Rob


I wanted to avoid that route. But it's looking increasing like the only way. I know how to script generally, but not in the required languages (I doubt my VB and PL SQL skills are going to help here!). But I do have to learn PERL for work so this maybe a good project to get me started.


The trouble is that I don't want to maintain two libraries. If I rip a CD in FLAC to my main library, and add it to my playlists, I don't want to then transcode it to another library and add it again to another set of playlists. Especially since the Pandora is not the only portable player I need to account for, there's a Sansa Clip+ and an Android phone I want to be served by this solution too. I've got the two libraries thing going now (but with iTunes as the second library), and I kept it up for a while, but then I got sloppy, ripping a CD then thinking 'I'll transcode to AAC and add it to iTunes later...', and now I don't know what I've transferred and what I haven't.


Obviously I can write the script to handle that, it's just going to take a while to write, especially as I have to learn it first too.


Oh well, here goes...
 
You could always just run oggenc from the command line in win/lin. Link here.


EDIT: Sorry, obviously that just solves the problem with converting your FLACs to OGG
 
Last edited by a moderator:
Ok, the script is written and is currently running, converting about 8000 flac files to ogg on an AMD Sempron 1900 CPU, I estimate it'll take about 48 hours to execute!


In the meantime I need to sort out my Pandora. I want to set up a couple of SD cards specifically for a music setup for when I want to take my music library out and about.


My entire library is going to clock in at about 35gig, and will obviously expand when I get new music. I'd like to fit that all on my Pandora without having to fart around with splitting the library to ease syncing/updates. And I can't afford a 64 gig card.


Is there any way I can have a folder that spans both SD cards to make one big volume of 48gb (one 16gb card and one 32gb)? Bare in mind that'll it'll have the OS installed on it as well, I won't be using the NAND memory, just in case that's a factor.
 
Is there any way I can have a folder that spans both SD cards to make one big volume of 48gb (one 16gb card and one 32gb)?

Theoretically, yes. There's a --bind flag to the mount command that may work if the Pandora kernel was compiled with it's support.



Code:
mount -t aufs -o dirs=/path/to/files1:/path/to/files2 none /path/to/combined


Where /path/to/files1 and /path/to/files2 are the two separate music collections (on the different SD cards), and /path/to/combined will be the directory that basically joins those two directories. A more complete writeup is here: https://bbs.archlinux.org/viewtopic.php?pid=314698


Another way to do it would be to make a RAID or LVM across the two SD cards, but we begin approaching ridiculous at that point.
 
Back
Top