IPB

Welcome Guest ( Log In | Register )

2 Pages V  < 1 2  
Reply to this topicStart new topic
Converting to Opus: 44.1 kHz resampled to 48 kHz
nu774
post Jan 21 2013, 02:19
Post #26





Group: Developer
Posts: 514
Joined: 22-November 10
From: Japan
Member No.: 85902



QUOTE (C.R.Helmrich @ Jan 21 2013, 06:35) *
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).


Go to the top of the page
+Quote Post
jmvalin
post Jan 21 2013, 03:55
Post #27


Xiph.org Speex developer


Group: Developer
Posts: 475
Joined: 21-August 02
Member No.: 3134



QUOTE (C.R.Helmrich @ Jan 20 2013, 16:35) *
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.
Go to the top of the page
+Quote Post
C.R.Helmrich
post Jan 21 2013, 18:40
Post #28





Group: Developer
Posts: 686
Joined: 6-December 08
From: Erlangen Germany
Member No.: 64012



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.
Go to the top of the page
+Quote Post
IgorC
post Jan 21 2013, 18:44
Post #29





Group: Members
Posts: 1533
Joined: 3-January 05
From: ARG/RUS
Member No.: 18803



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.

This post has been edited by IgorC: Jan 21 2013, 18:47
Go to the top of the page
+Quote Post
mzso
post Mar 14 2013, 15:55
Post #30





Group: Members
Posts: 177
Joined: 2-May 07
Member No.: 43131



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

Go to the top of the page
+Quote Post
lvqcl
post Mar 14 2013, 16:05
Post #31





Group: Developer
Posts: 3326
Joined: 2-December 07
Member No.: 49183



QUOTE (mzso @ Mar 14 2013, 18:55) *
why not resample everything to 40kHz instead of 48.

A more complete list of common audio sample rates is: ...
Go to the top of the page
+Quote Post
wswartzendruber
post Mar 14 2013, 21:58
Post #32





Group: Members
Posts: 85
Joined: 11-December 06
Member No.: 38563



Doesn't the CELT layer work strictly at 48 kHz regardless of input sample rate?
Go to the top of the page
+Quote Post
Dynamic
post Mar 15 2013, 18:28
Post #33





Group: Members
Posts: 795
Joined: 17-September 06
Member No.: 35307



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.

Go to the top of the page
+Quote Post
jmvalin
post Mar 15 2013, 18:51
Post #34


Xiph.org Speex developer


Group: Developer
Posts: 475
Joined: 21-August 02
Member No.: 3134



QUOTE (Dynamic @ Mar 15 2013, 13:28) *
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.
Go to the top of the page
+Quote Post
Brazil2
post May 29 2013, 08:59
Post #35





Group: Members
Posts: 143
Joined: 9-May 10
Member No.: 80499



Something is still not clear to me: is the internal resampler always used even if the input is 48 kHz already ?
Go to the top of the page
+Quote Post
saratoga
post May 29 2013, 14:42
Post #36





Group: Members
Posts: 4849
Joined: 2-September 02
Member No.: 3264



No, a resampler changes the sampling rate. If the rate is already correct there is nothing to change.
Go to the top of the page
+Quote Post
Brazil2
post May 29 2013, 16:30
Post #37





Group: Members
Posts: 143
Joined: 9-May 10
Member No.: 80499



That's the theory, but does it *really* behaves that way in the OPUS encoder builds provided by the Xiph staff ?
Go to the top of the page
+Quote Post
saratoga
post May 29 2013, 16:53
Post #38





Group: Members
Posts: 4849
Joined: 2-September 02
Member No.: 3264



QUOTE (Brazil2 @ May 29 2013, 11:30) *
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.
Go to the top of the page
+Quote Post
greynol
post May 29 2013, 18:01
Post #39





Group: Super Moderator
Posts: 10000
Joined: 1-April 04
From: San Francisco
Member No.: 13167



QUOTE (Brazil2 @ May 29 2013, 08:30) *
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?


--------------------
Placebophiles: put up or shut up!
Go to the top of the page
+Quote Post
NullC
post May 29 2013, 19:44
Post #40





Group: Developer
Posts: 200
Joined: 8-July 03
Member No.: 7653



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.
Go to the top of the page
+Quote Post
Banned
post Jun 2 2013, 10:29
Post #41





Group: Members
Posts: 13
Joined: 12-January 13
Member No.: 105821



QUOTE (NullC @ May 29 2013, 20:44) *
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.
Go to the top of the page
+Quote Post
skamp
post Jun 2 2013, 10:54
Post #42





Group: Developer
Posts: 1410
Joined: 4-May 04
From: France
Member No.: 13875



QUOTE (NullC @ May 29 2013, 20:44) *
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?


--------------------
See my profile for measurements, tools and recommendations.
Go to the top of the page
+Quote Post
db1989
post Jun 2 2013, 10:58
Post #43





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



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.

This post has been edited by db1989: Jun 2 2013, 10:59
Go to the top of the page
+Quote Post
Mardel
post Sep 14 2013, 13:08
Post #44





Group: Members
Posts: 27
Joined: 12-March 08
Member No.: 51986



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

This post has been edited by Mardel: Sep 14 2013, 13:43


--------------------
Wavpack -hh or TAK -pMax
OggVorbis aoTuVb6.03 -q 4
Go to the top of the page
+Quote Post
db1989
post Sep 14 2013, 14:03
Post #45





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



You tell us. You even mentioned listening tests. Questions like this are precisely why they exist.
Go to the top of the page
+Quote Post
Mardel
post Sep 14 2013, 14:13
Post #46





Group: Members
Posts: 27
Joined: 12-March 08
Member No.: 51986



QUOTE (db1989 @ Sep 14 2013, 15:03) *
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
Go to the top of the page
+Quote Post
db1989
post Sep 14 2013, 14:19
Post #47





Group: Super Moderator
Posts: 5275
Joined: 23-June 06
Member No.: 32180



An assumed condition of double-blind tests is that the subject knows absolutely nothing about any of the samples. What’s your point, exactly?
Go to the top of the page
+Quote Post
bandpass
post Sep 14 2013, 14:47
Post #48





Group: Members
Posts: 326
Joined: 3-August 08
From: UK
Member No.: 56644



QUOTE (Mardel @ Sep 14 2013, 13:08) *
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.
Go to the top of the page
+Quote Post
Mardel
post Sep 14 2013, 18:51
Post #49





Group: Members
Posts: 27
Joined: 12-March 08
Member No.: 51986



Ok. Thx!


--------------------
Wavpack -hh or TAK -pMax
OggVorbis aoTuVb6.03 -q 4
Go to the top of the page
+Quote Post
IgorC
post Sep 15 2013, 19:19
Post #50





Group: Members
Posts: 1533
Joined: 3-January 05
From: ARG/RUS
Member No.: 18803



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.

This post has been edited by IgorC: Sep 15 2013, 19:35
Go to the top of the page
+Quote Post

2 Pages V  < 1 2
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 24th July 2014 - 21:12