Cleanup Invalid MP3 Files
- Install mp3check
- Probably already available in your distro. Example:
sudo apt install mp3check
- Probably already available in your distro. Example:
- Scan a directory of MP3 files with:
mp3check -e -r -B -R -3 "SOME_DIR"
- This only scans files and reports issues, it does not make any changes
- This is recursive. Remove the lowercase
-r
to not dive into subdirectories -B
causes it to allow variable bitrate files. If your player doesn't support VBR, remove this flag to identify files that are VBR. Note: mp3check cannot convert VBR to CBR, you need tore-encode for that.
- Fix files with command:
mp3check --cut-junk-start --cut-junk-end -r -3 "SOME_DIR"
- This will write changes to the files stripping out the invalid chunks. The file modified time will be updated
Example cleanup output: