Reputation: 31
How do I calculate the size of the compressed opus frame (number of bytes)? I have read the OggS Page and the TOC-Header. The next bytes should belong to the compressed frame, but how do I get the number of bytes?
Upvotes: 0
Views: 734
Reputation: 305
You're inside an ogg file, I assume. Why can't you read it from the lacing table like any other data packet?
The first ogg page is OPUSHEAD, the second is OPUSTAGS, every page following that should just be the opus packets laced together, no special formatting or anything. It's in the spec here: https://wiki.xiph.org/OggOpus
Upvotes: 2