drgolem/fixID3tags

★ 0Forks 0GoGitHub ↗Compare

README

fixID3tags

CLI tool to fix incorrect tag encoding in MP3 files. Handles common Cyrillic encoding issues in ID3v2 tags.

Build

go build

Usage

./fixID3tags -music-dir="<MUSIC>"

All operations run in dry-run mode by default (no files are modified). To apply changes:

./fixID3tags -music-dir="<MUSIC>" -dry-run=false

Flags

-music-dir string       path to music folder
-dry-run                dry run, no changes (default true)
-fix-ISO8859-1          undo UTF-8 tag read as ISO-8859-1
-fix-mojibake           fix double-encoded UTF-8 (misread as CP1251)
-fix-title-only         parse and fix title only
-override-artist string set new value for artist tag
-override-album string  set new value for album tag
-skip-empty-tags        skip empty tags

Encoding fix modes

Default mode - Fix CP1251 bytes stored as ISO-8859-1 (most common with Russian MP3s):

./fixID3tags -music-dir="<MUSIC>"

ISO-8859-1 mode - Fix UTF-8 tags incorrectly marked as ISO-8859-1:

./fixID3tags -music-dir="<MUSIC>" -fix-ISO8859-1

Mojibake mode - Fix double-encoded UTF-8 text (UTF-8 misread as CP1251):

./fixID3tags -music-dir="<MUSIC>" -fix-mojibake

Override tags

Set artist/album for all files in a directory:

./fixID3tags -music-dir="<MUSIC>" -override-artist="Artist Name" -override-album="Album Name" -dry-run=false

Override works even when existing tags are not empty.

Dependencies

License

MIT

Contributors

drgolem

Issues