How to multiplex Vorbis and Theora streams using libogg

I am currently writing a simple Theora video encoder that uses libogg, libvorbis and libtheora. Currently, I can submit frames to Theora encoder and PCM samples to Vorbis encoder, transfer the received packets to Ogg streams (one for Theora and one for Vorbis) and output the pages.

When the program starts, it first clears the headers from Theora encoder, and then from the Vorbis encoder to the output file (obviously, both streams have unique serial numbers). Then I write alternating pages to a file from both streams.

When recording only video or just audio, I can play the output in mplayer just fine, however, when I try to write both, I get the following:

Ogg demuxer error: we met an unknown thread

I guess I'm doing the wrong multiplexing. I read the documentation for multiplexing streams on Xiph.org and I don't see how I'm different. It seems I can’t find any sample code for this without waiting for the source of the open source encoder (which I am having trouble understanding). Can anyone explain how to multiplex streams correctly using libogg? I am trying to do this in C on Ubuntu 10.04 using libraries from the Ubuntu repository.

Thank you very much in advance!

Tom

+3
source share
1 answer

Well, for those who read this, I decided it to some extent.

- () , Vorbis Theora . , , .

, (mplayer , ). 24- 44,1 1 1837,5 ( PCM, 7 350 ).

- /, - / !

!

+3

Source: https://habr.com/ru/post/1762309/


All Articles