Which one of the various libraries on xiph.org allow me to create an Opus file? The 3 or so libraries on the Opus download page all seem to be for reading files, converting and/or encode/decode streams. I have device that outputs a stream of Opus 'frames' and I need to save them into an Opus file. -- Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/opus/attachments/20150223/eacc6638/attachment.htm
I __think__ opus-tools' opusenc has code which can be used as a template/sample for how to create an .Ogg file with Opus content. As expected, it makes use of libopus and libogg. There appears to be quite a few steps involved (several more than I'd expect), but I __think__ this is the only library, or sample code, that shows how to create audio file containing Opus. Too bad there isn't a simplified wrapper for file CREATION like libopusfile does reading. If anyone knows of one, I'd appreciate the information. On Mon, Feb 23, 2015 at 7:38 AM, Tony <yellowjacketlite at gmail.com> wrote:> Which one of the various libraries on xiph.org allow me to create an Opus > file? The 3 or so libraries on the Opus download page all seem to be for > reading files, converting and/or encode/decode streams. I have device that > outputs a stream of Opus 'frames' and I need to save them into an Opus file. > > -- > Tony >-- Tony -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/opus/attachments/20150223/d50e85ed/attachment.htm
Hello Tony, opusenc from opus-tools works for me.. Just tried it successfully on my x86_64 Ubuntu Trusty 14.04 box. I was just able to do $ sudo apt-get install opus-tools $ opusenc music_48kbps.wav music_48kbps.opus I remember also being able to compile opus-tools (git://git.xiph.org/opus-tools.git) some time ago. Regards, Vish On 23 February 2015 at 12:30, Tony <yellowjacketlite at gmail.com> wrote:> I __think__ opus-tools' opusenc has code which can be used as a > template/sample for how to create an .Ogg file with Opus content. As > expected, it makes use of libopus and libogg. > > There appears to be quite a few steps involved (several more than I'd > expect), but I __think__ this is the only library, or sample code, that > shows how to create audio file containing Opus. Too bad there isn't a > simplified wrapper for file CREATION like libopusfile does reading. > > If anyone knows of one, I'd appreciate the information. > > > On Mon, Feb 23, 2015 at 7:38 AM, Tony <yellowjacketlite at gmail.com> wrote: >> >> Which one of the various libraries on xiph.org allow me to create an Opus >> file? The 3 or so libraries on the Opus download page all seem to be for >> reading files, converting and/or encode/decode streams. I have device that >> outputs a stream of Opus 'frames' and I need to save them into an Opus file. >> >> -- >> Tony > > > > > -- > Tony > > _______________________________________________ > opus mailing list > opus at xiph.org > http://lists.xiph.org/mailman/listinfo/opus >
On 23/02/15 10:30 AM, Tony wrote:> I __think__ opus-tools' opusenc has code which can be used as a > template/sample for how to create an .Ogg file with Opus content. As > expected, it makes use of libopus and libogg.Sadly that's the best option currently. As you say it's a bit complicated, although oggenc has a lot of extra support for controlling encoder options you wouldn't need if you've already got compressed frames. I keep hoping someone will contribute write support to libopusfile, but until then copying that code is your best bet. You might also check https://tools.ietf.org/html/draft-ietf-codec-oggopus which describes the file format. Feedback on the draft from implementors is welcome. -r