[X] Mp3tag corrupts every mp3 file after editing the tag .


#1

Find the solution at the 5th Edit of Conclusion in the 8th post of mine .


I want to report the bug I suffered from 2 months ago but did not realised really what causes my mp3 files to have a strange noise of annoying scratch at the beginning .

2 months ago I've noted that some of my mp3 files got this kind of problem when playing them in the background of video games (as soundtracks) so those audio-players which are built-in the game engines reads always that scratch noise unlike the Windows-Media-Player that certainly not playing the first frames of mp3 files so maybe it just was designed that way to expect this kind of file corruptions . So that's why I used to mute the music in the game and playing the background music always with WMP to not hear those annoying scratch noises while playing .

After several weeks I switched to a new media player Media-monkey that has different mp3 input plugins so I could again listen these scratches at the beginning of my tracks just same as in some game engines that plays also the very first frame of each mp3 file .

I can hear it in many of my mp3 files (Well , actually all those files that I've tagged with Mp3tag , but I still love Mp3tag)

I started to realise that this caused by mp3 tag but I wasn't really sure so i decided to start a new file analysis comparing between original mp3 untagged files / tagged and same converted to WAV file .

So my analysis results showed me clearly that the sound artifact is caused by tagging the file (I also think it may appear in any format not just only mp3 that has been tagged with Mp3tag)

Step by step :

  1. Having the original soundtrack files of the game as mp3 files without any sound artifacts .
  2. Copying the files and tagging them with Mp3tag . now i can see in the wave monitor (with sound editor) that some new sound data is added to the track at the first frame (first 20ms) (possibly the new field/tagging data from Mp3tag such as album art and comments)
  3. Converting it again to mp3 with fine converter , The strange sound artifact is removed by the converter (tags remains) - Brave .
  4. Tagging again with Mp3tag some of the fields in the flushed mp3 file , Again see the strange artifact comes back in the wave monitor ... So it will come back every time when tagging the files !
  5. Converting the same mp3 again to .wav tagless format , The strange artifact does not exists and could not be .
  6. Playing the files with WMP showed no difference . My guess is that WMP's mp3 encoder is skipping the first frames , Or it just too smart to mute this kind of artifacts at the beginning of files .
  7. Playing with MediaMonkey the corrupted mp3 (with the artifact) . And i can hear the strange scratching unthinkable noise .
  8. Checking the files with Mp3test , It reports me an encoding error in the file that was tagged with mp3tag but the other original mp3 soundtrack is clean of errors ! <- this was enough for me .

Here is the picture that represents the strange artifact caused by Mp3Tag's taggings . It exists almost in any of my mp3 files since i used mp3tag to tag them .

Well I really hope this artifact/bug would be fixed soon in the next version and mp3tag would become again my ideal tagging software . Meanwhile I am just afraid to tag my mp3 files lol


mp3 tags erneuern
A small scratch in song when saving metadata
Mp3 files corrupted after tagging
#2

Please tell us more about your work environment.
I cannot reproduce the behaviour you describe.
I have used MP3tag on thousands of files from various sources and none has a strange noise after tagging.
I have used MP3test to find strange files and it found exectly those two which I know have a different bug (two V2 tags).
I have loaded several files from various sources into the Nero Wave editor and none of them has sound artifacts at the beginning. So perhaps your sound editor messes up things.


#3

It's not really about the sound editor .... I used the sound editor MagixMusicMaker just to check out the sound content in the file after I've heard the artifacts in the media player "MediaMonkey" and in several games .

This artifact at the beginning of each file can be listened by a media player . If you want i can upload for you several files , In all you will find the artifact by using a visualisation of the content in your sound editor , And I just found one file that the corruption was so big that it made it possible even to hear the artifact as a scratch noise at the beginning . In some certain video game i tagged it's music then I could hear the artifacts at the beginning of each track while playing , So it's surly not the sound editor .

You may take one of your music files (that was tagged with the latest 2.55a version and tagged anything possible+art+comment and maybe you will see in your sound editor the artifact . When the tagging contains bigger content the artifact should become larger . And only then you can hear it .

BTW here is some basic info :
Windows 8 64 bit
Mp3tag v2.55a
MediaMonkey v4.0.7.1511
mp3test - the latest one
Magix Music Maker v15
Helium Audio Converter 1.8.0 build 365
Format Factory - The latest one ..

My working environment ? Hmm , I am not a soundman or sound-editor anyway, I am a software developer (.NET C#) . I use music(and soundtrack editing) for common media and entertainment purpose . My most used sound-related software is mp3tag to edited tags and organise the files . lol

BTW 2:
I think this reported bug is actually referring to the same issue . Isn't it ?

Edit :
I am downloading now Nero Wave Edior to check out the file ... it's just obvious that all my mp3 files contains artifacts MMM and MM won't display and play data that doesn't exists in the files ..


#4

Thanks for this report. Please post a single file before tagging (ideally small), full details of the tagging steps performed (ideally minimal), and the file after tagging showing the problem.

Chris (a program user, not developer)


#5

Download RAR with 3 files :

  1. A file that was tagged with mp3tag .
  2. The same file was reconverted to new mp3 file , No artifacts the converter eliminated it .
  3. The same file again tagged with mp3 tag and new artifact appears but it's silent even in MediaMonkey . but still visible artifact in MagixMuscMaker .

Notes :

  1. The artifact is not visible in NeroWaveEditor (And i have no idea why) . So far only in Magix Music Maker v15 .
  2. The first artifact is audible only in MediaMonkey that uses different input codecs .
  3. The second artifact is silent but still exists . Almost all my mp3 files are in this state (unaudible
    artifacts at the beginning)

#6

Thanks David, but I think the requested file pair is needed.


#7

I would not agree but say that it is very similar to this bug report:
/t/14398/1
It also involves Magix Music Maker. So this seems to be incompatible.


#8
CONCLUSION (Edit 5) : (Jumped to top of the post)

OK , So i tried my best to analyse this weird artifact and got conclusions and a solution . Well i really like to encounter bugs and debugging software is part of my daily challenge at my own development projects . So , my meanwhile conclusions are that firstly Magix-Music-Maker has a glitch(encountered bug by bug lol) that reads the ID3v2.3 as an audio stream (Not separating between audio data and the tag/non audio streams in the file at all . even proper non audio streams will get into the audio importer) .
The MediaMonkey reads and plays the data very well , But unlike WMP it reads "Unknown Stream/Broken Streams" as "MPEG Audio Stream" unless it is explicit "ID3 Stream" at the end of the file or "ID3v2 Stream" at the beginning of the file . Any other streams include "MPEG Audio Stream" would be considered as "MPEG Audio Stream"s . While WMP and many other players playes data only from explicit "MPEG Audio Stream" . So that's why I can hear it only in some certain players .

Now about the Artifact itself . It is not exactly artifact but an "Unknown Stream" not ID3 tag and not LAME header or anything like that . But maybe it was in the past "LAME Header" that was corrupted by some one of the following : Or Mp3tag while tagging . Or MediaMonkey while rating/analysing , Or Windows Explorer while editing information . Now which one of them corrupted this LAME header i really have no idea . You guys should check out and debug mp3tag and catch if it corrupts LAME Header's Stream because it maybe this . If it is not mp3tag then its or Windows Explorer (Hard to believe that Microsoft actually released unstable software) Or its likely MediaMonkey player (Which is also a very famous and advanced editor that includes advanced tagging and editing . Why i think that MM is more likely is because this MediaPlayer has many bugs that i faced them my self also while looking at mp3 Diags i can see Unknown ASCII chars in MediaMonkey's ID3v2 tagging . I flushed the the tag in MP3 Diags and now the file plays fine . And the unknown (Broken Stream - corrupted LAME biased) is removed .

So for those who got the same problem as i got . I can only suggest to use always mp3diags to remove any unknown/broken streams after tagging the file no matter what software you have used .

Update :
It seems that many files has more than 1 ID3v2x streams . Another surmise for this corruption may that mp3tag not deletes older ID3v2x streams before creating new streams or when detecting more than one ID3v2x streams . The ID3v1 stream at end should remain and reflect the basic data from the main ID3v2x stream .


But i can hear it in media players and game engines .
Again the MMM is just a tool to check the file ! The file wasn't created in MMM or anyhing like that .
So far i faced that Clauswitz 2 of Paradox Interactive reads and plays the artifact at running time . So it's a big problem . And MediaMonkey doing the same only if the artifact is large enough .

Here is anoter report regerding to the same noise artifact :
Weird Noise
And the the bug you gave me regerding to MMM editing ... But again i do not use MMM to edit any of my files ! and actually MMM doesn't reports me anything about bad tag . Just a visible artifact in the wave monitor .

The two files you requested are in the RAR file .

  1. reconverted (Clean file)
  2. mp3tags' (Two artifacted files after using mp3tag) .

Edit :
Mp3Val (The latest one) says on the artifacted file :

But the other file (Tagged again with mp3tag after reconverting) it says everthing alrighty .

Edit 2 :
Accourding to this article in StackOverFlow mp3 file should not have any headers , So what is that artifact/header in the first frame in each of my files after tagging with mp3tag ?

Edit 3 :
So i took some time to analyse the files even deeper and i have some news after looking at them with Mp3 Diags v1.0 Unstable :
The first artifacted file has an "unknown header" instead of "Lame header" that is missing :
Here is the the beginning of the file (That was translated to an artifact later) :

I have no idea what header is it supposed to be . The other thing is that i still don't understand what mp3tag is adding there always after tagging the file , I need some info about the way mp3tag tagging the file , Does it adds any new bytes in the beginning of the file ? Because the ID3 tags are located at the end of the mp3 file and not at the beginning AFAIK . SO what exactly mp3tag is searching there i am really trying to realise .

Edit 4 : I just have read the mp3 file structure at Wikipedia . The ID3v2X tag is located at the beginning of the file while ID3 tags are in the end of the file . So this artifact (at the first frame) could be an a side effect of the ID3v2 tagging . Now i am not sure why this overflows into the mp3 data .


#9

Thank you for the long testing and explanations.

In short: the reported corruption does not originate in MP3tag and therefore is no MP3tag bug.

A little more elaborate: MP3tag behaves just like it always does: it does not touch the audio stream but reads and adds/modifies the tags.
In this respect it follows accurately the "GIGO" (garbage in, garbage out) line: if you have files that were messed up before, they stay messed up.
Thankfully, there are (freeware) tools around that help you to clean up the mess and finally MP3tag will help you to get the files tagged. Without corruption.


#10

Indeed MediaMonkey has a poor record when it comes to bugs. Including this bug that corrupts FLAC files upon tagging: http://www.mediamonkey.com/forum/viewtopic.php?t=10704 .


[X] Changing cover on Samba share results in invalid frame headers
Randomly disappearing tags (using Mp3Tag and MediaMonkey)