Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: MP3 Header: Xing Tag correction (Read 12516 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

MP3 Header: Xing Tag correction

Hi!

I have some MP3s (made with VBR) that seems to have
a wrong stream size resp. file size in the so called 'Xing tag'.
But in such cases some editors/players really get into trouble...

So is there a tool to correct that size notification ???
(win32 command-line versions highly prefered)


Often i use the tool 'MP3trim', but afterwards i'm no longer able
to read out the Lame specific 'Lame tag'.  Moreover another tool
'mp3guessEnc' reports the (remaining) Xing tag only particularly.


So if U know any software to set a 'good' Xing tag, please post it! ;=)


Thx & CU,
384kbps

MP3 Header: Xing Tag correction

Reply #1
The latest version of VBRfix is supposed to preserve LAMEtag information (if the preserve-lame-tag option is enabled of course) and only rewrite the Xing portion of the tag, so you can try that. GUI and CLI versions available here:
http://www.willwap.co.uk/Programs/vbrfix.html

MP3 Header: Xing Tag correction

Reply #2
If you're using Foobar you can try "Fix MP3 Header" context menu item. Truly speaking i didn't try it myself but maybe it will help you.

MP3 Header: Xing Tag correction

Reply #3
Quote
The latest version of VBRfix is supposed to preserve LAMEtag information (if the preserve-lame-tag option is enabled of course) and only rewrite the Xing portion of the tag, so you can try that. GUI and CLI versions available here:
http://www.willwap.co.uk/Programs/vbrfix.html

Which version to download?
They seem to have different features... 
I'm the one in the picture, sitting on a giant cabbage in Mexico, circa 1978.
Reseñas de Rock en Español: www.estadogeneral.com

MP3 Header: Xing Tag correction

Reply #4
Quote
Quote
The latest version of VBRfix is supposed to preserve LAMEtag information (if the preserve-lame-tag option is enabled of course) and only rewrite the Xing portion of the tag, so you can try that. GUI and CLI versions available here:
http://www.willwap.co.uk/Programs/vbrfix.html

Which version to download?
They seem to have different features... 

http://www.willwap.co.uk/Downloads/vbrfixv5-3-15.zip

MP3 Header: Xing Tag correction

Reply #5
Thx very much for the help!!!


I have tested VBRfix. - It works fine on MP3 made by FhG :=),
but on truncated MP3s encoded with Lame it removes the specific
'Lame Tag' placed some bytes after the Xing tag :=(

Well...
I would like a tool that 'only' writes the exact frame number and
file size in the Xing tag. If it is able to detect these values, the better!

Something like: XingFix.exe "file.mp3" frames:6903 size:5715572

It 'only' seems to be a couple of hex-values, at least belong...
... http://gabriel.mp3-tech.org/mp3infotag.html


At the end, EncSpot (is there another tool too?) should be still able
to report the Lame tag values like lowpass-filer, js-mode, etc.


Thx 4 any further help!
384kbps

MP3 Header: Xing Tag correction

Reply #6
I have tried the 'Fix MP3 Header' option of Foobar2000.
Hmm...
I works in any way, but It seems to build a completley
new header structure. - Naoki Shibata's tool 'mp3guessEnc'
reports 'no xing tag found' and EncSpot reports no 'lame tag'
information too.

So this won't be the way...

Well, could maybe Lame make a new file header for a new
VBR mp3 in any way? - So i could replace the bad header...

Thx any 'hope',
  384kbps

MP3 Header: Xing Tag correction

Reply #7
You need to download the more recent non-VB version to get the LAME-tag preservation (it says "LANE" rather than "LAME" in the options menu, but ignore that )

Download this version:
http://www.willwap.co.uk/Downloads/vbrfixw...source0_2r2.zip
It's a little rough around the edges still - I assume the author hasn't has chance to finish working it through, but it should retain the LAME tag and rewrite the Xing header.

MP3 Header: Xing Tag correction

Reply #8
Thx!

Indeed, vbrfixwin.exe rebuilds a new Xing tag although
the hole MP3 file header doesn't look very similar to headers
that Lame normally creates.
This must be the reason why EncSpot doesn't find the Lame Tag.
But the (20?) bytes of the lame tag are 1:1 copied ;=)




Maybe EncSpot is simply to a bit to 'stupid' (sorry to all
the programmers who made that great tool!) to find
the lame tag in MP3s with other header structures...


So i'm still interested in more tools repairing the Xing tag
- or reporting me information out of a correct Lame tag ;=)

CU,
384kbps

MP3 Header: Xing Tag correction

Reply #9
Feel free to submit a sample MP3 that you think isn't behaving properly and I'll take a look at it:
http://www.getid3.org/upload

MP3 Header: Xing Tag correction

Reply #10
Thx 4 that great offer!!!

So I have 'constructed' some files that represent the problem cases.
If U have some time, please take a look:
=> http://homepage.hispeed.ch/audio/mp3/


I like EncSpot. As far as i know it is the only tool that reports information
out of the lame tag - but only if there is a Lame-written Xing tag (left).
=> Rythm.(Lame-Original).mp3
=> Rythm.(Lame-Orignial-Truncated-by-100kB).mp3
=> Rythm.(Lame-Orignial-Truncated-by-130-Frames).mp3


Foobar200, VBRfix, mp3trim, ... doesn't correct wrong Xing tag entries,
it seems that they replace the hole Xing tag. Often the new Xing tag also
can't be found again by 'reference' tools like mp3guessEnc.

Indeed i don't know how far Xing tag and Lame tag depends on each other.
However i would be glad to have a (command-line) tool to repair the Xing
tag in 'Lame'-style or that is able to read out Lame tag information itself.


Thx 4 any 'idea',
384kbps

MP3 Header: Xing Tag correction

Reply #11
LameTag by phwip will display the contents of the LAME tag, if present. See this thread: http://www.hydrogenaudio.org/?showtopic=13695

I'm unable to download http://homepage.hispeed.ch/audio/mp3/Rythm...ed-&-saved).mp3 probably because it has a & in the filename (please rename the file to not use &).

foobar2000's "Fix MP3 Header..." feature is a little wonky and writes Xing/LAME tags of questionable validity (they're CBR 64kbps frames for any and all types of MP3). I would avoid using it if possible.

Now that I've looked at your files, can you clarify for me what your original question is? Do you mean that for a truncated file you want the "number of bytes of music data", as stored in the Xing/LAME header frame, to be updated to reflect the actual number of bytes there are, as opposed to the number of bytes that were there when the file was originally encoded? I suppose that would make sense - I didn't realize VBRfix etc didn't do that already.

<plays around with VBRfix for a few minutes>

Aha! If you un-check "Keep LANE Info" in VBRfix, and fix your file, it will rewrite the music_length value as you want. Hope that was what you wanted, if so - problem solved

MP3 Header: Xing Tag correction

Reply #12
Thanks for the link to the great lame tag reading tool !!!
In case of emergency this will helps a lot!
( I have made a short test: I have shorten a Lame encoded MP3
by 1 sec at the beginning and at the end. LameTag.exe was able
to report the specific lame tag information even now! )

Quote
I'm unable to download

Eh... sorry, I have replaced the ampersand char just now.
http://homepage.hispeed.ch/audio/mp3/Rythm...nd-saved%29.mp3



My remainig 'wish':
Quote
Do you mean that for a truncated file you want the "number of bytes of music data", as stored in the Xing/LAME header frame, to be updated to reflect the actual number of bytes

Yes! - I'm looking for a tool that updates/corrects the lame tag
with the music bytes length and the frame number as it is 'now'
in sense of: 'take the actual existing values'.

The most tools i have tried till now replace the hole MP3 file haeder
and don't updates these values only inside the existing MP3 header.

384kbps