MP3 repairing

Manual repairing techniques

DON'T FORGET TO BACKUP YOUR FILES BEFORE TRYING TO FIX THEM

  • try to use different ways to fix the releases
  • the best way to get to know how tags must be, is to find releases with a nearby predate of same group

-size is byte 7-10 as syncsafe integer
-always compare with the layout/structure of other (valid) files from that release

id3v1

  • Old Files (ID3v1) always have a zero at the second last byte and is always 80 bytes long => http://id3.org/ID3v1
  • Starting with ID3v1.1 this byte contains the track number in hex
  • Many old mp3 files (< 2004) had only 2 tags: lyrics and id3v1. If it has id3v2, just remove it. You can use Mp3tag for this.
  • If the CRC doesn't match already, check whether the lyrics tag has Title, Album or Artist set. If so, add a space character at the end of the id3v1 of Title, Album or Artist. Even if there is no lyrics tag, just add a space to Album.
  • Very often some retaggers made spaces after the comment in the id3v1 tag and Mp3tag deleted this.
  • Very often retaggers change 0x20 to 0x00 or vice versa (0x00 for many WCR,CHR,aPC). See also Liquids.MP3.Hex.Tutorial.V1.0.eBOOK-LS
  • Try to delete the track number, because many releases have no track number.
  • If the mp3crc in the lyrics tag is included you got the following possibilities
    • check the other files if it is used.
    • if yes just remove the those 16 bytes and correct the length
    • around id3v1.1 tracks names under 30 chars didn't get a lyrics field but only the plain 80 bytes
  • (?) above the ETT field ( ETT=Extended Track Title ) was used sometimes (?)

id3v2

  • A lot of mp3-stream starts at 1000h byte, but not all. Most common values observed are in this order: 1000h - 800h - 1200h - 400h
  • About id3tag v2.3 and scene: taggers swap the order of the tags
    • Example:
    • Right order of the mp3: TIT2, TPE1, TALB, TRCK, TYER, TCON, COMM, TENC, TLAN
    • Tag&rename created: TIT2, TPE1, TALB, TRCK, TYER, TCON, TENC, TLAN, COMM (only one swap)
    • Foobar created: TRCK, TIT2, TPE1, TALB, TYER, TCON, COMM, TENC, TLAN
    • Mp3tag created: TALB, TPE1, COMM, TENC, TCON, TLAN, TIT2, TRCK, TYER
    • Musicbrainz picard created: TIT2, TPE1, TRCK, TALB, TCON, TYER, COMM, TLAN, TENC
    • Winamp adds a newly created tag at the beginning and editing COMM will place it at the beginning. Recreate the tags in reverse to have the right order. Problem is that it uses UTF-16 instead of ISO standard encoding.
  • Scene releases have mostly TIT2 at the first place (done by Morgoth Mp3-Releaser)
  • The frame count number is repeated after the PRIV http://www.cdtag.com info

id3v2 extra tags
that extra tags must be replace with 0x00 or deleted (according to right order of tags by Morgoth Mp3-Releaser). Rels that made by CD-Tag are harder to fix

  • TBPM tag
  • FMPS_PlayCount.0TXXX…….FMPS_Rating_Amarok_Score.0POPM…………TXXX…….FMPS_Rating.-1
  • TKEY…….яюF. .m…POPM…….яю3. Some prog that create .mxm files add that tag
  • When Windows Media player changes ID3 tags, extra PRIV tags will have stuff such as WM/MediaClassPrimaryID, WM/MediaClassSecondaryID and AverageLevel. https://twitter.com/pyrescene/status/676004010176978944
  • Some iTunes program adds to the end of the id3v2 the following string: COMM…h…engiTunNORM. 00000D40 00000C56 00006799 0000731D 0000B8DA 0005BD63 00008000 00008000 00005414 00009F17…. Replace all by x00. It can't be read by another tagger.
  • Some iTunes program rewrites the beginning of the file. It must look like 49443303000000001F76 or (ID3……v) before the TIT2 tag. Delete the itunes comment as written above, but change the mp3 stream offset to the right. Most of the times this starts at 1000h, but some must start at 800h. (more possible values above)
  • Some unknown mp3 data at the end of the file right before the ID3 tag has to be removed. (related to this? https://gist.github.com/mountainstorm/8106250)

extra fixing

  • Some releases of SC have shifted comment. e.g. Miroslav_Vitous-Universal_Syncopations-2003-SC
  • Some releases of FSP have shifted comment. e.g. VA-Into_The_Groove_66-FR-2002-FSP
  • Some releases of 0MNi have shifted comment. e.g. VA-Le_Zouk_Fait_Male_2003-2003-0MNi
  • These issues were found on releases that all came from the same source.
  • First bytes of mp3 without id3v2 tag must be like FFFBB204 or FFFBB004. It doesn't matter what was there before, but any other must be replaced. That issue found at such rels:
    • FFFBB204 Musiq-Halfcrazy_(Remix_CDS)-2002-WHOA. (before fixing it had track1: 26F2D404, track2: 89A0B604, track3: E16D0C04)
    • FFFBB204 Nazkar-South_Bronx_Promo_CDS-2002-0MNi
    • FFFBB204 Peedi_Crakk_Elliot_Ness_Indy_500_Gobe-DJ_Noraps_Part_of_Town-Promo_CDS-2003-tAS
    • FFFBB004 Chris_And_Kai-Catch_Me_And_Suffocation-2X12-PROMO-VLS-2003-aPC.

If you ever want me to write a tool like that, have example pairs ready. —Gfy

Impossible to undo

MPEG location lookup table, documented at http://id3.org/id3v2.4.0-frames
Case: the acapella track from T.I._(feat_Beenie_Man)-Im_Serious_(12_Inch)-2001-EGO without the MLLT in it
04-T.I._(feat_Beenie_Man)-Im_Serious_(Acapella)-EGO.mp3 Good Size: 4657915 bytes, Good CRC: C9B9FA8A
There is an application that cuts off 22 bytes from previous tags or music when adding the MLLT tag. In many cases it's lame endings like uuuuuuuuuuuuuuuuulame3.90uuuuuuuuuuuuuuuuuuuu or a cut off Lyrics tag, but when it's music, there is nothing you can do to revert the process.

Decide which file has bitflips

  1. Import Files in Audacity
    1. File => Import => Audio (choose make a copy) -> First file
    2. File => Import => Audio (choose make a copy) -> Second file
  2. Select the first file, and do Effect Invert.
  3. Select both files, and do Tracks => Mix and render

If you end up with Nothing, Just a 0.0 line, the two files have cancelled themselves out, indicating that both files indeed had the exact same data.
http://forums.naimaudio.com/topic/3-steps-to-ascertain-whether-two-wav-files-are-the-same

Other

Liquids.MP3.Hex.Tutorial.V1.0.eBOOK-LS

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License