Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: errors adding Replay Gain metadata to flac files (Read 3319 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

errors adding Replay Gain metadata to flac files

I was recently trying to add replay gain metadata to about 12,000 flac files.  The files were all ripped by me using CD-DA Extractor.  About half the files completed the replay gain scan successfully, but 6500 tracks failed the scan with the message "could not instantiate R128 object".  could someone point me to where this error message is documented, or interpret it?  thanks.

errors adding Replay Gain metadata to flac files

Reply #1
I was recently trying to add replay gain metadata to about 12,000 flac files.  The files were all ripped by me using CD-DA Extractor.  About half the files completed the replay gain scan successfully, but 6500 tracks failed the scan with the message "could not instantiate R128 object".  could someone point me to where this error message is documented, or interpret it?  thanks.


additional key information I forgot to include: the first 5498 tracks all succeeded in the scan: the remaining 6550 all failed.  This would suggest the program ran out of resources, hit a buffer limit, or something similar....

errors adding Replay Gain metadata to flac files

Reply #2
Did you by any chance scan these files using the "scan selection as a single album" command? As I'm sure you know it's irrational to do such thing but it would explain running out of resources (accumulating ReplayGain calculation state to calculate album gain over thousands of files).

Please also post full list of your components, maybe there's some other reason why your foobar2000 is leaking resources while scanning files.

Late edit: ReplayGain scanning will also fail with out-of-resources errors if you're trying to scan your large library as multiple albums but the files are untagged and not recognized as separate albums, hence scanned as one huge album. Except then the results are wrong anyway, so you should not be doing that.
Microsoft Windows: We can't script here, this is bat country.

errors adding Replay Gain metadata to flac files

Reply #3
Did you by any chance scan these files using the "scan selection as a single album" command? As I'm sure you know it's irrational to do such thing but it would explain running out of resources (accumulating ReplayGain calculation state to calculate album gain over thousands of files).

Please also post full list of your components, maybe there's some other reason why your foobar2000 is leaking resources while scanning files.

Late edit: ReplayGain scanning will also fail with out-of-resources errors if you're trying to scan your large library as multiple albums but the files are untagged and not recognized as separate albums, hence scanned as one huge album. Except then the results are wrong anyway, so you should not be doing that.


****************
chalk this up to a user who didn't RTFM: you were being too polite...  Yes, I was scanning as a single album - I hadn't understood the album vs. track options clearly.  I removed the metadata and rescanned on a per-track basis, and it completed fine.  (BTW, sonos tech support has an article about using foobar2000 for adjusting flac replay gain metadata, and their instructions say to scan as a single album....).  Thanks.

errors adding Replay Gain metadata to flac files

Reply #4
I think I'll add a special notice when you try to scan a suspiciously large group of tracks as a single album, this is way too easy to mistrigger by wrong click or alike.

PS I've seen this bug reported before so you're not the first person to do this.
Microsoft Windows: We can't script here, this is bat country.

errors adding Replay Gain metadata to flac files

Reply #5
I think I'll add a special notice when you try to scan a suspiciously large group of tracks as a single album, this is way too easy to mistrigger by wrong click or alike.

PS I've seen this bug reported before so you're not the first person to do this.

*******************************
one final note.  while my creds may be limited after attempting to scan as a single album, I think the impact of running short on resources may be somewhat serious.  Here are the steps I took:
1. load 12,000 .flac files into foobar and attempt to scan as a single album
2. resources run out halfway through.  I removed the replay gain tag information, again using foobar (did all 12,000 as a precaution)
3. load files back in, and scan on a per-track basis. foobar reports success
4. write updated tags with replay gain information. foobar reports success

after this sequence, I found **none of my flac files were playable**.  I tried using foobar, xmms, sonos - all reported ill-formed flac files.  mp3tag could not read the tags.
I keep good backups so I used rsync to restore all the flacs, no harm done.  In retrospect, I should have done some test cases before operating on a large repository (duh).

after the restore, I repeated the per-track scan of the flac files with foobar, and updated the tags with the replay gain information.  (needless to say, this time I proceeded incrementally, with mucho checking of tag contents and playability...) All the files are fine, and the tags read properly, including the replay gain info in the extended tags.  Thus I conclude the files were left in a corrupted state after step 2. above.  I apologize that I did not keep one of the un-playable flacs for analysis: at the time, I was focused on recovering my music....

errors adding Replay Gain metadata to flac files

Reply #6
Thanks a lot for reporting the file corruption issue, this is indeed serious. I've been able to recreate the condition on my own machine.
While picking the wrong RG scanner option can be considered a PEBKAC factor, the final outcome of this is completely unacceptable; this issue is being fixed on every possible level for the next fb2k update.
Microsoft Windows: We can't script here, this is bat country.