Skip to main content

Topic: Euphonos Metadata Importer Test... (Read 6971 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • Dibrom
  • [*][*][*][*][*]
  • Administrator
Euphonos Metadata Importer Test...
I've made an initial version of the spotlight importer for my upcoming audio player for OS X, which I mentioned earlier this week here.

Download the importer here.

So far, the importer is setup to recognize files of type:

- FLAC
- APE
- Musepack
- Ogg (as a container)
- OptimFROG
- Speex
- Wavpack

I could easily make it recognize others as well, these were just some I could think of at the moment.  It will read id3v1, id3v2, apev2, and vorbis comments, as well as some internal format properties, to extract information about the files and add them to the spotlight metadata database.  Note that I have only tested the importer on Ogg Vorbis and MPC files, so I'm not 100% certain the importer will grab the tags from the other file types even though it has the capability to do so.

Right now, I've only made it add metadata for the values that Apple already fills in for mp4 and mp3 files, but in later versions I will make the information set much more complete.  The metadata that it currently imports is:

- bitrate
- channel count
- duration in seconds
- media type
- album
- tracknumber
- artist
- genre
- title
- codec type

It would be nice if I could get some people to help test and provide feedback.  To use the importer, download the file, extract the importer, and copy it to the ~/Library/Spotlight directory.  You may need to make the directory if it doesn't already exist.  This will only add support for your current user so if you want it system wide, put it in /Library/Spotlight instead.

After this, to get the metadata to show up, you will need to reimport the files into the spotlight database (all files modified in the future will automatically be imported).  To do this, you can either modify the file somehow (touch might do the trick), or you can use mdimport.  To reimport a single file, just type "mdimport somefile" at the terminal.  You can also have it check the entire file system for reimportation (best if you have tons of files you'd like to do this for) by typing "sudo mdimport /" at the terminal and typing in your password.

You can test to see if the metadata has been imported either by typing "mdls somefilename" at the terminal, or by making some sort of smart folder that filters via one of the metadata properties for audio files.

Although there should be no problems I can see with this importer, use it at your own risk  I suggest making a backup of files you are testing the import on if you are super paranoid.

Anyway, I will be releasing updates in the near future along with source code.  Once this importer is more solid, it will serve as the foundation for Euphonos metadata reading.

Oh, one final thing, it would be nice if someone wanted to make OS X icons for the different file types so that the importer would actually show them up as something other than a blank document in Finder
  • Last Edit: 10 June, 2005, 04:23:05 AM by Dibrom

  • irchs
  • [*]
Euphonos Metadata Importer Test...
Reply #1
Hey there, this thing is very nice

Here is my debug data for some an Ogg file I tested it on:

Code: [Select]
/*THIS IS BEFORE I RAN THE IMPORTER*/

LITTLETOE:~/Desktop jan$ mdls Queens\ Of\ The\ Stone\ Age\ -\ Lullabies\ To\ Paralyze\ -\ 02\ -\ Medication.ogg
Queens Of The Stone Age - Lullabies To Paralyze - 02 - Medication.ogg -------------
kMDItemAttributeChangeDate = 333003-05-12 23:41:03 +0000
kMDItemFSContentChangeDate = 2005-04-02 19:54:52 +0100
kMDItemFSCreationDate      = 2005-04-02 19:54:52 +0100
kMDItemFSCreatorCode       = 0
kMDItemFSFinderFlags       = 0
kMDItemFSInvisible         = 0
kMDItemFSLabel             = 0
kMDItemFSName              = "Queens Of The Stone Age - Lullabies To Paralyze - 02 - Medication.ogg"
kMDItemFSNodeCount         = 0
kMDItemFSOwnerGroupID      = 501
kMDItemFSOwnerUserID       = 501
kMDItemFSSize              = 6887073
kMDItemFSTypeCode          = 0
kMDItemID                  = 1058512
kMDItemLastUsedDate        = 2005-04-02 18:54:52 +0100
kMDItemUsedDates           = (2005-04-02 18:54:52 +0100)

/*RUNNING THE IMPORTER*/

LITTLETOE:~/Desktop jan$ mdimport Queens\ Of\ The\ Stone\ Age\ -\ Lullabies\ To\ Paralyze\ -\ 02\ -\ Medication.ogg

/*CHECKING IT IMPORTED FINE*/

LITTLETOE:~/Desktop jan$ mdls Queens\ Of\ The\ Stone\ Age\ -\ Lullabies\ To\ Paralyze\ -\ 02\ -\ Medication.ogg
Queens Of The Stone Age - Lullabies To Paralyze - 02 - Medication.ogg -------------
kMDItemAlbum                   = "Lullabies To Paralyze"
kMDItemAttributeChangeDate     = 2005-06-11 15:38:56 +0100
kMDItemAudioBitRate            = 500
kMDItemAudioChannelCount       = 2
kMDItemAudioTrackNumber        = 2
kMDItemAuthors                 = ("Queens Of The Stone Age")
kMDItemContentCreationDate     = 1904-01-01 00:00:00 +0000
kMDItemContentModificationDate = 2005-04-02 19:54:52 +0100
kMDItemContentType             = "org.xiph.ogg"
kMDItemContentTypeTree         = (
    "org.xiph.ogg",
    "public.audiovisual-content",
    "public.data",
    "public.item",
    "public.content"
)
kMDItemDisplayName             = "Queens Of The Stone Age - Lullabies To Paralyze - 02 - Medication.ogg"
kMDItemDurationSeconds         = 114
kMDItemFSContentChangeDate     = 2005-04-02 19:54:52 +0100
kMDItemFSCreationDate          = 2005-04-02 19:54:52 +0100
kMDItemFSCreatorCode           = 0
kMDItemFSFinderFlags           = 0
kMDItemFSInvisible             = 0
kMDItemFSLabel                 = 0
kMDItemFSName                  = "Queens Of The Stone Age - Lullabies To Paralyze - 02 - Medication.ogg"
kMDItemFSNodeCount             = 0
kMDItemFSOwnerGroupID          = 501
kMDItemFSOwnerUserID           = 501
kMDItemFSSize                  = 6887073
kMDItemFSTypeCode              = 0
kMDItemID                      = 1058512
kMDItemKind                    = "Ogg Media File"
kMDItemLastUsedDate            = 2005-04-02 19:54:52 +0100
kMDItemMediaTypes              = (Sound)
kMDItemMusicalGenre            = "Rock"
kMDItemTitle                   = "Medication"
kMDItemTotalBitRate            = 500
kMDItemUsedDates               = (2005-04-02 19:54:52 +0100)


Working fine on my other Ogg files too, and the data shows up lovely in Spotlights main interface.

Do you have a website for testing this stuff, cause I would love to help out, maybe even code a little for you.  I want to start work on a OggVorbis CoreAudio codec after my exams.  This may be of use to your Euphonos Player, and it would be super seksy if it was distributed with your player

Thanks

Jan
  • Last Edit: 12 June, 2005, 01:33:47 PM by Dibrom

  • Dibrom
  • [*][*][*][*][*]
  • Administrator
Euphonos Metadata Importer Test...
Reply #2
Quote
Hey there, this thing is very nice


Thanks.  And I appreciate the feedback

Quote
Do you have a website for testing this stuff, cause I would love to help out, maybe even code a little for you.  I want to start work on a OggVorbis CoreAudio codec after my exams.  This may be of use to your Euphonos Player, and it would be super seksy if it was distributed with your player

Thanks

Jan
[a href="index.php?act=findpost&pid=305309"][{POST_SNAPBACK}][/a]


I don't have a website setup for it yet, but I probably will put something online in a few days.  I will be releasing an updated version of this importer later today that is significantly improved.  Not only do I add metadata for quite a few of the other apple provided fields now, but I've also added custom fields, and I even have a field setup that holds an array of strings (I'd use a dictionary, but that type isn't supported for the custom metadata schemas unfortunately) containing all xiphcomments or ape tags, so that all the tags are searchable according to their standard name in the spec even if there is no standard spotlight field for them.

Another difference in the new version is that I've added better codec detection for .ogg container files now so that the importer can determine whether the codec is vorbis, flac, speex, theora, or a dozen other formats that people have used.

As for help, that could certainly be useful.  I'll see what I can get setup for collaboration here soon.  Also, it would be quite nice to have a coreaudio vorbis decoder, and if it worked well, it'd certainly be nice to include something like that in the player bundle
  • Last Edit: 11 June, 2005, 09:04:36 PM by Dibrom

  • _Prelude_
  • [*]
  • Banned
Euphonos Metadata Importer Test...
Reply #3
Hmmmm... very cool idea. A player for Mac like foobar2000..
I don't have a Mac, but my old brother and some friends that use Mac computers for audio would be very interested with this player, and they could recommend it.

  • Dibrom
  • [*][*][*][*][*]
  • Administrator
Euphonos Metadata Importer Test...
Reply #4
I was planning on releasing a revision of this importer earlier tonight, but I think I might hold off for a few days to polish up some of the rough edges and improve handling of other formats I haven't tested as much with yet.

Anyway, here's a preview of what the latest version is looking like with MPC:

Code: [Select]
07-Open Car.mpc -------------
com_euphonos_apeTags                = (
   "ALBUM=Deadwing",
   "ARTIST=Porcupine Tree",
   "TITLE=Open Car",
   "TRACK=7",
   "YEAR=2005"
)
kMDItemAlbum                        = "Deadwing"
kMDItemAttributeChangeDate          = 2005-06-12 02:31:52 -0700
kMDItemAudioBitRate                 = 239
kMDItemAudioChannelCount            = 2
kMDItemAudioSampleRate              = 44100
kMDItemAudioTrackNumber             = 7
kMDItemAuthors                      = ("Porcupine Tree")
kMDItemCodecs                       = (Musepack)
kMDItemContentCreationDate          = 2005-06-09 00:00:59 -0700
kMDItemContentModificationDate      = 2005-06-09 00:06:31 -0700
kMDItemContentType                  = "net.musepack.musepack"
kMDItemContentTypeTree              = (
   "net.musepack.musepack",
   "public.audio",
   "public.audiovisual-content",
   "public.data",
   "public.item",
   "public.content"
)
kMDItemDisplayName                  = "07-Open Car.mpc"
kMDItemDurationSeconds              = 227
kMDItemFSContentChangeDate          = 2005-06-09 00:06:31 -0700
kMDItemFSCreationDate               = 2005-06-09 00:00:59 -0700
kMDItemFSCreatorCode                = 0
kMDItemFSFinderFlags                = 0
kMDItemFSInvisible                  = 0
kMDItemFSLabel                      = 0
kMDItemFSName                       = "07-Open Car.mpc"
kMDItemFSNodeCount                  = 0
kMDItemFSOwnerGroupID               = 501
kMDItemFSOwnerUserID                = 501
kMDItemFSSize                       = 6790049
kMDItemFSTypeCode                   = 0
kMDItemID                           = 985676
kMDItemKind                         = "Musepack Audio File"
kMDItemLastUsedDate                 = 2005-06-09 00:06:31 -0700
kMDItemMediaTypes                   = (Sound)
kMDItemMusicalGenre                 = ""
kMDItemProfileName                  = "Insane"
kMDItemRecordingYear                = 2005
kMDItemTitle                        = "Open Car"
kMDItemTotalBitRate                 = 239
kMDItemUsedDates                    = (2005-06-09 00:06:31 -0700)
net_musepack_musepack_streamVersion = 7
  • Last Edit: 12 June, 2005, 05:53:23 AM by Dibrom

  • irchs
  • [*]
Euphonos Metadata Importer Test...
Reply #5
Groovy beans, btw, if you need a good mirror, I will be glad to give you some webspace with unlimited bandwidth  I own monkeydev.org too if you need a website  It is located in the US, San Francisco  My MSN is chs@phucknut.net.

I shall check this thread periodically to give your importer some testing.  Also, any chance of some source code?!

Thanks

Jan
  • Last Edit: 12 June, 2005, 11:06:54 AM by irchs

  • lh_sabre
  • [*][*]
Euphonos Metadata Importer Test...
Reply #6
I say take your time with this plug-in--it'll be far more useful for most of us when we have a good player that can actually support all these great codecs .

  • gordo
  • [*]
Euphonos Metadata Importer Test...
Reply #7
Works with flac:

Soundtrack/Ry Cooder/Paris, Texas/01 - Ry Cooder , Paris, Texas.flac -------------
kMDItemAlbum                  = "Paris, Texas"
kMDItemAttributeChangeDate    = 2005-07-08 15:30:30 -0400
kMDItemAudioBitRate            = 671
kMDItemAudioChannelCount      = 2
kMDItemAudioTrackNumber        = 1
kMDItemAuthors                = ("Ry Cooder")
kMDItemCodecs                  = (FLAC)
kMDItemContentCreationDate    = 2004-08-19 07:22:04 -0400
kMDItemContentModificationDate = 2004-08-19 07:22:04 -0400
kMDItemContentType            = "org.xiph.flac"
kMDItemContentTypeTree        = (
    "org.xiph.flac",
    "public.audio",
    "public.audiovisual-content",
    "public.data",
    "public.item",
    "public.content"
)
kMDItemDisplayName            = "01 - Ry Cooder , Paris, Texas.flac"
kMDItemDurationSeconds        = 177
kMDItemFSContentChangeDate    = 2004-08-19 07:22:04 -0400
kMDItemFSCreationDate          = 2004-08-19 07:22:04 -0400
kMDItemFSCreatorCode          = 0
kMDItemFSFinderFlags          = 0
kMDItemFSInvisible            = 0
kMDItemFSLabel                = 0
kMDItemFSName                  = "01 - Ry Cooder , Paris, Texas.flac"
kMDItemFSNodeCount            = 0
kMDItemFSOwnerGroupID          = 501
kMDItemFSOwnerUserID          = 501
kMDItemFSSize                  = 14852587
kMDItemFSTypeCode              = 0
kMDItemID                      = 1942022
kMDItemKind                    = "FLAC Audio File"
kMDItemLastUsedDate            = 2004-08-19 07:22:04 -0400
kMDItemMediaTypes              = (Sound)
kMDItemMusicalGenre            = "Soundtrack"
kMDItemTitle                  = "Ry Cooder / Paris, Texas"
kMDItemTotalBitRate            = 671
kMDItemUsedDates              = (2004-08-19 07:22:04 -0400)

Euphonos Metadata Importer Test...
Reply #8
Hi. Can't download...

404 - Not Found
Go for Ogg

--------------------

It's Fast, Free, Open and has all stuffs that you need.

  • jarsonic
  • [*][*][*]
Euphonos Metadata Importer Test...
Reply #9
Hi. Can't download...

404 - Not Found


See here; seems the Euphonos project is on hold for now.

http://www.hydrogenaudio.org/forums/index....ndpost&p=393530
  • Last Edit: 21 June, 2006, 03:11:58 PM by jarsonic

Euphonos Metadata Importer Test...
Reply #10