[opus] How to identify packets to input to opus_decode()

HK Wong hk at woohing.net
Tue Apr 30 04:56:41 PDT 2013

HK Wong wrote:
>* for Opus. I am now using sources of libopus. The first question is for*>* calling opus_decode(), do I need to skip the header bytes of an opus*>* file before I can input the file data to opus_decode()? Or will libopus*>* handle this automatically?*
You need to feed libopus distinct packets, and you need to parse out the
size of those packets from the file first. This is not handled
automatically by libopus (that is what libopusfile is for).

So each libopus packet begins by a TOC byte as stated in RFC6716? And
the no. of bytes of each packet usually denoted by the segment table
entries in the ogg layer? If the TOC byte is also needed to feed into

>* Actually I have browsed through the site, but there is nothing detail*>* talking about the header bytes of opus file. When I compare two opus*>* files by hex viewer I can identify the header portion, but have no clue*>* how each packet is allocated.*
You can find details on the headers

Most of the details of the Ogg layer that encapsulates Opus packets is
found here:http://tools.ietf.org/html/rfc3533

>* BTW, I know libopusfile is solely for decoding and should be more*>* convenience for my application. However, the .a files are not compatible*>* with Microchip compiler.*
The source code of libopusfile is here:http://git.xiph.org/?p=opusfile.git

I don't know anything about your environment, but you should be able to
compile your own library from the source files there.

And for libopusfile, it needs to run with libopus and also libogg? And
is this (http://downloads.xiph.org/releases/ogg/libogg-1.3.0.zip) the
download link for libogg?


H.K. Wong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/opus/attachments/20130430/7d6fc52b/attachment-0001.htm 

More information about the opus mailing list