Comments (9)
opus_demo doesn't make .opus files. It uses a custom format just for testing. You need to use opusenc from the opus-tools package to create files other applications can play.
from opus.
I'm trying to experiment with extremely low bitrates and would like to set my frame size to 1000 ms or higher, even if that sounds crazy to you.
This isn't possible in the opus bitstream. As the encoder reported, 120 ms is the maximum duration of a single frame/packet. At that point there's no meaningful reduction in overhead for encoding longer frames. Meanwhile, longer frames reduce quality by preventing the encoder from switching modes as the character of the audio changes.
The default 20 ms frame size was chosen as the best trade-off between encoding latency and framing overhead. If you're making .opus files and don't care about encoding latency, then that works well. For RTP longer frames are helpful when bitrate is more important than latency, because the framing overhead is so much larger than in .opus.
from opus.
opusenc opus-tools 0.1.9 (using libopus 1.1.4)
only supports up to 60ms framesize
from opus.
actually I should have compiled your latest git before opening this issue...
from opus.
libopus 1.2-alpha2-4-gcfdaf365
Unsupported frame size: 1200 ms. Supported are 2.5, 5, 10, 20, 40, 60, 80, 100, 120.
from opus.
$ ./opus_demo -e audio 48000 1 16000 -cbr -framesize 120 Anuna\ 48k.wav anuna.opus
libopus 1.2-alpha2-4-gcfdaf365
Encoding 48000 Hz input at 16.000 kb/s in auto bandwidth with 5760-sample frames.
average bitrate: 16.000 kb/s
maximum bitrate: 16.000 kb/s
active bitrate: 16.000 kb/s
bitrate standard deviation: 0.000 kb/s
$ file anuna.opus
anuna.opus: data
$ mpv anuna.opus
Playing: anuna.opus
Failed to recognize file format.
whats going on here?
from opus.
Thank you for your input!
opusenc does not yet support 120ms frames however...
from opus.
Meanwhile, longer frames reduce quality by preventing the encoder from switching modes as the character of the audio changes.
Ah so that explains what I was noticing.
Anyway.
https://wiki.xiph.org/OpusFAQ#What_frame_size_should_I_use.3F
Smaller frame sizes may be used to achieve lower latency, but have lower quality at a given bitrate.
... So I assumed the inverse was true, that larger framesizes (>20) would be better at a low bitrate...
I re-encoded some flac to 16kbps 2.5, 5, 20, 40, 60ms framesizes
( https://anuna.bandcamp.com/track/s-do-mhaimeo )
2.5 sounded like a robot drowning down a deep well
5 sounded like it had lost all high frequency sounds
20 sounded like what you'd expect for 16kbps opus
40 sounded like 20 but sounded like it was breaking up/ kinda choppy sounding
60 sounded like it was clipping waveforms
assuming that higher framesizes are supposed to sound better, I figured maybe it is just giving me higher frequencies and thus I'm hearing more artifacts, so I was curious as to what 1000ms would sound like.
from opus.
Note that unless you're using RTP and the related header overhead, you're not gaining anything from using frame sizes larger than 20 ms. If your application is encoding low bitrate music to file, then the best frame size to use is 20 ms, not 60 ms, not 120 ms. Using larger frame sizes just concatenates 20 ms frames, but it prevents the encoder from making optimal decisions.
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.