-
Notifications
You must be signed in to change notification settings - Fork 716
Description
I'm a passionate music listener, and a game developer, so I deal with a lot of music and sound files.
99.9% of the content that I encountered in my life is in 44.1 kHz sampling rate, but Opus does not support that. I'm really concerned about the resampling.
From the documentation https://wiki.xiph.org/OpusFAQ#But_won.27t_the_resampler_hurt_the_quality.3F_Isn.27t_it_better_to_use_44.1_kHz_directly.3F
The Opus encoder is heavily tuned for 48 kHz now and using it at 44.1 kHz will cause it to make sub-optimal decisions.
Isn't the better solution, is to add a special mode for the 44.1, and tune that mode the same way as 48 is tuned?
Because right now when trying to use Opus with 44.1, we have resampling + lossy compression on top of that. So 2 lossy operations.
If you would provide a tuned version of the encoder for 44.1 mode, then we would have only one lossy operation, which is the encoding, without having to do resampling. I think that would be the best solution.
I strongly believe that if you would add native support for 44.1 sampling rate, then Opus would become much more popular. Because, like I said at the start, at least in my experience, 44.1 is the 99.9% of the audio content flying on the internet, and because of the resampling needed, Opus doesn't seem like a perfect solution, for which I'm still sticking with Vorbis.
Activity
rillian commentedon May 12, 2017
A mode tuned for 44.1 kHz (pretending it's actually 48 kHz) could be added, but it would be a lot of work without benefit. You needn't be concerned about resampling. There are many transparent (without audible artefacts) resamplers which will do a fine job converting 44.1 kHz input to 48 kHz for encoding in Opus.
Put another way, if you have an application where resampling causes quality loss, you should use a lossless compressor like FLAC instead of Opus.
gcp commentedon May 12, 2017
The losses introduced by resampling are below audible thresholds. The whole workings of a lossy codec are a stack of lossy operations! Why focus on the one that has about the least loss of all of them? You're worrying about it in Opus, when in reality the quality loss due to it is far below the quality loss you get from Vorbis('s stack of lossy operations) as compared to Opus's.
Opus gives better quality at 44.1kHz than Vorbis does. And Opus does support 44.1kHz, unlike the bug title implies. Using a resampler doesn't mean it's not supported, on the contrary.
jmvalin commentedon May 31, 2017
From a compatibility perspective, a 44.1 kHz Opus would be like a new codec and it would be incompatible with existing deployment. Breaking compatibility because of a thought experiment (assuming that resampling degrades quality despite no evidence existing) is not something we're going to do.
alexchandel commentedon May 11, 2020
Existing OPUS decoders can't follow a 44100 instruction? If not, adding 44.1 kHz output wouldn't break compatibility.
gmaxwell commentedon May 11, 2020
They could not play it, which is exactly what breaking compatibility means. Worse, the quality would almost certainly be worse as a result of losing the benefit of the careful tuning of the codec. Not better. With a good resampler the conversion to 48kHz is essentially lossless, far far more so than the codec itself (technically a matched 44.1>48>44.1 conversion set could be made actually lossless if anyone cared to ever create such a thing). Opus doesn't do 44.1k because there is literally no point to do so, and supporting different rates makes life harder for decoders (especially ones that have to deal with streams from multiple sources simultaneously).
guest271314 commentedon May 27, 2020
What does
--raw-ratedo?Firefox 76, Nightly 78, Chromium 81,
mpv,ffplayeach play the file.bezdelny commentedon Feb 25, 2021
ะะต, ะฝั ัะฟัะฐ, ะฟะฐัะฐะฝั. ะะฐัะตะผ ะฒะฐะผ 48000 ะฒะพะพะฑัะต ะธะทะฝะฐัะฐะปัะฝะพ ะฒ ััะพะผ ะบะพะดะตะบะต? ะั ะดะตะปะฐะตัะต ะตะณะพ ะฒ ะฟะตัะฒัั ะพัะตัะตะดั ะดะปั ะฟะตัะตะดะฐัะธ ัะตัะธ? ะขะพะณะดะฐ ัะฐะบ ะธ ะพัะฒะตัััะต ะฐะฒัะพัั ัะพะฟะธะบะฐ, ััะพะฑั ะผัะทัะบั ัะฒะพั ะบะพะดะธัะพะฒะฐะป ะฒะพ ััะพ-ัะพ ะดััะณะพะต, ั.ะบ. ะพัะตัะตะดะฝะพะน ะผะตะณะฐ-ััะฟะตั-ะบะพะดะตะบ, ะบะพัะพััะน ะผะฝะพะณะธะต ัะบัะฟะตััั ะพะฟัะพะฑะพะฒะฐะฒ ั ะฟะพะผะพััั ัะฒะพะธั ะฝะตะฒะตัะพััะฝะพ ััะฒััะฒะธัะตะปัะฝัั ััะตะน ะธ ัะบะฐะทะฐะปะธ ะฝะฐ ะตะณะพ ะฝะตะพัะฟะพัะธะผะพะต ะฟัะตะฒะพัั ะพะดััะฒะพ ะฝะฐะด ะดััะณะธะผะธ, ะฟะพะฟัะพััั ะฝะต ะฟัะตะดะฝะฐะทะฝะฐัะตะฝ ะดะปั ะผะตะปะพะผะฐะฝะพะฒ.
ะัะพ, ะบะพะฝะฒะตััะธััะน ะฒัั ะฒ AAC ัะตัะตะท iTunes ะธ ะฑะพะปััะต ะฝะต ะฟะฐัััั ะฝะธ ะพ ััะผ, ะฒัั ัะฐะฒะฝะพ ะฟะพะดะตะปะธั ะฒ ะฒะธะดะต Vorbis ะธ Opus ะฝะต ะฟะพะดะดะตัะถะธะฒะฐัััั ัะฐะบะธะผ ะฑะพะปััะธะผ ะฟะตัะตัะฝะตะผ ะถะตะปะตะทะฐ, ะบะฐะบ MP3 ะธ AAC, ััะพ ััะตะฑัะตั ะดะพะฟะพะปะฝะธัะตะปัะฝัั ัะตััััะพะฒ ะดะปั ะธั ะดะตะบะพะดะธัะพะฒะฐะฝะธั.
ะฃะดะฐัะธ.
petterreinholdtsen commentedon Feb 25, 2021
rillian commentedon Feb 26, 2021
According to Google's translation service, the Russian comment recommends MPEG codecs as better for music because they are more broadly supported and don't require resampling to/from 44.1 kHz.
silverbacknet commentedon Nov 24, 2022
If you'd like to discuss the objective, testable and measurable merits of resampling, you want HydrogenAudio.
If you'd like to start an opinionated flame war, there's Reddit, AVSForum, etc.
If there's a bug in the code or an entirely overlooked feature you've noticed, then Github is the right place.