View Full Version : Audio Frequency Question
bxyhxyh
27th June 2014, 14:06
Japanese audio is from the TrueHD 96 kHz track. The top half of the spectrum being actually empty, the track has been resampled to 48 kHz.
It is said by an anime fansubber.
So how can I know if audio frequency is real 96000 hz or not, and what filters or what tools can I use?
Guest
27th June 2014, 14:11
You can use an audio spectrum analyzer to see what content exists at different frequencies. You can find many of them with a Google search. Here is a random one:
http://download.cnet.com/Audio-Spectrum-Analyzer/3000-20432_4-75325061.html
Probably you can find others that accept more formats.
Overdrive80
27th June 2014, 14:13
Spek (http://spek.cc/) is a tool very useful for this
bxyhxyh
27th June 2014, 16:07
Ok, I'll check them. Thanks for your answers.
nhakobian
27th June 2014, 18:06
If a signal was sampled at 96kHz, you will never get any signal above a frequency of 48kHz (96kHz / 2). If a FFT shows you above 48kHz, it is in error. This is a result of the Nyquist sampling theorem (http://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem).
If the original raw source material contained information above 48kHz, the correct procedure would be to apply a filter to the content to make sure nothing appears above 48kHz. If they did not do this, the act of sampling (or re-sampling if converting from a different sample rate) itself would alias the frequencies above 48kHz to below 48kHz.
Now, if the source material does not have any signal above 24kHz, it would make sense to resample to 48kHz (24kHz * 2). Even if it did, the average person has trouble hearing anything above ~18kHz, with very few being able to hear anything above 20-22kHz.
One of the issues with archiving music/sound in MP3 format early on was that encoders applied a low-pass filter at about 16kHz (well below even the 44100Hz/2 = 22050Hz maximum frequency in the source). This filtered out a significant amount of the audio spectrum from audio cd's which made it non-ideal for archiving.
Now, the average person did not notice this since most portable devices couldn't produce sound at these frequencies anyways, but it was an issue. I believe that recent MP3 encoders (and I assume others like OGG and AAC) don't apply arbitrary frequency filters to make the data easier to compress.
Guest
27th June 2014, 18:13
Interesting! That suggests the anime fansubber made a boo-boo in his thinking.
nhakobian
27th June 2014, 18:34
Interesting! That suggests the anime fansubber made a boo-boo in his thinking.
Yup, exactly!
The fact that the spectrum analyzer even showed anything above 48kHz is curious. The Fourier transform (i.e. FFT, etc.) doesnt define any output above half the sample frequency. Most likely, the designers of the software expected people using it to understand the caveats.
An aside: This isn't 100% correct. For real valued inputs to a Fourier transform, it is. For complex valued inputs, the output range of a Fourier transform is -sample_rate/2 --> +sample_rate/2. For complex inputs to FFT's its even stranger: the output range is 0 to +sample_rate/2, then -sample_rate/2 to -1. Its an odd re-ordering of data to speed up calculations.
Complex valued inputs include things like FM radio and any transmitted tv signals; basically anything that can be electrically encoded (AM radio is encoded much like sound, so it doesn't apply to that). Digital data transmission really takes advantage of these techniques with things like QAM encodings (significantly greater data transmission rates than the sample rate).
Groucho2004
27th June 2014, 19:19
Interesting! That suggests the anime fansubber made a boo-boo in his thinking.
That may be so but nowhere in the first post is mentioned what spectrum this refers to. The sentence is out of context and Nyquist theorem may already have been taken into consideration.
Guest
27th June 2014, 19:40
And that's why I said "suggests".
suggest: "put forward for consideration"
Groucho2004
27th June 2014, 20:12
And that's why I said "suggests".
suggest: "put forward for consideration"
Thank you for the lesson :sly: and yes, I should have quoted nhakobian's assumption.The fact that the spectrum analyzer even showed anything above 48kHz is curious.
foxyshadis
27th June 2014, 23:57
If a signal was sampled at 96kHz, you will never get any signal above a frequency of 48kHz (96kHz / 2). If a FFT shows you above 48kHz, it is in error. This is a result of the Nyquist sampling theorem (http://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem).
If the original raw source material contained information above 48kHz, the correct procedure would be to apply a filter to the content to make sure nothing appears above 48kHz. If they did not do this, the act of sampling (or re-sampling if converting from a different sample rate) itself would alias the frequencies above 48kHz to below 48kHz.
Now, if the source material does not have any signal above 24kHz, it would make sense to resample to 48kHz (24kHz * 2). Even if it did, the average person has trouble hearing anything above ~18kHz, with very few being able to hear anything above 20-22kHz.
One of the issues with archiving music/sound in MP3 format early on was that encoders applied a low-pass filter at about 16kHz (well below even the 44100Hz/2 = 22050Hz maximum frequency in the source). This filtered out a significant amount of the audio spectrum from audio cd's which made it non-ideal for archiving.
Now, the average person did not notice this since most portable devices couldn't produce sound at these frequencies anyways, but it was an issue. I believe that recent MP3 encoders (and I assume others like OGG and AAC) don't apply arbitrary frequency filters to make the data easier to compress.
Sure they do. Opus has a soft lowpass from 16-20kHz. Vorbis has a hard lowpass from 13kHz on up depending on the quality level (http://www.hydrogenaud.io/forums/index.php?showtopic=15049&st=150&p=357461&#entry357461), most people will see it between 15-20kHz. Nero AAC has a soft lowpass from 16-20kHz. FAAC has a hard lowpass depending on bitrate (https://github.com/Arcen/faac/blob/master/libfaac/frame.c#L197), from 5-20kHz. Lame MP3 has always either hard or soft lowpassed from 16-18kHz or 18-20kHz, depending on the preset.
Naturally, almost all of them are configurable, except for Nero, but it's generally a bad idea to waste bits encoding anything above your hearing threshold.
nhakobian
28th June 2014, 02:54
Sure they do. Opus has a soft lowpass from 16-20kHz. Vorbis has a hard lowpass from 13kHz on up depending on the quality level (http://www.hydrogenaud.io/forums/index.php?showtopic=15049&st=150&p=357461&#entry357461), most people will see it between 15-20kHz. Nero AAC has a soft lowpass from 16-20kHz. FAAC has a hard lowpass depending on bitrate (https://github.com/Arcen/faac/blob/master/libfaac/frame.c#L197), from 5-20kHz. Lame MP3 has always either hard or soft lowpassed from 16-18kHz or 18-20kHz, depending on the preset.
Naturally, almost all of them are configurable, except for Nero, but it's generally a bad idea to waste bits encoding anything above your hearing threshold.
Thanks for clearing that up. I wasn't sure exactly what the numbers were. Obviously they would need some filtering. It makes perfect sense that it varies depending on preset/quality setting.
Motenai Yoda
28th June 2014, 15:05
some encoder doesn't do lowpass at all at high bitrate/quality (ie lame at v0 or 320)
It is said by an anime fansubber.
Don't waste time with them.
putting all fansubber in the same box sounds reasonable.:stupid:
hello_hello
7th July 2014, 13:18
LAME writes the lowpass filter information to the MP3. It can be viewed with MediaInfo. For example:
Audio
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Mode : Joint stereo
Mode extension : MS Stereo
Duration : 2mn 0s
Bit rate mode : Constant
Bit rate : 320 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 4.58 MiB (100%)
Writing library : LAME3.99r
Encoding settings : -m j -V 4 -q 2 -lowpass 20.5
Audio
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Mode : Joint stereo
Mode extension : MS Stereo
Duration : 2mn 0s
Bit rate mode : Variable
Bit rate : 170 Kbps
Minimum bit rate : 32.0 Kbps
Channel(s) : 2 channels
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 2.43 MiB (100%)
Writing library : LAME3.99r
Encoding settings : -m j -V 2 -q 0 -lowpass 18.5 --vbr-new -b 32
I had a feeling at least one of the AAC encoders I have installed did the same but it seems not, or maybe only when a lowpass frequency other than the default is specified in the commandline. My testing didn't extend that far....
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.