INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Encoding\Compression Theory Question For You Guys  (Read 1751 times)

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5907
  • Farm Animal Stupid
Encoding\Compression Theory Question For You Guys
« on: March 22, 2002, 11:52:40 am »

The Situation : I have a 128kbps MP3 that I just downloaded. It has some garbage at the very end of it, after even the silence. It's really obnoxious.

What I'd Like To Do : I'd like to open it up in Media Editor and remove the offending section of the track. However, since I know that decoding an MP3 to WAV (in order to edit it) and then re-encoding it to MP3 is a bad thing, I'm thinking of just recompressing it to APE.

My Theory : What you hear when you play an MP3 is just the WAV file that results when you decode that WAV file. Therefore a WAV file from an MP3 will sound identical to the MP3. Thus converting that MP3 file to APE will result in an APE that sounds identical to the MP3, thus, in my case, saving the WAV in Media Editor to APE will sound identical to the original MP3.

Am I totally missing something here or does this sound right (no pun intended)?
Logged

Xstatic

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 436
RE:Encoding\Compression Theory Question For You Guys
« Reply #1 on: March 22, 2002, 12:21:19 pm »

sounds right and logical to me
Logged

Severian

  • Guest
RE:Encoding\Compression Theory Question For You Guys
« Reply #2 on: March 22, 2002, 12:34:39 pm »

How do you know that uncompressing and recompressing is a bad thing? I'm totally ignorant here, but if you did the same thing from JPEG to BMP and then back to JPEG with same compressor and options set, you'd end up with the same bundle of pixels. Audio compression works not the same basic way? What's up with that. You think that your trimming the end will put you in a whole new twilight zone of recompression, that you'll have changed the source that much?
Logged

ZRocker

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1257
RE:Encoding\Compression Theory Question For You Guys
« Reply #3 on: March 22, 2002, 01:07:36 pm »

Doof...fix it easily with mp3Trim without re-encoding.
Logged

Michael Horton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 776
RE:Encoding\Compression Theory Question For You Guys
« Reply #4 on: March 22, 2002, 01:14:47 pm »

My guess is this: If you rip a file from CD to wav, you start with the full version (all the little sound bits in place) and end with the full version, but then many of the little sound bits are lost in encoding the wav to Mp3. When you convert that mp3 back to wav, you don't have the quality of the original wav--the original sound is lost, because all the little unnecessary sound bits were lost during the first encoding. But the wav file is still going to be much larger than the mp3. Now when you encode from wav back to mp3 again, sound bits will once again have to be removed at the discretion of the encoder. The question really is--would those bits that are removed be identical to those put in when decoding the mp3 to wav? If not, the sound quality of the second encoded mp3 would be worse than the original encoded mp3. Severian, you said "uncompressing and recompressing" and that's important. Mp3 doesn't compress the bits, it tosses them completely away. They're gone for good. Can't get 'em back without re-ripping the CD. That's why Doof wants to wind up going from wav to ape--ape compresses, rather than eliminating bits as mp3 does.
Logged

Severian

  • Guest
RE:Encoding\Compression Theory Question For You Guys
« Reply #5 on: March 22, 2002, 01:35:41 pm »

OK, compression can mean an alternate storage method as well as discarding, that is so. I think I'm going to have to explore my underlying assumptions about compression. I can see that what you're saying is so if the algorithm is more 'smart' than the way I conceive of most JPEG encoders working and MP3 instead is going all the way down to the source again and making it take a quality hit again.

So if this is the case, and I decide to go a little nuts when I've got too much time on my hands, and I take the same file and go from .MP3 to .WAV and back again, you're saying that after a few iterations of that I'll have just a bunch of unlistenable noise, is that right? Because it would theoretically get re and re and re compressed.
Logged

Michael Horton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 776
RE:Encoding\Compression Theory Question For You Guys
« Reply #6 on: March 22, 2002, 01:51:40 pm »

Sererian

I think of compression (as in Ape) in this context as being like a trash compactor. When you compact the trash, the machine does not toss some of the trash out in the process, it takes all the trash and organizes it more efficiently, so that it takes up less room. MP3 is more like the big stakebed gardening truck driving down the street spewing debris here and there as it goes along, so that by the time it reaches the dump the load is taking up less room, but it left a mess in its wake all along the path.

>>you're saying that after a few iterations of that I'll have just a bunch of unlistenable noise, is that right? Because it would theoretically get re and re and re compressed.

I'm not saying that, but I think Doof is saying that. Doof and I discussed this briefly in another thread some time ago. I don't know how smart encoders are. They have some method of deciding what part of the sound is extraneous, and so to me, the blank carrier noise added to make the second wav file would have to fall under the encoder's definition of superfluous. But who knows? Others have suggested that its like a cassette--a copy of a copy of a copy sounds way worse than the original. I have my doubts that this example applies to the digital medium.
Logged

KingSparta

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 20054
RE:Encoding\Compression Theory Question For You Guys
« Reply #7 on: March 22, 2002, 02:43:39 pm »

>> I think of compression in this context as being like a trash compactor.
i heard a story on the radio a month ago, where someone broke into a home and he or she heard someone coming so he or she hid in the trash compactor.

the problem was when the door shut the compactor compacted.
Logged
Retired Military, Airborne, Air Assault, And Flight Wings.
Model Trains, Internet, Ham Radio
https://MyAAGrapevines.com
https://centercitybbs.com
Fayetteville, NC, USA

gvag

  • Guest
RE:Encoding\Compression Theory Question For You Guys
« Reply #8 on: March 22, 2002, 03:11:05 pm »

I'm a newbie but from what I've learned so far and MJ's own help file, every time you go thru an decode/encode process you will loose some of the quality.  This applies even to working with one wave file and carrying out a series of edit on it.  I have DCart32 which is a program for cleaning up vinyl rips hissing, pops, clicks etc but they recommend using their platinum version which will apply a number of filters in one pass which will result in a better quality file than applying the same filters sequentially.

As to the original question which was cleaning up some unwanted garbage at the end of an MP3 file I would suggest you take a look at mp3DirectCut - www.rz.uni-frankfurt.de/~pesch, its freeware and the best direct MP3 cutter I've found (I evaluated at least 5 or 6 before settling on DirectCut).  The advantage here is that there is no decode/encode process involved so there is no degredation of the sound quality.  If all you need to do is split/splice files I don't think there's anything better at this price .  Its really great for getting the tracks out of entire album MP3's.

Hope this helps,
George
Logged

Trelane

  • Regular Member
  • World Citizen
  • ***
  • Posts: 142
  • Destroy him, my robots.
RE:Encoding\Compression Theory Question For You Guys
« Reply #9 on: March 22, 2002, 04:16:51 pm »

Lossless compression (APE) never throws away data, so reencode to your hearts desire.

Lossy compression (such as MP3) throws away data. Each reencode will throw away more and more data. Decode a 128 kbps file and reencode it at 128 kbps again. It'll sound like crap... if it doesn't, turn the volume up on your Miracle Ear a little bit! Next Page

Doof:
Your process sounds good. However, there are some tools available that'll trim the ends off MP3 files without decoding them, so there's no quality loss from the original MP3 file. I couldn't tell you what the names of them are, but I _think_ one of more popular tools is called mp3Trim.

Mike
Logged

Trelane

  • Regular Member
  • World Citizen
  • ***
  • Posts: 142
  • Destroy him, my robots.
RE:Encoding\Compression Theory Question For You Guys
« Reply #10 on: March 22, 2002, 04:18:11 pm »

Whoops, I did not see Gvag's post Next Page
Logged

zevele1

  • Guest
RE:Encoding\Compression Theory Question For You Guys
« Reply #11 on: March 23, 2002, 05:15:02 am »

Not my guess,but a fact.  mp3 back to wav DO NOT give you the same wav than the one you got from the cd to wav.Beside this you get a better sound with the wav from the mp3 than from the mp3,because you get back some "stereo picture".The higger the mp3,the better the redbook cd.
I allways send 320kps mp3 to friends,family.Like it they get cdredbook very close to original
You still can put many albums on a cd with mp3 320kps on it
Listening to it in an other hand,more than 192kps i do not see any difference

But,once you have a song on mp3,the only thing you can do is encode at a smaller bitrate.
Let say if you got an album from a p2p with songs at 128-192-320.The ONLY way is "all to 128kps".All to 192 or320 will give you a kind of puree.And 128  mp3 to wav,wav to mp3 192 or 320 is a waste of time
Logged

Severian

  • Guest
RE:Encoding\Compression Theory Question For You Guys
« Reply #12 on: March 23, 2002, 07:40:17 am »

I think I'm going to have to try this for my bad self one of these days: Take the opening minute of "Little Fluffy Clouds" and uncompress and recompress it about 20 times and we'll see how little and fluffy it gets.
Logged

Doof

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5907
  • Farm Animal Stupid
RE:Encoding\Compression Theory Question For You Guys
« Reply #13 on: March 24, 2002, 10:17:00 am »

Severian> I did exactly that, encoding/reecoding a file to and from WMA (I can't remember why exactly, but there was a reason I didn't do it to MP3 - I think it was just easier to do it with WMA). After a bunch of iterations, the difference was astounding. There was all sorts of noise in the resulting file. I posted a link to the two files here a while back, but I'm not sure if anybody downloaded them. I've since deleted them. Maybe I'll do it again and post the results here again...
Logged
Pages: [1]   Go Up