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: Converting to Opus: 44.1 kHz resampled to 48 kHz (Read 64872 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #25
Yes, I expected Opus to resample to 48 kHz internally. The question was more: if it does, will the CELT coder know that the input was upsampled from 32 kHz by the Speex resampler, and limit its encoding bandwidth to 16 kHz (the bandwidth of the original input file), or is the 20-kHz bandwidth of high-bitrate CELT hard-coded regardless of the input sampling rate?

Input sample rate doesn't seem to be get passed to the encoder (although it is used in the calculation of default bitrate, when user doesn't provide it via --bitrate).



Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #26
Yes, I expected Opus to resample to 48 kHz internally. The question was more: if it does, will the CELT coder know that the input was upsampled from 32 kHz by the Speex resampler, and limit its encoding bandwidth to 16 kHz (the bandwidth of the original input file), or is the 20-kHz bandwidth of high-bitrate CELT hard-coded regardless of the input sampling rate?


Opus doesn't actually have a mode for 16 kHz bandwidth (only 12 and 20). However, the new 1.1-alpha release has new code (it may not be 100% reliable) to avoid wasting bits on frequencies that aren't present in the signal being coded.

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #27
Thanks, guys. I'll wait for the 1.1 beta then. Too scared of alphas.

Chris
If I don't reply to your reply, it means I agree with you.

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #28
Chris, feel free to submit problematic samples for 1.1a. Experienced ears are required.


Also I'm planning to organize unofficial test of Opus 1.1a vs stable here on HA.

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #29
Why  48kHz?
If the lowpass frequency is 20kHz why not resample everything to 40kHz instead of 48.


Or why not a higher lowpass setting at higher bitrates? I doubt that 20kHz is a hard limit to everyone anyway. Some might hear a few kHz higher if its loud enough



Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #31
Doesn't the CELT layer work strictly at 48 kHz regardless of input sample rate?

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #32
I think the CELT layer in Opus (possibly not in the old CELT codec) works also at 24kHz sampling rate (12kHz bandwidth) - and this is used at least for the 8-12kHz part of the spectrum in the hybrid mode.

Dynamic – the artist formerly known as DickD

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #33
I think the CELT layer in Opus (possibly not in the old CELT codec) works also at 24kHz sampling rate (12kHz bandwidth) - and this is used at least for the 8-12kHz part of the spectrum in the hybrid mode.


No that is incorrect. In Opus, the CELT layer *always* works at 48 kHz, even if it's only coding a small part of the spectrum.

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #34
Something is still not clear to me: is the internal resampler always used even if the input is 48 kHz already ?

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #35
No, a resampler changes the sampling rate. If the rate is already correct there is nothing to change.

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #36
That's the theory, but does it *really* behaves that way in the OPUS encoder builds provided by the Xiph staff ?

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #37
That's the theory, but does it *really* behaves that way in the OPUS encoder builds provided by the Xiph staff ?


Yes.  Its nonsensical to operate any other way.

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #38
That's the theory, but does it *really* behaves that way in the OPUS encoder builds provided by the Xiph staff ?

Do you have any credible evidence causing you to believe otherwise?

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #39
Thats the problem with these totally opaque closed source programs, it's completely impossible to tell what they really do... you can only speculate about it on forums.

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #40
Thats the problem with these totally opaque closed source programs, it's completely impossible to tell what they really do... you can only speculate about it on forums.

That's only true for so called "cloud" programs.

 

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #41
Thats the problem with these totally opaque closed source programs, it's completely impossible to tell what they really do... you can only speculate about it on forums.


I forgot to react the first time around: what are you talking about? Opus is open source software. Or was it sarcasm?

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #42
Yes, I think we can safely deduce that sarcasm was at work. The point, thinly veiled, was that Brazil2 could answer his/her own questions by checking the freely available source code. Whilst I agree to some degree, I acknowledge that we could have a debate about whether non-programmers should be expected to analyse code, but I would prefer that we avoid such divergence.

Banned, I presume your insinuation is that, even for closed-source programs, as long as they are stored locally, one could technically manage to disassemble them and work out what they are doing. In that case, how prepared do you think the majority of users are to do such a thing? If something is closed-source, it might as well be impenetrable to analysis, in a practical sense. But Opus is not, so the point is irrelevant in any case.

Anyway, given that NullC did not say otherwise, and that the programmers of Opus are obviously more than competent, I presume the aforementioned logical assumption—that it does not resample when doing so would be pointless—is correct.

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #43
For listening test (wav file).
If I resample to 44.1 kHz with SoX (sox any-file outfile rate 44100) is this audible?
Wavpack -hh or TAK -pMax
OggVorbis aoTuVb6.03 -q 4

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #44
You tell us. You even mentioned listening tests. Questions like this are precisely why they exist.

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #45
You tell us. You even mentioned listening tests. Questions like this are precisely why they exist.

When somebody listening wav files (same song) and one wav has 48000 Hz sample rate then predictable that was opus.
Wavpack -hh or TAK -pMax
OggVorbis aoTuVb6.03 -q 4

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #46
An assumed condition of double-blind tests is that the subject knows absolutely nothing about any of the samples. What’s your point, exactly?

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #47
For listening test (wav file).
If I resample to 44.1 kHz with SoX (sox any-file outfile rate 44100) is this audible?

If you hear a difference between the resampled and original signals, it might be due to differences in your playback chain for the different rates.  So to eliminate this possibility, resample back to the original rate before comparison.

You might conceivably hear a difference if your original signal is not band-limited (e.g. it's a dirac pulse, or 'click'), since the resampled signal will be band-limited, and how that band-limiting is done may be different between the resampler and the playback chain; this is not an issue for normal recorded audio (or carefully constructed test-signals) though.

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #48
Ok. Thx!
Wavpack -hh or TAK -pMax
OggVorbis aoTuVb6.03 -q 4

Converting to Opus: 44.1 kHz resampled to 48 kHz

Reply #49
Here is my experience with Opus and handling of a different sample rates.

Opus has an internal resampler to convert  input to 48 kHz. It has a  high quality and nobody should be able to notice a difference.
Personally I use foobar's SoX resampler plugin with the highest quality settings 
Very High Quality mode (VHQ) is an overkill in terms of transparency and still pretty fast. 
It yields some safeness when different sample rates are treated in tests of a lossy codecs.
Furthermore SoX resampler works in floating point 32 bits  internally and today practically all lossy encoders support 24/32 bits input.

My encoding/decoding chain  looks like :
Source PCM (44.1/16) ->  foobar’s SoX (48/32 floating point) ->  Opus (native 48 kHz) -> decoded to PCM  (48/24 bits).

The last step can be "SoX 44.1/16 or 24" but since my soundcard, Essence STX, works better at 48 kHz I set everything (OS, foobar player, sound card settings etc.) to this sample rate.
Again, if my soundcard supports  24 bits playback I just prefer to stay on a safe side and resample everything to 48/24 even  if a resampling  to 48/16 is already transparent.