Skip to main content

Topic: how does foobar handle metadata/tags ? (Read 1619 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • cpaqf1
  • [*]
how does foobar handle metadata/tags ?
Hi,

I've got a pretty massive music library and I decided I'd be interested in using Replay gain. Thing is I never ripped my music with the track volume entry which means I'd have to scan my whole library, which is fine with me. Thing is, I sometimes got the feeling that when modifying a track name, or album title, or artist name, it would rewrite the file instead of modifying the info which caused fragmentation. So, my question is how does foobar handle this stuff, does it only add it or does it erase and recopy/rewrite the file on the hard drive ? I wouldn't want my whole library fragmented because I added replaygain values..

My library is in flac if that makes a difference

thanks

  • Case
  • [*][*][*][*][*]
  • Developer (Donating)
how does foobar handle metadata/tags ?
Reply #1
If your FLAC files have enough padding for the metadata then they are modified in place. This is fast and doesn't cause any fragmentation or unnecessary disk writes. If they do not have the required space for the tags then foobar will have to re-create the files. This is done by writing the required headers and metadata+padding blocks into new temporary files followed by copying the encoded audio data from the original files into the temp files. Upon success the original files are destroyed and the temp files are renamed to replace them. The rewrite method currently does not utilize any methods to prevent fragmentation.
If your files are encoded with the official FLAC encoder with default settings they will have at least 8192 bytes of padding. This is enough to store regular text metadata but not for album art.

  • Porcus
  • [*][*][*][*][*]
how does foobar handle metadata/tags ?
Reply #2
Upon success

... how does it verify, BTW?

I have not yet had any issues where fb2k has left tmp files though. (mp3tag sometimes does, when it encounters issues.)



When it comes to fragmentation: Is that really anything to worry about for audio? CD quality files do not require much more than 1411 on average, and I'd be surprised if fragmentation would be any nuissance except maybe with batch processing on a near-full drive.  (Would it even be an issue on video files? In the very least, what if one uses a defragger and sorts by fragmentation, taking out those few files which are worse than [insert number]?)
  • Last Edit: 09 March, 2013, 04:30:43 PM by Porcus

  • Case
  • [*][*][*][*][*]
  • Developer (Donating)
how does foobar handle metadata/tags ?
Reply #3
Checking is simple: WriteFile function returns error or writes less bytes than it should. If this happens the temp file creation is aborted, the file is removed and the user is shown an error message that tagging failed.
Fragmentation doesn't of course cause playback to slow down enough to cause glitches. But it does affect transcoding and replaygain scanning speeds.

  • cpaqf1
  • [*]
how does foobar handle metadata/tags ?
Reply #4
Checking is simple: WriteFile function returns error or writes less bytes than it should. If this happens the temp file creation is aborted, the file is removed and the user is shown an error message that tagging failed.
Fragmentation doesn't of course cause playback to slow down enough to cause glitches. But it does affect transcoding and replaygain scanning speeds.



awesome, thanks a lot