Comments (5)
It's better to think of "bitrate" in Opus and Vorbis as a quality factor, rather than a hard-and-fast rate. Like a much more fine-tunable version of LAME's Vx presets, except that the values for Xiph's bitrates actually do average out over a wide variety of content near the given bitrate. Finding any single piece of audio where they hit it on the nose is rare. Vorbis and Opus have very different methods of transforming audio, and somewhat different "easy" and "hard" areas, so it makes sense that they aren't entirely related in bitrate decisions on any individual song either.
As most of my music library is electronic and dance music, I just automatically accept that it'll always be 5-10% higher than the nominal bitrate, as that's what it takes to sound as good as, say, a folk song or a bass solo from Geddy Lee at far under the nominal bitrate. Vorbis tended to have even wider ranges in my experience.
There is a cbr mode to Opus, but now it's quality that will be uneven, rather than bitrate.
from opus.
Thanks for your response.
Curiously, when I did a comparison in Handbrake, with identical profiles but one using vorbis and in the other using opus, I saw a reduction in opus test, although it was not significant.
I read that opus produces smaller or equal sized audio, but in my tests using FFmpeg I am getting a bigger opus across the board.
I also noticed that opus was using 48K, but vorbis was using 44k. Maybe this has something to do with the size? I lowered sampling rate for opus to 16k(if I remember correctly), but still the file size was not lower than vorbis 44k.
from opus.
I read that opus produces smaller or equal sized audio
No, it produces higher quality at any given size on almost all audio; if you want to drive the size down then you can drop your bitrate. By asking for the same bitrate you're effectively asking for higher quality than Vorbis, not smaller size.
Don't touch sampling rate, that has absolutely nothing to do with quality or bitrate, except that it will significantly lower quality if you force it incorrectly. Outside of the API, Opus will always nominally use 48kHz, but will use only as much bandwidth as set for the range. Very low bitrates will reduce from the default 20kHz lowpass down all the way to 8kHz, and will also drop down stereo modes until mono, entirely automatically.
There are no modern audio codecs that increase size with PCM sample rate, except pure lossless like FLAC. They don't record samples, they record frequencies and maybe a bit of noise. That's just an abstraction now, so unless your hardware can't do it, signaling higher is always better.
Handbrake was probably using different versions of the codecs than your ffmpeg build was, assuming that each and every single parameter was the same (ffmpeg does set a few differently from opusenc, btw).
Is Opus being 10% larger for your small sample set really enough of a dealbreaker to keep trying to break the codec until you can get them equal?
from opus.
Hi Emily,
The use case is that I have some audio files which I want to archive on a cloud bucket. Theoretically, the smaller the size the lesser the bill. This is the reason I was conducting tests to get equivalent quality to vorbis at an equal or lower size.
I took 4 audio files - one flac, wav, mp3 and aac. I encoded them using the above commands, but changed the bit rate. These are the results I got:
Original Size : 50.7 MB
Codec | kbps | size in MB |
---|---|---|
vorbis | 128 | 9.84 |
opus | 64 | 5.68 |
opus | 100 | 8.62 |
opus | 112 | 9.52 |
opus | 128 | 11 |
I think opus at 112kbps is giving approximately the same size as vorbis at 128. The question is that is the quality equivalent? Personally, I could not tell the difference in this small sample.
Is Opus being 10% larger for your small sample set really enough of a dealbreaker to keep trying to break the codec until you can get them equal?
I guess not. I read that opus produces smaller files than vorbis, so I was investigating why I am getting larger files out of curiosity.
from opus.
I think I am going to stick to the recommended bitrates:
https://wiki.xiph.org/Opus_Recommended_Settings#Recommended_Bitrates
from opus.
Related Issues (20)
- 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
- Opus 1.5.x and main compilation failing with GCC 8.5.0 HOT 1
- Opus not building on Ubuntu 24.04
- No way to turn off the PLC/FEC?
- Floating Point libraries failing to build when targeting Fixed Point support only. MSVC 2017 v141 HOT 3
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.