Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Syncing a mobile music library
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
Dr.Willy
Guru
Guru


Joined: 15 Jul 2007
Posts: 346
Location: NRW, Germany

PostPosted: Sat Apr 27, 2013 3:32 pm    Post subject: Syncing a mobile music library Reply with quote

If you own an modern car radio you probably know the problem: You have a nicely tagged library of music files in various formats on your computer and you want to have the same music available for your car radio on some usb storage.
Now you could just use rsync to transfer the updates from your pc to that storage, but unfortunatly your radio only supports some of the formats you have. So you have to convert them, which kindof ruins the rsync approach. Additionally lossless formats would probably cost too much space on your pendrive so you'd want to convert them too.

Does anyone know a tool that kindof works like rsync but is aware of the fact that "Foofighters - SomeSong.flac" in the source directory is supposed to be "Foofighters - SomeSong.ogg" in the destination directory?
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16114
Location: Colorado

PostPosted: Sat Apr 27, 2013 5:20 pm    Post subject: Reply with quote

Why not just create the .ogg version and sync only from the .ogg tree?
_________________
lolgov. 'cause where we're going, you don't have civil liberties.

In Loving Memory
1787 - 2008
Back to top
View user's profile Send private message
wildhorse
Tux's lil' helper
Tux's lil' helper


Joined: 16 Mar 2006
Posts: 148
Location: Estados Unidos De América

PostPosted: Sat Apr 27, 2013 5:59 pm    Post subject: Reply with quote

See if there is a Fuse-based filesystem (FFS) that does the conversion on-the-fly. Then use that to upload the files to your car's computer. MP3FS might be all you need. Otherwise write your own FFS.
Back to top
View user's profile Send private message
Dr.Willy
Guru
Guru


Joined: 15 Jul 2007
Posts: 346
Location: NRW, Germany

PostPosted: Sat Apr 27, 2013 6:11 pm    Post subject: Reply with quote

pjp wrote:
Why not just create the .ogg version and sync only from the .ogg tree?

…because then I have to sync between the original and the .ogg tree.

wildhorse wrote:
See if there is a Fuse-based filesystem (FFS) that does the conversion on-the-fly. Then use that to upload the files to your car's computer. MP3FS might be all you need. Otherwise write your own FFS.

Ah, that is a cool idea. mp3 sucks, but its a great startingpoint none the less.
If you have more suggestions, I'm all ears, otherwise I'll fork mp3fs.
Back to top
View user's profile Send private message
wildhorse
Tux's lil' helper
Tux's lil' helper


Joined: 16 Mar 2006
Posts: 148
Location: Estados Unidos De América

PostPosted: Sat Apr 27, 2013 6:36 pm    Post subject: Reply with quote

MP3FS is just the first one I found when I searched for 'fuse filesystem convert'. You may find something better if you search a bit.
Back to top
View user's profile Send private message
Fran
Guru
Guru


Joined: 29 Feb 2004
Posts: 524
Location: Coruña (Spain)

PostPosted: Sat Apr 27, 2013 6:39 pm    Post subject: Reply with quote

I use flac2mp3. It was abandoned before the 0.3.0 release years ago, but there is some new activity on github.

It is smart enough to avoid encoding the same file twice (it stores a hash in the tag). You can just run "flac2mp3 flacfolder mp3folder" and only the new files/tags get encoded/updated.

If you google you'll find some ebuilds in overlays.
Back to top
View user's profile Send private message
Akkara
Administrator
Administrator


Joined: 28 Mar 2006
Posts: 5236
Location: &akkara

PostPosted: Sat Apr 27, 2013 10:17 pm    Post subject: Reply with quote

I had written something along these lines many years ago: [Script] Convert flac to (almost) anything, which might help what you're doing. It's been a while since I reviewed that post so I don't know how well it works these days, or whether it's still relevant. It's a shell-script so shouldn't be too hard to fix up if that's of interest, or to work with sources other than flac.

Basically it helps maintain a parallel directory between the master library (in flac) and any other format(s) you need. It can convert just the new and changed ones. It'll import tags as it encodes, and even has some smarts to map the relatively open-ended flac tags into more restrictive formats such as used by mp3. Run it as needed or stick it in cron and it'll maintain a mirror of the master flac library.

Also, some generic advice: have the master library owned by a user different than your main user (and not root, either). Saves a lot of headache when trying new players only to find there's some bug that mangles the tags. Easy enough to su into the other user when there's an edit you want to make, and the library keeps safe from oops other times. Of course having a backup is important too but this can save you from having to restore lots and lots of data. Make a subdirectory writeable by you to put new stuff into so you're not having to su each time you get new music, then periodically move it over.
_________________
echo 'long long long x;' | gcc -x c -c -
Back to top
View user's profile Send private message
Dr.Willy
Guru
Guru


Joined: 15 Jul 2007
Posts: 346
Location: NRW, Germany

PostPosted: Sun Apr 28, 2013 10:58 am    Post subject: Reply with quote

Akkara wrote:
Also, some generic advice: have the master library owned by a user different than your main user (and not root, either). Saves a lot of headache when trying new players only to find there's some bug that mangles the tags. Easy enough to su into the other user when there's an edit you want to make, and the library keeps safe from oops other times. Of course having a backup is important too but this can save you from having to restore lots and lots of data. Make a subdirectory writeable by you to put new stuff into so you're not having to su each time you get new music, then periodically move it over.

That is sound advice, but I moved away from these "big" music players. Nowadays I just use ranger, sltag and mplayer2.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum