LWN.net Logo

Advertisement

Interested in hardware, diags, validation, Linux, C, ARM, Microcode and low level programming and blazing networks?

Advertise here

File date order

File date order

Posted Jan 9, 2007 18:37 UTC (Tue) by Lockjaw (guest, #4611)
In reply to: File date order by nix
Parent article: Review: Exaile Media Player (Linux.com)

After a recent update on my Debian Etch machine, the grip -> cdparanoia -> flac chain started producing files that the "file" command detects as mp3's. oggenc (flac for home system, ogg vorbis for ipod) would claim they weren't the right format for encoding. They appear to be valid, but unusually crafted flac files. Careful searching will show patches to file's "magic" so that these are properly detected as flacs.

Running flac by hand on the wav files left over from grip and then using metaflac to copy the tags from the "mp3" flacs produced a usable product. Next time I have a big pile of cd's to rip I'll try and track down the exact problem - I caught the flac command spawned by grip to create the flacs, and when I type it in on the command line it does just fine - and I only have the one version of flac installed on my machine. I suspect something is going on with the character encoding used by grip.

metaflac --export-tags-to=- detects_as_mp3.flac | metaflac --import-tags-from=- hand_crafted.flac

will do the tag copy for you.


(Log in to post comments)

File date order

Posted Jan 10, 2007 1:11 UTC (Wed) by piman (subscriber, #8957) [Link]

This is all way simpler than you're making it. :) The FLAC files just have ID3 data prepended to them. That makes them corrupted files, but many FLAC decoders can still read them, because many broken encoders write them, because many FLAC decoders read them, etc.

File date order

Posted Jan 10, 2007 17:59 UTC (Wed) by Lockjaw (guest, #4611) [Link]

Yep - the "broken" flacs worked on my Sonos system (and maybe one of xmms and xine, although I don't remember exactly), but I couldn't convert them to ogg vorbis with oggenc.

Still, you must admit some there's strange voodoo going on with grip creating them broken, and everything working just fine when I cut and paste the "flac" command I catch from grip using "ps" during the encoding. If it's really ID3 prepended that's the problem, then grip must be using a different library for the encoding even though it's executing the same flac command. Hmmm...

In any case, I can't have broken files, so they have to be fixed somehow. I'm rather addicted to the grip workflow after doing 600 discs with it, so next time I need to do a bunch I'll have to at least automate the repair with a script (or go back to the version of grip that worked when I did the 600...).

BTW - while I'm on the subject of being over-the-top with getting correct rips, let me put in a plug for using secure-cdparanoia.py. It's a python script that runs cdparanoia repeatedly on each disc, checking to make sure they read the same each time (or at least letting you know if they don't); I was surprised by how many don't. Also, plextor drives are worth the extra money. There's no better way to be convinced of this than ripping 600 discs a second time because of too many audible pops in the first set.

File date order

Posted Jan 11, 2007 4:32 UTC (Thu) by piman (subscriber, #8957) [Link]

In the Grip Config/ID3 panel there is a checkbox "Only tag files ending in .mp3". Turn this on and the problem should go away. It encodes to FLAC using the command line and then does the tagging itself.

File date order

Posted Jan 11, 2007 17:18 UTC (Thu) by Lockjaw (guest, #4611) [Link]

Thanks - makes perfect sense. The grip upgrade caused problems with my .grip config, and it must have gotten switched somewhere along the line. I'm sure I went too fast reconstructing it and thought "of course I want the tags", not thinking of the difference between tags and comments.

Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds