Author Topic: Embedding Title, Artist, Album, etc. information in ripped music files  (Read 6684 times)

PeteK

  • Guru
  • ****
  • Posts: 408
    • View Profile
Note-- Cross posted in the developer's forum

Hey everyone--
I was kind of annoyed that when LinuxMCE ripped CDs, it wouldn't embed any information on the title, album, etc in the files themselves, instead using the .id3 files in the directories and the database.  That's great for LinuxMCE, but if I'm going to rip all my CDs, I want to have the information in the files themselves for flexibility.

I was able to get LinuxMCE to embed Artist/Album/Track/Genre/Date information into the music files when ripping a CD.  You can now see the information on the Squeezebox when playing back ripped files from the core.  After digging around inside LinuxMCE, I've modified the shell file that performs the ripping.

So far I've got it working for the Ogg and Flac encoders.  I hope to get it working for WAV and MP3 files shortly.

I'd appreciate it if anyone was interested in trying it out and letting me know how it works for them.  I'm not a scripting expert by any means, so any input would be appreciated.  I don't think this is the ideal solution, as it requires another CDDB lookup in addition to the one perfomed by UpdateMedia, but it works for now while I try to understand exactly the process the Pluto gang put in place for ripping a CD.  I hope to move on to getting Pluto to work with a more modern (6.5.x) version of Slimserver next.

The attached file goes in your /usr/pluto/bin directory.  Please remember to save the existing ripDiskWrapper.sh to a different name first, so you can go back if it gets screwy.

Thanks everyone,
-PeteK

norcal

  • Regular Poster
  • **
  • Posts: 38
    • View Profile
Nice, i will have to check that out later. Thanks for the hard work. Cheers.

PeteK

  • Guru
  • ****
  • Posts: 408
    • View Profile
Hmm.  After playing with ripping to .mp3, it looks like LinuxMCE is
writing the id3 tags in the MP3 files. My script modifications write Title,
Artist, Album, Year, Track Number and Genre information.  LinuxMCE by default
writes Title, Artist, Album and Composer information, but doesn't
include Track Number or Genre information, which I think are worth
having. 

Incidentally, the ripping script doesn't use the quality settings for
MP3 or Ogg rips.  I don't know if a Mantis report has been filed, but
I'm guessing it was on the Pluto guy's todo list. I recommend ripping to Flac (no options) until that gets fixed.  That way you know what you're getting.

In any case, the script should now work correctly for MP3, FLAC, and Ogg rips.  Again, paste the
included ripDiskWrapper.sh in your /pluto/bin directory.  Save your
existing copy.

Also, make sure you set the execute permissions correctly. If you
don't know what I'm talking about, after copying type chmod a+x
ripDiskWrapper.sh Please let me know if you have any issues.

On another note, Lame wasn't installed by default, so ripping to MP3
failed outright initially. I'm surprised it wasn't installed by default by
LinuxMCE.  Can anyone else confirm this?

Ender

  • Regular Poster
  • **
  • Posts: 19
    • View Profile
Hi,

UpdateMedia is writting the id3 tags in mp3, ogg, aac files (the code is svn: src/UpdateMedia/PlutoMediaFile.cpp) using libid3. The list with supported formats is hardcoded to these three extensions, but if there are any other file supporting them, I think we'll only need to added them to the supported formats list. Does libid3 work with FLAC files or it's using other id3 tags format ?

Ender

PeteK

  • Guru
  • ****
  • Posts: 408
    • View Profile
When I was testing the system, I wasn't getting tags in ogg files. FLAC files use Vorbis comments (like ogg), so ogg tagging is supported, there's a good chance FLAC will work out of the box.  Were you able to verify tagging of ogg files? 

Ender

  • Regular Poster
  • **
  • Posts: 19
    • View Profile
I'll do a quick test today and let you know.

Ender

  • Regular Poster
  • **
  • Posts: 19
    • View Profile
I've ripped few tracks, but my cd wasn't identified for some reason, so no attributes were added to ogg files. But then I went in pluto-admin to mediasync section and added an attribute to one of the track and I saw that UpdateMedia was notified and the attribute was added to ogg file :

dcerouter_21656:/home/public/data/audio/Sum 41/All Killer No Filler# id3 -l "Track 1.ogg"
Track 1.ogg:
Title  : Mumu was here                Artist:
Album  :                                    Year:     , Genre: Unknown (255)
Comment:                                 Track: 0

So I guess it will be ok if we'll add flac files to the list with supported files and make updatemedia write tags with attributes in flac file too?

Ender