Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a massive bunch of music. Some of the tracks have unnecessary MP3 flags. How can I get rid of them?

share|improve this question
1  
Could you give an example of what you consider unnecessary? –  terdon Apr 21 '13 at 16:41
    
Thats subjective and not relevant in this case. You can choose yourself which frames should be deleted. –  ManuelSchneid3r Apr 22 '13 at 6:44
add comment

1 Answer

up vote 2 down vote accepted

To see the pollution of your library, try:

find ./ -type f -iname "*.mp3" -exec /usr/bin/mid3v2 -l '{}' + | egrep -e "AENC|ASPI|COMM|COMR|ENCR|EQU2|ETCO|GEOB|GRID|LINK|MCDI|MLLT|OWNE|PRIV|PCNT|POPM|POSS|RBUF|RVA2|RVRB|SEEK|SIGN|SYLT|SYTC|TBPM|TCOM|TCOP|TDEN|TDLY|TDOR|TDRL|TDTG|TENC|TEXT|TFLT|TIPL|TIT3|TKEY|TLAN|TLEN|TMCL|TMED|TMOO|TOAL|TOFN|TOLY|TOPE|TOWN|TPE3|TPE4|TPOS|TPRO|TPUB|TRSN|TRSO|TSOA|TSOP|TSOT|TSRC|TSSE|TSST|TXXX|UFID|USER|USLT|WCOM|WCOP|WOAF|WOAR|WOAS|WORS|WPAY|WPUB|WXXX"

Generally you can use mid3v2 to edit ID3v2 tags of an mp3 file.

find ./ -type f -iname "*.mp3" -exec /usr/bin/mid3v2 --delete-frames=AENC,ASPI,COMM,COMR,ENCR,EQU2,ETCO,GEOB,GRID,LINK,MCDI,MLLT,OWNE,PRIV,PCNT,POPM,POSS,RBUF,RVA2,RVRB,SEEK,SIGN,SYLT,SYTC,TBPM,TCOM,TCOP,TDEN,TDLY,TDOR,TDRL,TDTG,TENC,TEXT,TFLT,TIPL,TIT3,TKEY,TLAN,TLEN,TMCL,TMED,TMOO,TOAL,TOFN,TOLY,TOPE,TOWN,TPE3,TPE4,TPOS,TPRO,TPUB,TRSN,TRSO,TSOA,TSOP,TSOT,TSRC,TSSE,TSST,TXXX,UFID,USER,USLT,WCOM,WCOP,WOAF,WOAR,WOAS,WORS,WPAY,WPUB,WXXX '{}' +

This will, recursively from the current directory, find all *.mp3 files and delete almost all of their id3v2 frames. And it does it extremely fast. Almost all means all, but:

APIC  A picture for the track, usually the albumcover.
TIT1  Content group description (I guess could be deleted too)
TIT2  The song title
TPE1  The album artist
TPE2  The artists (includes featurings)
TRCK  Tracknumber
TALB  Albumtitle
TCON  Genre
TDRC  Year of release

Compare id3v2.4 specification

mid3v2 will implicitely convert TYER, the old frame for release year, to TDRC before deleting it. Actually it converts every file on every operation to id3v2.4. See man mid3v2.

Test if it worked, again with:

find ./ -type f -iname "*.mp3" -exec /usr/bin/mid3v2 -l '{}' + | egrep -e "AENC|ASPI|COMM|COMR|ENCR|EQU2|ETCO|GEOB|GRID|LINK|MCDI|MLLT|OWNE|PRIV|PCNT|POPM|POSS|RBUF|RVA2|RVRB|SEEK|SIGN|SYLT|SYTC|TBPM|TCOM|TCOP|TDEN|TDLY|TDOR|TDRL|TDTG|TENC|TEXT|TFLT|TIPL|TIT3|TKEY|TLAN|TLEN|TMCL|TMED|TMOO|TOAL|TOFN|TOLY|TOPE|TOWN|TPE3|TPE4|TPOS|TPRO|TPUB|TRSN|TRSO|TSOA|TSOP|TSOT|TSRC|TSSE|TSST|TXXX|UFID|USER|USLT|WCOM|WCOP|WOAF|WOAR|WOAS|WORS|WPAY|WPUB|WXXX"
share|improve this answer
    
What you fail to mention is that the id3v2.4 version is not supported by all devices/software (even though the specs were published in 2000) including all versions of Windows Media Player. One should test a few 'improved' files on all devices one uses before changing, especially since mid3v2 cannot be used to roll back this change. –  Anthon Apr 22 '13 at 3:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.