HydrogenAudio

Lossy Audio Compression => Opus => Topic started by: Manu270891 on 2021-04-04 14:25:01

Title: Opus not resampling to 48khz
Post by: Manu270891 on 2021-04-04 14:25:01
Hi!

I decided to use Opus as my main codec to store music on my smartphone and, so far, I'm loving it. But there is a minor issue I've noticed. I'm using my 44khz FLACs as source and Opus should resample them to 48khz, at least that's the expected behaviour of opusenc, but the resulting files are stil 44khz. Not that I'm complaining, they sound amazing for the small file size they have, but I was wondering why opusenc isn't resampling my music to 48khz.

Thanks!
Title: Re: Opus not resampling to 48khz
Post by: binaryhermit on 2021-04-04 15:18:46
Someone correct me if I'm wrong, but the "44.1 kHz" opus files are actually 48 kHz internally and there's just a flag saying "resample to 44.1 kHz on decode"?
Title: Re: Opus not resampling to 48khz
Post by: Triza on 2021-04-04 17:35:35
It remembers the original sample rate, and when you decoded into a file, it converted it back to 44.1 kHz.

Normally it does not do it for playback, which is a good thing. They must be opted for this so people do not complain that sample rate changed. You can read about it in the RFC.

Triza
SimplePortal 1.0.0 RC1 © 2008-2021