Ingo Siegert
Ingo Siegert

Reputation: 31

Size of compressed Opus frame (bytes)

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

Answers (1)

Logan S.
Logan S.

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

Related Questions