Old 30th July 2001, 03:47   #1
art77
Junior Member
 
Join Date: Dec 2000
Posts: 2
Send a message via AIM to art77
is there a plug-in to repair bad mp3 files?
art77 is offline   Reply With Quote
Old 30th July 2001, 13:11   #2
. - .... .- -. ....
Backpacking
Moderator
 
. - .... .- -. ....'s Avatar
 
Join Date: Nov 2000
Location: საქართველო (Georgia)
Posts: 10,104
Send a message via ICQ to . - .... .- -. .... Send a message via Yahoo to . - .... .- -. ....
define "bad"

Like my photography? Buy some here....
. - .... .- -. .... is offline   Reply With Quote
Old 1st August 2001, 04:28   #3
saulius2
Junior Member
 
Join Date: Jul 2001
Posts: 3
ideas about what can be damaged and repaired inside mp3-files

hm.. i think "bad" mp3 is an mp3 file, which structure has been damaged.
i gues now someone will ask about what mp3 file structure is about :).
lets say mp3-file can consist of 3 parts at high level: file-header, file-body, file-footer. lets say even MORE (though maybe groundlessly): each part is a composition of elements of two kinds: mpeg-FRAMES and mpeg-TAGS.

header can contain: ID3v2 tag, XING-VBR frame (maybe AiD header);
body should only contain MPEG 1 (only, right?) Layer 3 frames;
footer can contain: Lyrics v2.0 tag, ID3v1.x tag.

now i guess object of interest are only mpeg frames, or to be exact -- damaged mpeg frames. or to be even MORE exact:
we are interested in data, representing that frames, and especially are interested when (or where?) those data parts that cannot be DECODED in the way it were supposed to be decoded.
or am i wrong? if you agree with earlier statements, lets go further (i feel my abstract minds are to "deep" to express them in a foreign language ":-)").

so, what could be defined as damage for mpeg frames? lets look at the process which do need info from such frames. that is mp3 file decoding to wave, and i suppose it looks like set of such steps:

1, lets search for nearest incoming frame start and for it's end inside rest part of file;
2, lets read the n-th frame;
3, lets decode frame header from read data;
4, lets decode mpeg-info and make some more final points at our decoded PCM signal (or lets call it wave-form)
5, n=n+1;
6, lets repeat all steps from the 1st one, if the end of file/stream isn't here.

damage, damage, (incorporated.. ";)") .. what's that? two effects up on our data:
A, changing some data parts to other values;
B, loss of some parts of data
C, insertion of additional garbage-data

(C - case, garbage not always is equal to random data, sometimes we can get what we've lost ealier.. i am talking about famous "frame is short by 2 bytes, frame is long by 2 bytes". http://www.geocities.com/mp3utility ).

i guess, damage of our information (effects A,B,C) can mess up those steps:
1, 3, 4.

1+A: frame synchro-part get overwritten. bad, but we can expect (n+1)-th frame start right after n-th frame end.
1+B: frame synchro-part as long as frame mpeg-data is lost. sad, but maybe we can restore frame header (and not only it) by looking at neighboring frames? what about correlation of data of consequential frames.
1+C: frame synchro-part still stays

as for frame end and position of that end, IMHO it is calculated logicaly from info of frame-header, so we do not worry bout it.

3+A,B,C: some frame header info gets wrong, but we can easily reconstruct that by looking at average behaviour of frames bitrate value running through a file, by looking at nearest frames and by interpolating some values..

4+A,B,C: oh no.. mpeg-data. there are such things here like scalefactor, side-band info and other, i do not know much about. actually i know nothing bout random tales.. but still believe we can get them by approximation of data (in maybe some transformed state) from neighbouring frames. or maybe we can do it by trying to guess what final waveform signal was and by calculating frame's data in inverse way. do not know much about crc-sum value, but it would not help us a lot, i am afraid.


so, my conclusion is that:

we can try repairing "bad" mp3, though we should do some statistics. that's i suppose why i have never seen such plugin -- it would require good cpu-time to find damage and made all repairs in real-time. i even haven't seen any such software. any corrections, links, critics?
you are welcome - write here, or write to me, by e-mail. people, i'd like to get what you know and what you think, because those 3 years of downloading trashed mpthrees are almost getting me down.
BTW, i always thought that the reason for this frequent phenomena (2 bytes short, 2 bytes long) is "crapy" some brand-name (be it hardware bugs or software incompleteness) of modem, DSL and similar devices, though i am just guessing.

saulius2 is offline   Reply With Quote
Old 1st August 2001, 12:48   #4
Twilightseer
Frenchoderator
 
Join Date: May 2000
Location: Lavabo, fond du couloir, 3è porte à droite
Posts: 6,309
OK.
Now define "antidisestablishmentarianism"
Twilightseer is offline   Reply With Quote
Old 1st August 2001, 12:53   #5
. - .... .- -. ....
Backpacking
Moderator
 
. - .... .- -. ....'s Avatar
 
Join Date: Nov 2000
Location: საქართველო (Georgia)
Posts: 10,104
Send a message via ICQ to . - .... .- -. .... Send a message via Yahoo to . - .... .- -. ....
er.....O.....Kay.....

thanks for your indepth answer, and no ther eis no need to explain the file structure - I know how mp3s work, thanks all the same. But it still doesn't solve our problem - when I said "define 'bad' " I was talking more along the lines of what does he perceive is wrong that needs to be repaired.

If it is a case of incomplete files then he needs to redownload. However, if there is pops and clicks it could be a winamp problem, or he might have to run "uncook" on the file in question.

Like my photography? Buy some here....
. - .... .- -. .... is offline   Reply With Quote
Old 1st August 2001, 12:58   #6
Twilightseer
Frenchoderator
 
Join Date: May 2000
Location: Lavabo, fond du couloir, 3è porte à droite
Posts: 6,309
Damaged MP3s are extremely hard to fix, most of the programs that claim to do so are more harmful than beneficial.
Getting the file again is generally the best solution...
Twilightseer is offline   Reply With Quote
Old 2nd August 2001, 07:06   #7
saulius2
Junior Member
 
Join Date: Jul 2001
Posts: 3
heh,

> thanks for your indepth answer, and no there is no need
> to explain the file structure - I know how mp3s work,
> thanks all the same. But it

for 1st:
it wasn't try to make someone's knowledge better or teach someone about something. mainly it was a way to make my own point of view in case of bad-mp3 clearer to myself :-). and i understood that after doing a post :-))


> still doesn't solve our problem - when I
> said "define 'bad' " I was talking more along the lines
> of what does he perceive is wrong that needs to be
> repaired.

2nd thing:
why are you so egoistic with your opinion (..just kidding).

:-), i think _the kind_ of badness i've described for sure exists in real (at least my) life. and i hope i have described it quite fine (heh). and yet i am annoyed with such badness. of course, also i want a soft to fix that. i was and still am searching, though usuccessfully. so have decided to reply to "art77" post.


> If it is a case of incomplete files then he needs to
> redownload. However, if there is pops and clicks it could
> be a winamp problem, or he might have to run "uncook" on
> the file in question.

"art77" user..!, i do not know anything bout you, but my main problem with scratchy-sounding mp3 IS such that all files are have normal length. BUT! BUT those are still giving Hi-Frequency scratches on certain time-positions :(.


> Damaged MP3s are extremely hard to fix, most of the
> programs that claim to do so are more harmful than
> beneficial.

although i have fixed already from five to ten such files. such process is time consuming, requires a lot of additional info, but IS POSSIBLE. hex-editor was/is my main tool :). later i've found mp3utility (http://www.geocities.com/mp3utility), which i want to recommend to all more-than-beginner users.

and of course, yours is truth -- no one application i saw was able to fix it. though i have seen very small number of applications, claiming such facts. :-)


> Getting the file again is generally the best solution...

don't you think a person, able to retry getting of lost info, would not ask for such plugin ;-) ? ok, your last statement is clearly ideal solution, although i still am not so sure it is very practical in all cases.


so. any ideas more about repairing really damaged still full mp3-tracks? i can provide more than single dozen of such examples :-]

ggggod, will it be me who will begin work on such project ;-) ?
saulius2 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Winamp > Winamp Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump