getting tags from m4a

Jared Shapiro jared at sonicboommedia.com
Fri Nov 12 18:08:52 CET 2010


I am integrating tablib with a ruby/rails project on linux.
Getting metadata from mp3 files works fine from the ruby shell but I can't get m4a files to work. Taglib works fine with these m4a files in a c++ project on windows.

Here’s the outputs:

irb(main):014:0> mp3 = TagLib::FileRef.new('Fergie Clumsy.mp3')
=> #<TagLib::FileRef:0x2aaaac5509e8>
irb(main):015:0> mp3.tag
=> #<TagLib::Tag:0x2aaaac54dd10>
irb(main):016:0> mp3.tag.artist
=> "Fergie"
irb(main):017:0> m4a = TagLib::FileRef.new('03 Katy Song.m4a')
=> #<TagLib::FileRef:0x2aaaac544328>
irb(main):018:0> m4a.tag
TagLib: FileRef::tag() - Called without a valid file.
=> nil

irb(main):020:0> tag=TagFile::File.new('03 Katy Song.m4a')
TagFile::BadFile: Bad file
        from (irb):20:in `new'
        from (irb):20
        from :0
irb(main):021:0> tag=TagFile::File.new('Fergie Clumsy.mp3')
=> #<TagFile::File:0x2aaaac532380>
irb(main):022:0> tag.title
=> "Clumsy"

any ideas?

Thanks

Jared


More information about the taglib-devel mailing list