Moonbase59 / loudgain

ReplayGain 2.0 loudness normalizer based on the EBU R128/ITU BS.1770 standard (-18 LUFS, FLAC, Ogg, MP2, MP3, MP4, M4A, AAC, ALAC, Opus, ASF, WMA, WAV, AIFF, WavPack, APE)
Other
182 stars 23 forks source link

Cannot write to FLAC file with empty SEEKTABLE block #18

Open jparnzen opened 4 years ago

jparnzen commented 4 years ago

Hi there:

I just started using loudgain on my collection of FLAC-ripped CDs and I think I may have run into a bug.

I've run into some older rips to FLAC where I used XLD to rip the CDs, and the FLACs have a SEEKTABLE block but it's empty (zero length and no seek points). For those FLAC files, loudgain will analyze the file fine but can't write the new RG tags to the file. It will report an error that the file couldn't be written to.

While trying to figure out why this was happening, I compared a couple other FLAC files with successful tag updates to the offending file. A file without the SEEKTABLE block wrote correctly, and a file that had a populated SEEKTABLE block wrote correctly. So it seems that somehow an existing but empty SEEKTABLE block prevents loudgain from writing the tags to a file.

I hope this helps track down the issue. Please let me know if you need any further information or test files to check against.

And many, many thanks for creating and maintaining loudgain! I'm finding it to be essential to my managing my collection!

Cheers!

Moonbase59 commented 4 years ago

Glad you like loudgain!

Regarding the seektable thing, I’d have to investigate. I myself have a lot FLAC files, and not one complained, so maybe the ones you mention are somehow special. Did you try to remux them using a newer FLAC (this should be lossless)?

I’d appreciate some test files nevertheless, maybe this can be fixed.

jparnzen commented 4 years ago

Sorry for my delayed response :) I can get some FLACs to you for testing. What's the best way to do that?

Thanks again for your help and hardwork!