Cleanup Invalid MP3 Files

  1. Install mp3check
    1. Probably already available in your distro. Example: sudo apt install mp3check
  2. Scan a directory of MP3 files with: mp3check -erBR3 "SOME_DIR"
    1. This only scans files and reports issues, it does not make any changes
    2. This is recursive. Remove the lowercase -r to not dive into subdirectories
    3. -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.
  3. Fix files with command: mp3check -r3 --cut-junk-start --cut-junk-end "SOME_DIR"
    1. This will write changes to the files stripping out the invalid chunks. The file modified time will be updated

Notes:

Example cleanup output:

image.png


Revision #2
Created 2025-08-12 22:08:51 UTC by William
Updated 2025-08-12 22:45:49 UTC by William