Skip to main content
Topic: Should I just cuff off frequencies above my audible range? And how do I do it? (Read 1788 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Should I just cuff off frequencies above my audible range? And how do I do it?

I discovered I can't much hear anything above 12kHz.

So I should just cut everything above 12kHz when converting to a lossy format? I am thinking the bits would then go to the audio below that frequency thus increasing the audio quality? Does this make sense? I will be mostly listening on my phone and computer.

And how do I cut off frequency range using ffmpeg or sox? Will there be loss of quality?

Re: Should I just cuff off frequencies above my audible range? And how do I do it?

Reply #1
depends if you're converting just for yourself and don't ever plan casually giving someone else a listen.
loss of quality = it depends what you mean, for you - maybe no, if you actually can't hear these frequencies at all. also, it depends whether filter roll-off is sharp enough to not touch audible range, and whether there's no clipping after the process.
> I am thinking the bits would then go to the audio below that frequency thus increasing the audio quality?
more likely, they will just save some space. probably not by a lot, since that range requires less precision anyway.

tl;dr it's probably not worth it to spend time on this, gains (if any) won't be big and if anyone else accidentally listens to these files they will be very surprised about why someone did that

Re: Should I just cuff off frequencies above my audible range? And how do I do it?

Reply #2
What settings do you use today?
Resampling to 32 kHz removes everything from 16 kHz, and resampling to 24 kHz removes everything from 12 kHz (or, slightly below). According to the wiki, LAME resamples at lower (that is higher "V") settings: http://wiki.hydrogenaud.io/index.php?title=LAME#Resampling - I can only guess that it won't if the input is already at this sample rate.
But according to the discussion referenced in the footnote, LAME's resampler isn't (/wasn't?) particularly good.

Of course, don't resample if your target device can't handle the format ...

High Voltage socket-nose-avatar

Re: Should I just cuff off frequencies above my audible range? And how do I do it?

Reply #3
Quote
I am thinking the bits would then go to the audio below that frequency thus increasing the audio quality? Does this make sense?
If you are "pushing the limits" and using a low-bitrate to get the smallest-possible files it will probably help.   

At higher bitrate/quality settings the sound should be "audibly perfect" with most program material already so you can't "improve" on that!    And, if you are hearing compression artifacts at higher bitrates those kind of artifacts are probably not going-away no matter what you do.  (With MP3 and other lossy compression there are certain artifacts unrelated to bitrate.)

Quote
And how do I cut off frequency range using ffmpeg or sox? Will there be loss of quality?
There should only be a loss of high frequencies.  There shouldn't be any side-effects.   

Re: Should I just cuff off frequencies above my audible range? And how do I do it?

Reply #4
What settings do you use today?

Code: [Select]
ffmpeg -i IN.flac -bitrate 120 -cutoff 12000 OUT.opus

Also `opusenc` itself doesn't have this `cutoff` option. I am looking for a way to ask ffmpeg to cuttoff a frequency range and feed it to `opusenc`. Because when using `cutoff` the encoding speed drops from 40x to 12x.

I am mostly going with OPUS so sample rate is always 48kHz.

Re: Should I just cuff off frequencies above my audible range? And how do I do it?

Reply #5
There should only be a loss of high frequencies.  There shouldn't be any side-effects.   

So something like

Code: [Select]
sox IN.flac OUT.flac sinc -12000

or

Code: [Select]
sox IN.flac OUT.flac lowpass 12000

doesn't decrease quality?

Any other better way to do it?

I thought LPFs normally introduce artifacts throughout the audio.

l also I am try to find the most efficient bitrate for OPUS. Perusing this forum suggests it is 128 kbps.

Re: Should I just cuff off frequencies above my audible range? And how do I do it?

Reply #6
also, it depends whether filter roll-off is sharp enough to not touch audible range, and whether there's no clipping after the process.

This exactly. Any way to make sure there is no clipping and the below frequencies are not touched?

As far as I know decreasing gain works:

Code: [Select]
sox IN.flac OUT.flac gain -1 sinc -12000

But I am guessing there is a much better way to do it. And don't even know where to begin with ffmpeg.

>more likely, they will just save some space. probably not by a lot, since that range requires less precision anyway.


This is very interesting... I have checked with OPUS and no there is no space being saved. I just thought the lower frequencies are getting more bits.

Re: Should I just cuff off frequencies above my audible range? And how do I do it?

Reply #7
Quote
I thought LPFs normally introduce artifacts throughout the audio.
Filtering is mathematically imperfect (and irreversible) but there are rarely audible side effects.    Filtering and equalization (and volume adjustments) are done everyday in audio production and they are not considered to be lossy processes.

And heck, you've already decided to use lossy compression....

(I can't help with SoX, or FFmpeg from the command line.)

Re: Should I just cuff off frequencies above my audible range? And how do I do it?

Reply #8
Encoders should be able to handle high frequencies themselves, lowpassing them and encoding with lower precision to stay at their target efficiency spot.
If your personal efficiency spot lies elsewhere :) then sure you can lowpass or resample them - then there will be more bits available for lower frequencies which you hear well. Then maybe YOU can even target lower bitrates while having things still sound good.
Most encoders are best tuned for 44,1 kHz & 48kHz material, some of them do resampling themselves again, so lowpassing might be a lil bit safer...

Re: Should I just cuff off frequencies above my audible range? And how do I do it?

Reply #9
After reading the replies I have decided not to cutoff any frequencies and leave them as they are.


Re: Should I just cuff off frequencies above my audible range? And how do I do it?

Reply #11
Haha!

Re: Should I just cuff off frequencies above my audible range? And how do I do it?

Reply #12
Maybe its a good thing to leave a bit extra above your hearing. A trouble spot is worst in your range than outside.  The encoder might shove the distortion into the less audiable HF - a good thing if your HF deaf.
wavpack 4.8 -b3hx4c

 
SimplePortal 1.0.0 RC1 © 2008-2019