Extract/Decode Opus Audio from Webm

507 views
Skip to first unread message

esen...@gmail.com

unread,
May 20, 2016, 1:57:04 PM5/20/16
to WebM Discussion
Is there any example on how to extract/decode Opus audio from Webm file format?

I've found a webm parser source example:

for (int i = 0; i < frameCount; ++i) {
          const mkvparser::Block::Frame& theFrame = pBlock->GetFrame(i);
          const long size = theFrame.len;
          const long long offset = theFrame.pos;

          theFrame.Read(&reader, data);
          // here

          printf("\t\t\t %15ld,%15llx\n", size, offset);
        }

However I've tried to feed the 'data' directly into Opus Decoder, and it generated garbage.

How to do it properly?

Brendan Bolles

unread,
May 20, 2016, 2:39:31 PM5/20/16
to WebM Discussion, esen...@gmail.com
On Friday, May 20, 2016 at 10:57:04 AM UTC-7, esen...@gmail.com wrote:
Is there any example on how to extract/decode Opus audio from Webm file format?


Reply all
Reply to author
Forward
0 new messages