-1

I looking for basic example how to encode pcm buffer(16kHz/16bit/fixed point) to Opus buffer and pack it OGG-container? I found only vorbis-based examples, not Opus. Thanks for any ideas!)

Natalia
  • 11
  • 2
  • So you have searched the internet, found things and they didn't satisfy you for some reason. Be sure to [edit] your question with what you have found so far. [Search, research, search some more, ask last.](https://meta.stackoverflow.com/a/261593/14215102) –  Dec 09 '20 at 17:10
  • The source code for the official tools is available, if you hardcode the parameters and delete all the command-line handling it should do more or less what you want: https://gitlab.xiph.org/xiph/opus-tools/-/blob/master/src/opusenc.c –  Dec 09 '20 at 17:27

1 Answers1

0

This should produce opus files, looks basic enough.

https://gitlab.xiph.org/xiph/libopusenc/-/blob/master/examples/opusenc_example.c