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: Repair flac errors? (Read 7170 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Repair flac errors?

I noticed lately that some of my flac files have been stopping midway through the song, or skipping crazily, so I scanned through my collection with flac -ts to search for errors.

Code: [Select]
06 - Static to the Heart.flac: *** Got error code 2:FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH

06 - Static to the Heart.flac: ERROR while decoding data
                              state = FLAC__STREAM_DECODER_READ_FRAME

I got those errors on numerous files. However, I'm still able to play the files fine in mplayer through ffmpeg and with vlc.  Running vlc through the command line gives this error: [00000438] flac decoder error: frame's data did not match the CRC in the footer.

It does not play through anything using gstreamer though.

I'm wondering if there's a way to repair the files without reripping them, because they play fine with ffmpeg, so I don't imagine the damage is too severe.


Repair flac errors?

Reply #2
I'm wondering if there's a way to repair the files without reripping them, because they play fine with ffmpeg, so I don't imagine the damage is too severe.

FFmpeg does not check the frame crc.  If you're not getting a frame sync error either then you're probably right about the damage being minimal.  There is no way to repair the file to its original lossless state, but if you have no alternative you could decode through the errors with ffmpeg or flac -F and reencode so you'll at least have a valid FLAC file.  But if you do have the original then reripping is your best option.