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 In Lossless Audio Files (Read 8896 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Clipping In Lossless Audio Files

Do Lossless formats suffer from digital clipping (ape, FLAC, etc), and if so, is there any way to use a program like Mp3gain for FLAC to prevent clipping? any info would be appreciated
thanks  B)

Clipping In Lossless Audio Files

Reply #1
Don't have that problem here i use only ape to encode my files, maybe a soundcard driver problem? ripping problem?
Made in Portugal

Clipping In Lossless Audio Files

Reply #2
Loseless will suffer from clipping in exactly the same places as original files.
If it suffers more / less (hence it modified some samples) it isn't loseless anymore...

Messer

Clipping In Lossless Audio Files

Reply #3
Quote
Do Lossless formats suffer from digital clipping (ape, FLAC, etc)

Not unless there's a bug.  What goes in must come out the same.  Note that if the input has clipping so will the output.

Josh

Clipping In Lossless Audio Files

Reply #4
Quote
Not unless there's a bug.  What goes in must come out the same.  Note that if the input has clipping so will the output.

Josh

thank you for the info, is there any way to "maximize" a WAVE file and prevent clipping before I compress to FLAC? Is there any programs like Mp3gain which do the same thing only for Wave or FLAC files?
-Andrew-

Clipping In Lossless Audio Files

Reply #5
wavegain (4wav):

http://www.inf.ufpr.br/~rja00/others.html

Quote
is there any way to use a program like Mp3gain for FLAC to prevent clipping?

flac should be the same as original, so there is no point in using that tool for that purpose.
PANIC: CPU 1: Cache Error (unrecoverable - dcache data) Eframe = 0x90000000208cf3b8
NOTICE - cpu 0 didn't dump TLB, may be hung

Clipping In Lossless Audio Files

Reply #6
Quote
is there any way to "maximize" a WAVE file and prevent clipping before I compress to FLAC? Is there any programs like Mp3gain which do the same thing only for Wave or FLAC files?


For WAVE there is WaveGain (don't have the link handy but search around here) but that is not a lossless process.

FLAC now has ReplayGain support in CVS (will be in the 1.0.5 release) so if you are going to compress from WAVE to FLAC, you don't need to run WaveGain, you will do something like:

Code: [Select]
flac --replay-gain *.wav


and it will automatically compute the gains/peaks and store in the tags.  Then when you play the file with ReplayGain mode turned on, the plugin has an option to hard limit to avoid clipping.

Josh

Clipping In Lossless Audio Files

Reply #7
Quote
thank you for the info, is there any way to "maximize" a WAVE file and prevent clipping before I compress to FLAC?

Switch to lossy first (I suggest MPC). IMO the only point in using losless would be NOT altering the original.

Clipping In Lossless Audio Files

Reply #8
Quote
Switch to lossy first (I suggest MPC). IMO the only point in using losless would be NOT altering the original.

I know, so does this mean it's better to just encode to FLAC and leave the file untouched even if it clips? I'm a little confused about this, is clipping even a problem if your using foobar2000 to play flac files?

Clipping In Lossless Audio Files

Reply #9
Quote
I know, so does this mean it's better to just encode to FLAC and leave the file untouched even if it clips?


If the FLAC file clips, that means the CD source it came from was also clipped - the clipping is NOT introduced by the encoding/decoding process (otherwise, as stated above, it wouldn't be lossless compression anymore). Clipping that was already on the CD can't at all be eliminated by ReplayGain (i.e., scaling down the output), ReplayGain would just make it non-fullscale clipping. The only way to actually remove it would be to use some audio restauration software.

So in other words, the FLAC file will have some sort of clipping (unless you fire up professional restauration software), ReplayGain won't make a difference - which means you should rather leave the files untouched.

Clipping In Lossless Audio Files

Reply #10
lossy, eh?

flac for lossless archiving, replaygain for playback comfort - i fail to see any contradictions here..
A riddle is a short sword attached to the next 2000 years.

Clipping In Lossless Audio Files

Reply #11
I've been getting what I think is clipping in my my .ape encoding.  My wav files rip with EAC and play perfectly.  When I encode to high or extra high in Monkey's, I get ticking sounds like scratches on my old albums.  I'm encoding from inside EAC.  Am I doing something wrong?  This didn't happen with LAME -extreme.

I'm trying to archive, and play, my CD and album collection.  Should I be using another encoding format?  I did read a thread about some people having corrupt files with .ape.  I did notice a quality difference between LAME -extreme and the lossless encoding.  I would also like to have original files in case I ever needed to decode to recreate the CD's.

If I'm asking a dumb question that I should be looking elsewhere... sorry.  I've been reading for a while but new here as of an hour ago.

thanks for any info, or proper areas to direct my questions..

Clipping In Lossless Audio Files

Reply #12
Quote
IMO the only point in using losless would be NOT altering the original.

That's exactly what Lossles compression does - NOT altering the original! Just compressing it, making it smaller.


Clipping In Lossless Audio Files

Reply #13
Quote
I've been getting what I think is clipping in my my .ape encoding.  My wav files rip with EAC and play perfectly.  When I encode to high or extra high in Monkey's, I get ticking sounds like scratches on my old albums.  I'm encoding from inside EAC.  Am I doing something wrong?  This didn't happen with LAME -extreme.

Sounds like playback skipping. What's your computer specs? Which player (and plug-in)?

I suspect you are using Monkey's extra-high mode. This consumes a lot of CPU power and generally makes realtime playback skippy on less than the fastest machines. You might try normal mode on some files to see if it helps your problem.

MP3 doesn't require much power to decode during playback and WAV uses even less, hence they don't skip.
"Something bothering you, Mister Spock?"

Clipping In Lossless Audio Files

Reply #14
Quote
Quote
I've been getting what I think is clipping in my my .ape encoding.  My wav files rip with EAC and play perfectly.  When I encode to high or extra high in Monkey's, I get ticking sounds like scratches on my old albums.  I'm encoding from inside EAC.  Am I doing something wrong?  This didn't happen with LAME -extreme.

Sounds like playback skipping. What's your computer specs? Which player (and plug-in)?

I suspect you are using Monkey's extra-high mode. This consumes a lot of CPU power and generally makes realtime playback skippy on less than the fastest machines. You might try normal mode on some files to see if it helps your problem.

MP3 doesn't require much power to decode during playback and WAV uses even less, hence they don't skip.

I'm using a Celeron 1.1GHz with 512MB of SDRAM as my workstation at work.  I'm playing them with Winamp 2.81 and the ape plugin.  I tried using both high and extra-high modes.  I haven't compared if there's a difference between the two modes, but both do cause problems.

My machine at home is a P4 2.53GHz with 512MB of PC333 DDR RAM.  I'll try it there and see if I have the same problems.

Would I have less of these clipping issues with another format... ie FLAC?  Is there a plugin for Winamp?  I like the Monkey's format as it seems quite common and  easy to use.  With the development of Linux and OS X version, it should really open it up further.

thanks again for the help...

Clipping In Lossless Audio Files

Reply #15
you shouldn't have any clipping problems at all with ape..  if you are worried about corruption (though i don't think you should be overly concerned), you can use the 'verify' command in the monkey gui to make sure they are ok.

as for what you are hearing: check the task manager to see what kind of cpu usage you are getting while listening to ape.  even on extra high, my system is around 15-20%, but if somehow your celeron is getting near 100% peaks, then thats the cause of your problems, and you need to use normal or fast mode in ape.  also, if you are maxing out your system, you might actually be better off with flac, as I hear it has very low cpu consumption.

Clipping In Lossless Audio Files

Reply #16
Quote
Would I have less of these clipping issues with another format... ie FLAC?

NO.

A clipping is caused by distorsions in the signal. There's no distorsion introduced by APE/FLAC because they are lossless ! The opposite would be like having a change after zipping a word file.. that's nonsense, unless something with the hardware/software is VERY wrong !

If you want to check that Monkey's Audio really doesn't introduce "clipping", just keep the original WAV before encoding, then decode and compare. If you find a difference, you can start to worry.

By the way, tools such as replaygain can be used to improve comfort by adjusting volume levels on playback.
Because the playback volume is usually lowered by replaygain, it can help to remove the clipping caused by:
- *lossy* audio compression (mpc,mp3,aac,ogg,...)
- digital signal processing (reverb, echoes, etc).
- but NOT lossless codecs.

Clipping In Lossless Audio Files

Reply #17
I am not definitely sure, but sometimes defragmenting the disk can be a kind of a help...

Clipping In Lossless Audio Files

Reply #18
Quote
check the task manager to see what kind of cpu usage you are getting while listening to ape.  even on extra high, my system is around 15-20%, but if somehow your celeron is getting near 100% peaks, then thats the cause of your problems, and you need to use normal or fast mode in ape.  also, if you are maxing out your system, you might actually be better off with flac, as I hear it has very low cpu consumption.

Duuuhh... I realized that my workstation that I rip and encode on is the Celeron, but I copy them across the network to my "MP3" machine that does the playback.  It's a PII 300 with 256MB of SDRAM.  It is running from 40-60% and higher with .ape files.  The .wav file of the same song is only 10%, and plays cleanly.  The .ape files do play cleanly on the Celeron, so it's not the files.

I suppose the question now is whether to change encoding formats, or get a faster machine.  If one was to stay with Monkey's, will this issue be a problem if they ever have portable players (without enough processing power) for this format?

Clipping In Lossless Audio Files

Reply #19
your cpu needs to spike to a full 100% to get glitches.  40-60% sounds fine.  maybe try another player?  Also, monkey used with 'fast' or 'normal' settings decodes very fast, almost as quickly as flac.

Clipping In Lossless Audio Files

Reply #20
Quote
your cpu needs to spike to a full 100% to get glitches.  40-60% sounds fine.  maybe try another player?  Also, monkey used with 'fast' or 'normal' settings decodes very fast, almost as quickly as flac.

Any suggestions for a player, besides winamp, that works well with .ape files?

Will Monkey in 'fast' or 'normal' mode use less CPU time?  How much in compression will you lose from 'high' and 'extra high'?

Clipping In Lossless Audio Files

Reply #21
Quote
Quote
your cpu needs to spike to a full 100% to get glitches.  40-60% sounds fine.  maybe try another player?  Also, monkey used with 'fast' or 'normal' settings decodes very fast, almost as quickly as flac.


Will Monkey in 'fast' or 'normal' mode use less CPU time?  How much in compression will you lose from 'high' and 'extra high'?

See the summary tables (which include decode times) here:

http://flac.sourceforge.net/comparison.html

Clipping In Lossless Audio Files

Reply #22
Quote
Quote
your cpu needs to spike to a full 100% to get glitches.  40-60% sounds fine.  maybe try another player?  Also, monkey used with 'fast' or 'normal' settings decodes very fast, almost as quickly as flac.


Will Monkey in 'fast' or 'normal' mode use less CPU time?  How much in compression will you lose from 'high' and 'extra high'?

See the summary tables (which include decode times) here:

http://flac.sourceforge.net/comparison.html

Clipping In Lossless Audio Files

Reply #23
Quote
Any suggestions for a player, besides winamp, that works well with .ape files?

The obvious next choice is foobar2k.  There are a few others, such as media jukebox, but I never use them and have no clue if they will be any better/worse.

Clipping In Lossless Audio Files

Reply #24
Quote
Quote
Any suggestions for a player, besides winamp, that works well with .ape files?

The obvious next choice is foobar2k.  There are a few others, such as media jukebox, but I never use them and have no clue if they will be any better/worse.

The saga continues... Before I start posting questions in a FLAC thread, I thought I would pass along this bit of information.  I tried Foobar2k to test out my .ape files.  I tried "high" and "normal" compression, as well as the .wav file.  I still got the "ticking" sound in both compressions, but it did seem a little less in "normal".  There was no "ticking" in the .wav.  This is where it's interesting.  The "high" compression ran about 15-25% CPU usage, "normal" about 3-10%, and .wav file 10-25%.  The "normal" file appeared to be the easiest on the CPU, but still caused the distortion.  Although it's not supposed to be the compression that causes the problem, indicators seem to point that direction.  The LAME -extreme version plays just fine.

I might try FLAC for comparison.  What would be a recommended command line parameter?  It appears that default would be fine, but I can't seem to locate a list of actual values to enter.  I see that I can use EAC for this by tricking it to think it's a different encoder.

Last minute addition... I did try Monkey's "fast" and the problem is gone.  So the question is should I encode in "fast" just because this old machine can't handle it?  Is there really much of a diff between them? There doesn't seem to be a geat difference in file size between fast, normal and high.  What compression do most people use? Is there an app like Encspot to see what compression you've applied to existing .ape file?

A last note - I know this isn't the thread for this, but do I really notice the difference in audio quality between Foobar and Winamp, or is it in my head?

thanks again..