Comments (12)
Gmaxwell does not care about sound quality, so they pretend that sound quality is irrelevant to everybody =)) Quote: "Opus doesn't do 44.1k because there is literally no point to do so". = That is an obvious, destructive lie. Resampling causes aliasing distortion no matter how good the math, leading to more harsh, unnatural sound. I first noticed this problem with Realtek audio chips on many computers, because the drivers are junk that forces everything to 48Khz rather than locking to native, & also notice the same problem with 'Ensoniq' cards & some others. Until Opus supports native sample rates of whatever is thrown at it, it is a completely useless codec with no advantages whatsoever. The larger file sizes of more natural sounding codecs are worth it because they sound so much better. AAC is terrible because it removes the highs then 'creates fake ones by guessing, creating an odd 'bad 2-way speaker system' kind of sound at lower bit rates, & MP3 does not have that problem & is still the best codec by far, because it is natural at all frequencies until at low bit rates it adds a 'swooshing' chorus type effect, whereas AAC just gets progressively harsh at lower bit rates. No matter what you do with Opus, because it does not suppor native 44.1 standard 'CD music' sample rate, it will always be useless for quality music reproduction compared to other formats that support native rates. Any amount of 'sound quality is irrelevant' and 'you can't hear that' comments don't change the fact that it is a problem that most people notice. When they don't know the exact reason for the problem, they can still tell the difference = smooth vs. harsh, etc. Opus is a failure until it offers native sample rates, not forcing everything to 48. It's unfortunate, but that's reality, same as AV1 is a decade of work & millions of dollars it seems, but definitely lower quality picture than VP9. Comparing a 250 megabyte VP9 video to a 200 megabyte AV1, the AV1 looks significantly worse, so what is the point? Way more CPU time & complexity for a result that is in the end not any more efficient or better looking at the same bit rate, so it's pointless = as pointless as Opus (unless it is modified to support native rates =) For more details on these facts anybody can reach out to me at 'balkanguy (at) live (dot) com'. I've worked in 'high end audio' & other such things where sound quality is actually relevant to people =D Just because YOU do not care does not mean WE don't. It's better to say something like 'I don't care how it sounds and refuse to fix it'... well then obviously we should not bother dealing with you but people who ARE willing 2 fix it =) Who is willing to fix the Opus codec so it will support native rates like 44.1Khz?
from opus.
BTW: Vorbis / OOG is better sounding than Opus (which is harsh resampling nonsense), but worse than AAC or MP3. For whatever reason, Opus tends 2 collapse the stereo image & sound 'rolled off' =P AAC tends to be a bit harsh & fake sounding but more 'alive' than Vorbis, & MP3 is still the best overall. Newer does not necessarily mean better. Opus is newer & much worse than the others, & AV1 is worse than VP9 = no smaller than VP9 & doesn't look better but takes more CPU overhead = bad choice. The world would be better off if until those problems are fixed, AV1 & Opus are banned from everything =)
from opus.
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.
from opus.
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.
from opus.
Не, ну ёпта, пацаны. Зачем вам 48000 вообще изначально в этом кодеке? Вы делаете его в первую очередь для передачи речи? Тогда так и ответьте автору топика, чтобы музыку свою кодировал во что-то другое, т.к. очередной мега-супер-кодек, который многие эксперты опробовав с помощью своих невероятно чувствительных ушей и указали на его неоспоримое превосходство над другими, попросту не предназначен для меломанов.
Бро, конвертируй всё в AAC через iTunes и больше не парься ни о чём, всё равно поделия в виде Vorbis и Opus не поддерживаются таким большим перечнем железа, как MP3 и AAC, что требует дополнительных ресурсов для их декодирования.
Удачи.
from opus.
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).
from opus.
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.
from opus.
I'm really concerned about the resampling...So 2 lossy operations....for which I'm still sticking with Vorbis.
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.
from opus.
Existing OPUS decoders can't follow a 44100 instruction? If not, adding 44.1 kHz output wouldn't break compatibility.
from opus.
Existing OPUS decoders can't follow a 44100 instruction? If not, adding 44.1 kHz output wouldn't break compatibility.
They could not play it, which is exactly what breaking compatibility means.
What does --raw-rate
do?
parec -v --raw -d alsa_output.pci-0000_00_1b.0.analog-stereo.monitor | opusenc --raw-rate 44100 - $HOME/localscripts/output.opus
mkvmerge -w --enable-durations -o $HOME/localscripts/output.webm $HOME/localscripts/output.opus
Firefox 76, Nightly 78, Chromium 81, mpv
, ffplay
each play the file.
mkvinfo -t output.webm
+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ Maximum EBML ID length: 4
|+ Maximum EBML size length: 8
|+ Document type: webm
|+ Document type version: 4
|+ Document type read version: 1
+ Segment: size 618781
|+ Seek head (subentries will be skipped)
|+ EBML void: size 4029
|+ Segment information
| + Timestamp scale: 22674
| + Multiplexing application: libebml v1.3.10 + libmatroska v1.5.2
| + Writing application: mkvmerge v46.0.0 ('No Deeper Escape') 32-bit
| + Duration: 00:01:00.784753962
| + Date: Wed May 27 03:32:52 2020 UTC
|+ Tracks
| + Track
| + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
| + Track UID: 7354171215355932620
| + Track type: audio
| + Codec ID: A_OPUS
| + Seek pre-roll: 00:00:00.080000000
| + Codec's private data: size 19
| + Language: und
| + Codec-inherent delay: 00:00:00.006500000
| + Audio track
| + Sampling frequency: 44100
| + Channels: 2
$ mkvmerge -J output.opus
{
"attachments": [],
"chapters": [],
"container": {
"properties": {
"container_type": 23,
"is_providing_timestamps": true
},
"recognized": true,
"supported": true,
"type": "Ogg/OGM"
},
"errors": [],
"file_name": "output.opus",
"global_tags": [],
"identification_format_version": 12,
"track_tags": [],
"tracks": [
{
"codec": "Opus",
"id": 0,
"properties": {
"audio_channels": 2,
"audio_sampling_frequency": 44100,
"number": 833194209,
"tag_encoder": "opusenc from opus-tools 0.1.10"
},
"type": "audio"
}
],
"warnings": []
}
$ mediainfo output.opus
General
Complete name : output.opus
Format : Ogg
File size : 560 KiB
Duration : 1 min 0 s
Overall bit rate : 75.4 kb/s
Writing application : opusenc from opus-tools 0.1.10
Audio
ID : 833194209 (0x31A988E1)
Format : Opus
Duration : 1 min 0 s
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 44.1 kHz
Compression mode : Lossy
Writing library : libopus 1.1.2
ffplay output.opus
[ogg @ 0x9d200600] 693 bytes of comment header remain 0B f=0/0
Input #0, ogg, from 'output.opus':
Duration: 00:01:00.78, start: 0.000000, bitrate: 75 kb/s
Stream #0:0: Audio: opus, 48000 Hz, stereo, fltp
Metadata:
ENCODER : opusenc from opus-tools 0.1.10
ffprobe output.opus
[ogg @ 0x156b7a0] 693 bytes of comment header remain
Input #0, ogg, from 'output.opus':
Duration: 00:01:00.78, start: 0.000000, bitrate: 75 kb/s
Stream #0:0: Audio: opus, 48000 Hz, stereo, fltp
Metadata:
ENCODER : opusenc from opus-tools 0.1.10
$ mpv output.opus
Playing: output.opus
(+) Audio --aid=1 (opus 2ch 48000Hz)
AO: [pulse] 48000Hz stereo 2ch float
A: 00:01:00 / 00:01:00 (98%)
from opus.
from opus.
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.
from opus.
Related Issues (20)
- arm build with meson fails with: Unknown variable "opus_arm_may_have_dotprod" HOT 4
- opus/meson.build:636:24: ERROR: File dnn/fargan_data.h does not exist. HOT 2
- LACE / NoLACE and DRED on Fixed Point implementations? HOT 10
- autogen downloads latest model data every time HOT 2
- Missing opus 1.5 github release HOT 4
- Windows: Meson build fails with nnet_avx2.c compiled without AVX2 HOT 23
- Compiling libopus 1.5.1 with Linux fails on ARM Cortex-A53 and Cortex-A55 HOT 21
- opus 1.5.1-1 seems to be incompatible with musescore 4.2.1 HOT 1
- Question about DRED HOT 4
- Undefined reference to opus_select_arch HOT 2
- opus_repacketizer_cat sometimes fails
- Limiting the stack allocation request HOT 2
- Please update opus-tools to support new features
- Deep PLC performance on Android HOT 16
- Compiling with CMake for Windows/MSVC only supports DLL runtime libraries HOT 9
- Added the OPUS_SET_INBAND_FEC(2) option HOT 1
- Please provide an option to not depend on downloading model data HOT 10
- v1.5.2 compile warnings
- Error: Range coder state mismatch between encoder and decoder in frame 1: 0x f3b1240 vs 0x40123b0f HOT 1
- Opus.lib: 1.3.1 version crashing in some windows machines in opus_encoder_create HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opus.