Help - Search - Members - Calendar
Full Version: Better support for alternate sampling frequncies?
Hydrogenaudio Forums > Lossy Audio Compression > Ogg Vorbis > Ogg Vorbis - General
384kbps
Hi - When i'm 'forced' to make quite small OGG files around 80kbps
i like to use a sampling frequency like 35280 Hz (4/5 of 44.1 kHz).

In my eyes (ears) 32kHz is to aggressive and a HiFi sampling frequency
like 44100 Hz doesn't look really suitable on a 80kbps OGG file.


But now i get into trouble when i try to use a tool like VorbisGain
that only supports the old-known standard sampling frequencies.

Is there any way to solve this problem?
Thanks, 384kbps
JeanLuc
Why would anyone use sampling frequencies that are way off the standards ? blink.gif
Latexxx
Are you sure that you aren't just hearing artifacts from crappy upsampling produced by your soundcard?
384kbps
QUOTE(JeanLuc @ Nov 22 2003, 07:29 PM)
Why would anyone use sampling frequencies that are way off the standards ? blink.gif

As You know maybe there is a quite famous 'sampling rate theorem'
that says the sampling rate should be 2x bigger than the frequency
spectrum you wish to here.
I guess, OGG as many other audio formats too pays respect to this!

So when i take 35280Hz, there should be 'left' frequencies up to 17kHz
that suits fine for my low quality OGGs.
An OGG with a sampling rate of 32kHz sounds quite fast like heard
through a tube or played over a telephone wire. The further reduction
by 1-2kHz on 15-16kHz on max. seems to make them audibly worse.


QUOTE(Latexxx @ Nov 22 2003, 09:38 PM)
Are you sure that you aren't just hearing artifacts from crappy upsampling produced by your soundcard?

The 35kHz-OGGs sound fine to me. Here i surely don't have any sound card problems.
But the 32kHz OGGs sound as bad on a Creative sound card as on my Nvidia chip.




For a long time a have missed a sampling frequency between 44 and 32 kHz
and thought OGG would be the solution.
But the incompatibility to ReplayGain tools like VorbisGain weaks my pleasure...

384kbps
Xenno
Is the reason your doing this is just to save space? Let's say we take a 44kHz file which is, say, 5 MB in size and resample @ 35 kHz. The new file may be 3.5 to 4 MB in size. Now let's encode the original track at some -q number whose file size is approximately the same as the 35 kHz'er. Which will sound better? I'll wager that the 44 kHz -q x does.

xen-uno
ErikS
Even easier would be to just lowpass filter the non resampled file before (or at) encoding. There is an "advanced" encoding option for that in oggenc. From what I heard the space saved by also lowering the sampling frequency is minimal.
384kbps
QUOTE(Xenno @ Nov 23 2003, 03:15 AM)
Is the reason your doing this is just to save space?

Yes - Small OGGs for a small Notebook with 'small' headphones.
35.3kHz is 80% of 44.1kHz. So 20% less samples per second simply
need 20% less space and the more i can reduce the '-q #'
In this 'space reduced' case i can't see any reason why to scan/sample
a source more often than really needed. And how much samples there
should be depends on the frequencies i wish to hear.


QUOTE(Xenno @ Nov 23 2003, 03:15 AM)
Let's say we take a 44kHz file whch is, say, 5 MB in size and resample @ 35 kHz

Only 'in case of emergency' i use a ~10MB big OGG i have encoded with '-q 8'.
As source i generally prefer WAV/CD or lossess compressed WV/FLAC/APE files*.


384kbps

(*they consume some harddisks but.... MP3 'gets old', i wait for something
like a merger of OGG Vorbis Lib 1.1 and the Garf Tunings smile.gif and AAC would
be fine but i distrust mostly due to its commercial background...)
ErikS
QUOTE(384kbps @ Nov 23 2003, 09:38 AM)
So when i take 35280Hz, there should be 'left' frequencies up to 17kHz
that suits fine for my low quality OGGs.
An OGG with a sampling rate of 32kHz sounds quite fast like heard
through a tube or played over a telephone wire. The further reduction
by 1-2kHz on 15-16kHz on max. seems to make them audibly worse.

Now, how much actual tests have you done with this? When you use the --resample option in oggenc the lowpass is set to 15kHz by default at -q3. When I compared -q3 --resample 35280 vs. -q3 --advanced-encode-option lowpass_frequency=15 they produced very similar bitrates, with the latter about 2% bigger. But the sound quality of the latter was much better also. I would recommend you to stick with the lowpass filter only...

Oh, by the way, the replaygain function in foobar seems to work fine with this sampling rate. I read some post from Peter that he will release his modifications of the replaygain source soon, so hopefully this will make it into the other rg tools.
384kbps
Indeed, my 35.3kHz hearing test aren't spread very widely.
My pocket calculator is quite faster in finding a 'good' encoding setting
than my ears claiming minutes or hours... wink.gif

So i will check and try once the enhanced encoding option you mention.
I guess 15kHz will be just a bit too less and i will need perhaps a higher one.
But some % or kB more don't really bother me.

Whatever the result will be, i thank You for this hint and for the notice
that foobar* supports the uncommon frequency of 35280Hz.

CU, 384kbps


(* Normally i don't use foobar.... - I encode OGG mostly in a batch mode.
I rip the CD as WAV, the batch mode than does 'CD-wide' gain changes with
WaveGain if needed, encode it and pass it to VorbisGain to set the ReplayGain.
Due to WaveGain the ReplayGain information is not really needed but some
players work better when they find it. )
KikeG
32 KHz sampling frequency will result into a lowpass at 16 KHz. Since most people won't hear a difference with most music, if only this lowpass was applied (try it), this should be more than enough in case of low bitrate encodings.
ErikS
QUOTE(KikeG @ Nov 24 2003, 03:45 AM)
32 KHz sampling frequency will result into a lowpass at 16 KHz. Since most people won't hear a difference with most music, if only this lowpass was applied (try it), this should be more than enough in case of low bitrate encodings.

True, but resampling should be done before encoding then. The resampling routine in oggenc seems to be inferior to e.g. ssrc.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.