[theora] encoding image from a webcam
mgliga at integrasoft.ro
Wed Nov 25 02:59:30 PST 2009
I'm trying to encode a picture from my webcam using the theora
codec. The final "product"
must encode a frame, send it over the network and decode it on "the
For now, it must only work locally so we don't care about the transmission.
This is what I've understood till now: I have a char * buffer from the
camera RG24,I convert it to
YCbCr 4:4:4, I encode it, resulting an ogg_packet. Then I provide this
ogg_packet to the decoder,
get the YCbCr buffer , convert it back to RGB24 then display it.
Now the questions:
I have a Codec class with a function encoderInitialize(), where I
initialize the encoder,
filling a th_info structure with the image's properties, fps, aspect
ratio, colorspace, quality
and pixel_fmt. Then I allocate a th_enc_ctx handle and repeatedly call
Do I have to save this header packets? Do i have to provide this header
packets to the decoder when I
initialize it? Because the documentation says /Parse the header packets
by repeatedly calling
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the theora