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: Clipping (Read 3438 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Clipping

Well, 90% of my MP3s have clippings. Everyone is going to tell me, that you canot hear them, but they do not represent the music for a fraction of a second as intendet to be, and may produce disortions. But that's not the thing I want to discuss here.

What I'm interested in is:

Would it be possible to avoid clippings if the encoder, would decode the currently encoded frame and look for clipings and if they occur produce an alternative frame eg. with reduced volume (maybe only for some frequencies)?

Clipping

Reply #1
Quote
... but they do not represent the music for a fraction of a second as intendet to be, ...

... produce an alternative frame eg. with reduced volume (maybe only for some frequencies)?

single frames with reduced volume or some frequencies lowered won't 'represent the music for a fraction of a second as intended to be' either.

I think it's possible. With Mp3DirectCut you can change the volume of single frames (losslessly), but of course not automatically to avoid clipping. Some kind of combination of both programs would be necessary.

Anyway, I doubt that many fast volume changes will sound nice.
Let's suppose that rain washes out a picnic. Who is feeling negative? The rain? Or YOU? What's causing the negative feeling? The rain or your reaction? - Anthony De Mello

Clipping

Reply #2
Quote
Would it be possible to avoid clippings if the encoder, would decode the currently encoded frame and look for clipings and if they occur produce an alternative frame eg. with reduced volume (maybe only for some frequencies)?

As tigre says, once there is going to be clipping, anything you do won't 'represent the music for a fraction of a second as intended to be'. In this case, the only thing you can to is "soften" this clipping in order to make it as audibly bening as possible. Foobar2000 Advanced Limiter does just that, when it detects there is going to be clipping, it reduces the output level for a fraction of time so that hard clipping doesn't happen.

If you don't wan't any clipping to happen, you just have to avoid it, be it by use of automatic replaygain peak calculation, or just attenuating the whole output a few dBs. This last solution is currently factible only with Foobar2000. If you attenuate the output just 2 or 3 dB, most clipping goes away. If you reduce it a little bit more, all clipping goes away.

Clipping

Reply #3
Hm, the foobar-thing sounds interesting, but:
These solutions are post-processing solutions. I'm intersted in the question: How can the encoder (eg. LAME) be optimized to prevent clippings, during the encoding process (pre-processing).

So that 100% of the (with LAME) encoded MP3 have no clippings, without any further post-processing (like MP3Gain or limiter or whatshowever).

Clipping

Reply #4
You can use MP3Gain to reduce volume of your files in a lossless way. In most cases, lowering the volume by a couple of decibels will prevent clipping during decoding.

Clipping

Reply #5
>>>'Well, 90% of my MP3s have clippings. Everyone is going to tell me, that you canot hear them, but they do not represent the music for a fraction of a second as intendet to be, and may produce disortions. But that's not the thing I want to discuss here.'<<<

well, this is a very controversial topic, especially nowadays when CDs are master so loudly. if you can hear the distortion, then worry. but as long as you can't hear it, let it be and enjoy the music. either way you can't do anything about clipping once it's in the finished product

>>>'Would it be possible to avoid clippings if the encoder, would decode the currently encoded frame and look for clipings and if they occur produce an alternative frame eg. with reduced volume (maybe only for some frequencies)?'<<<

exactly how engineers define clipping nowadays is beyond me. when you say "look for clipings", i assume you mean the peaks where the "over" indicators go on. well, as long as your audio files are in the mp3 "domain", tools like mp3gain and mp3directcut will only eliminate the distortion introduced by the mp3 encoding process

however, if the original source is clipped, then there is nothing you can about the distortion resulting from clipping. even if you reduce the levels with a wave editor or tools like mp3gain, the distortion which is present in the original (and whatever remains of it after the mp3 encoding process) will not be eliminated. this is why i say ignore the theoretical aspect of clipping and pay attention to what you hear, not see

hope i answered your question
Be healthy, be kind, grow rich and prosper

Clipping

Reply #6
Quote
well, this is a very controversial topic, especially nowadays when CDs are master so loudly. if you can hear the distortion, then worry. but as long as you can't hear it, let it be and enjoy the music. either way you can't do anything about clipping once it's in the finished product

however, if the original source is clipped, then there is nothing you can about the distortion resulting from clipping. even if you reduce the levels with a wave editor or tools like mp3gain, the distortion which is present in the original (and whatever remains of it after the mp3 encoding process) will not be eliminated. this is why i say ignore the theoretical aspect of clipping and pay attention to what you hear, not see

Right!

For all those, who don't know what clipping really is and fear it  here some useful links on the topic:

http://www.digido.com/portal/pmodule_id=11...der_page_id=36/
http://www.digido.com/portal/pmodule_id=11...der_page_id=59/

And please, use your ears, clipping is really not good, but it's not so terrible (in most cases) as some "experts" here would say... 

 

Clipping

Reply #7
Quote
So that 100% of the (with LAME) encoded MP3 have no clippings, without any further post-processing (like MP3Gain or limiter or whatshowever).

The clipping is not due to the encoder, but due to the fixed-point digital nature of the data we are playing.

Any solution you take, either at encoding or decoding process, will involve either some kind of softening (but not avoding) the clipping (as I said at my previous post), or avoiding it by reducing the output playback level, be it automatically (equivalent to replaygaining) or manually (equvalent to reducing output level by a fixed amount in FB2K).

I don't think there is a proper turnaround over this. The only turnaround I can think of would be something like not processing (compressing) data that is going to clip after being compressed/decompressed. This data would have to remain unaltered in order to avoid any possibility of clipping due to the compression/decompression process.