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: Corrupted Flac files in Foobar2000 (Read 12081 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Corrupted Flac files in Foobar2000

Hello, lately I'm getting a corrupted/unseekable error in some flac files in foobar. When I seek the files, this error comes up and it jumps to the second track. What I'm trying to figure out is why this error appears only in Foobar. I've tried the files in other players such as WMP, VLC, MPC, Powerdvd, etc. and the files play fine. So, I'm starting to thinks this is an issue with Foobar, and not the files. I know this can probably be fixed if I re-encode the files, but I don't want to do this, because it seems to be an issue with Foobar which needs to be fixed. Any help shall be greatly appreciated.

Corrupted Flac files in Foobar2000

Reply #1
Try different versions of foobar. If you still get errors your files are probably corrupted but other player do not report that and continue to play. You also have File Integrity Verifier which will compare stored checksum versus decoded checksum.

Corrupted Flac files in Foobar2000

Reply #2
Try different versions of foobar. If you still get errors your files are probably corrupted but other player do not report that and continue to play. You also have File Integrity Verifier which will compare stored checksum versus decoded checksum.

OK, thx for the tip. Actually it's happened with previous versions of Foobar, both stable and beta. Right know I'm running version 1.3.1 beta 1...I just checked the file with the File Integrity Verifier, and it didn't pass. It says "the item couldn't be correctly decoded". I'm trying to install stable version 1.3, but the program is warning me that I will lose all my configuration data. Can't afford to do this. Is there some way to install a previous version without losing the actual configuration and skin...?

Edit: Sorry to have to say this, but I really can't believe that the files are corrupt when practically every player out there, open source and proprietary, plays the files and only Foobar reports an error...

Corrupted Flac files in Foobar2000

Reply #3
what about the official command line tool? use the -t switch to test a file...

Code: [Select]
flac.exe -t blah.flac


Corrupted Flac files in Foobar2000

Reply #4
Is there some way to install a previous version without losing the actual configuration and skin...?

Install it in portable mode into a different folder.

Corrupted Flac files in Foobar2000

Reply #5
Tried it but for any flac file the command is giving an error initializing decoder...what am I doing wrong...?

Corrupted Flac files in Foobar2000

Reply #6
Is there some way to install a previous version without losing the actual configuration and skin...?

Install it in portable mode into a different folder.

Thx, just did that, it's the same. Foobar says the files are corrupt...I just found something out...In VLC the files seek ok, but when I seek to the end of the song it plays from the beginning but the cursor stays at the end of the song...so there is something wrong with these files. Of the players I have installed, only WMP and MPC seek the files without errors. When I seek the files with Powerdvd,  the audio gets lost. So, there is something definitely wrong with these files, but what is more perplexing to me is why WMP and MPC don't detect anything wrong...

Corrupted Flac files in Foobar2000

Reply #7
Because WMP's and MPC's decoders are designed to ignore errors and play every crappy file one can find, foobar's doesn't. It alerts you that something is wrong with your music files.
So, if you deal with a lot of broken files and that does not bother you do not use foobar.
But, if you care about your music collection foobar is a good choice.

Corrupted Flac files in Foobar2000

Reply #8
Because WMP's and MPC's decoders are designed to ignore errors and play every crappy file one can find, foobar's doesn't. It alerts you that something is wrong with your music files.


I would not bet that playing FLACs with a "hole" from an incomplete torrent download would even make it to Peter's todo list :-o

Corrupted Flac files in Foobar2000

Reply #9
Because WMP's and MPC's decoders are designed to ignore errors and play every crappy file one can find, foobar's doesn't. It alerts you that something is wrong with your music files.
So, if you deal with a lot of broken files and that does not bother you do not use foobar.
But, if you care about your music collection foobar is a good choice.


Not so sure about that...WMP does not play flac natively. You need to install the right codecs to do that, or a codec pack.

Corrupted Flac files in Foobar2000

Reply #10
Got the same issue with several FLAC files. Foobar2000 starts playing in the middle and when I try to seek Foobar2000 barfs with the following message:
Code: [Select]
Unable to seek to 1:36.787 (Unsupported format or corrupted file)


The "Verify Integrity" add-on for Foobar2000 gives the following error:
Code: [Select]
Warning: Reported length is inaccurate : 4:57.320000 vs 3:24.533061 decoded
Error: Corrupted FLAC stream
Error: MD5 mismatch


However, the Official FLAC executable (1.2.1b) decodes the FLAC file fine, and in test mode reports OK. If I decode-then-encode with the FLAC executable, the re-encoded FLAC file plays fine in Foobar2000.

Details:
Windows 8.1 x64
Foobar2000 1.3.3 (also tried 1.3.4 beta2, same issue)

Corrupted Flac files in Foobar2000

Reply #11
Could you please share a sample so any issues can be fixed? If they are commercial music tracks the rules won't allow using the upload forum, but if you could upload a sample track somewhere and give a link to me with private message I would make sure Peter gets it if this is a valid issue.

Corrupted Flac files in Foobar2000

Reply #12
Cheers, I've sent you a PM with download details.

Corrupted Flac files in Foobar2000

Reply #13
Good find.
The FLAC file is malformed, I recommend that you just keep a reencoded copy of it. It decodes cleanly when the decoder does not attempt to read its metadata (flac.exe); libflac seems to skip over portions of the audio stream when reading the metadata.
[update] Unfortunately the bug is deep in libFLAC and I cannot fix this right now.
Microsoft Windows: We can't script here, this is bat country.

Corrupted Flac files in Foobar2000

Reply #14
Good find.
The FLAC file is malformed, I recommend that you just keep a reencoded copy of it. It decodes cleanly when the decoder does not attempt to read its metadata (flac.exe); libflac seems to skip over portions of the audio stream when reading the metadata.
[update] Unfortunately the bug is deep in libFLAC and I cannot fix this right now.


Thank you for the analysis. I guess the test mode in flac.exe could do with some extra checks

Since the bug is hard to fix right now, would it be possible to add some check in Foobar2000 so it could give a more informative error message and just skip playing the file?
edit: Currently it's a bit confusing as it just starts playing "in the middle" of the file, with no errors unless you seek or until it reaches the end.

In any case, it's a lossless codec, re-encoding is a decent work-around for now.

Corrupted Flac files in Foobar2000

Reply #15
The current foobar2000 behavior is indeed highly confusing but that's what libFLAC hands to us....
Additionally I cannot open the file without reading the metadata because we rely on the metadata to provide us with channel mask info required for decoding... which FLAC.exe apparently does not care about.
Microsoft Windows: We can't script here, this is bat country.

Corrupted Flac files in Foobar2000

Reply #16
Additionally I cannot open the file without reading the metadata because we rely on the metadata to provide us with channel mask info required for decoding... which FLAC.exe apparently does not care about.

The next FLAC version (and current code in FLAC git) will read metadata by default (which means that it will be possible to decode this file only with non-obvious "--channel-map=none" option).

Corrupted Flac files in Foobar2000

Reply #17
Lord Crc, your files should work now with 1.3.4 beta 5. If there are more problematic tracks I'd appreciate a sample.

Corrupted Flac files in Foobar2000

Reply #18
Got the same issue with several FLAC files. Foobar2000 starts playing in the middle and when I try to seek Foobar2000 barfs with the following message:
Code: [Select]
Unable to seek to 1:36.787 (Unsupported format or corrupted file)


The "Verify Integrity" add-on for Foobar2000 gives the following error:
Code: [Select]
Warning: Reported length is inaccurate : 4:57.320000 vs 3:24.533061 decoded
Error: Corrupted FLAC stream
Error: MD5 mismatch


However, the Official FLAC executable (1.2.1b) decodes the FLAC file fine, and in test mode reports OK. If I decode-then-encode with the FLAC executable, the re-encoded FLAC file plays fine in Foobar2000.

Details:
Windows 8.1 x64
Foobar2000 1.3.3 (also tried 1.3.4 beta2, same issue)


Hello Lord crc,
Iused to have this problem too with foobar and after a deep search my Flac files were indeed corrupted after writing tags to the file with another program (Cattrax)
I could fix it with a program from Thomas Hamstrup called HAP metaflac
http://www.hamstrup.dk/Metaflac.htm
It appeared that the seek tables were corrupted during writing tags, perhaps you can try this and repair your corrupted files with this program
You could check with an older version of Foobar wether it works or not

Corrupted Flac files in Foobar2000

Reply #19
Lord Crc, your files should work now with 1.3.4 beta 5. If there are more problematic tracks I'd appreciate a sample.


Thanks guys for the prompt fix. So far it plays what I've thrown at it, so looking good, yay

Corrupted Flac files in Foobar2000

Reply #20
Iused to have this problem too with foobar and after a deep search my Flac files were indeed corrupted after writing tags to the file with another program (Cattrax)


Good point. Although, as you can see above, my files now plays fine, so for now I'll stick with the beta

Corrupted Flac files in Foobar2000

Reply #21
The program tweety61 linked seems to be a frontend to metaflac. Unfortunately this corruption in Lord Crc's files causes current versions of metaflac tool to break these files irreversibly. For example the sample I received would lose over a minute of audio data on metadata edit.
But rewriting tags with the beta foobar2000 you are running now or with the release 1.3.4 version would fix the metadata block length and the files would be flawless. At least that's the case with the sample file I have here.

 

Re: Corrupted Flac files in Foobar2000

Reply #22
I had same problem. In my case malformed FLACs hadn't any valid checksums. I just re-encoded those "virtually corrupted" FLACs into FLAC (again) via foobar2000 and problem gone.