Etheora

From XiphWiki

(Difference between revisions)
Jump to: navigation, search
(initial info about etheora.)
(cleanup)
 
(11 intermediate revisions not shown)
Line 1: Line 1:
-
'''Etheora''' is a a simplified API to programming theora video encoding/decoding applications with ogg containers. It uses and  encapsulates libtheora + libogg API and structures, so users need to know very few  about video and data containers.
+
'''Etheora''' is a a simplified API for programming [[Theora]] video encoding/decoding applications with [[Ogg]] containers. It uses and  encapsulates libtheora + libogg API and structures, so users need to know very few  about video and data containers.
 +
 
 +
== Overview - Encoding ==
An encoding process is made by these steps:
An encoding process is made by these steps:
-
<nowiki>
 
-
/*a context declaration.*/
 
-
etheora_ctx *ec;
 
-
/*encoder configuration.*/
+
/* a context declaration. */
-
etheora_enc_configure(&ec, width, height, ETHEORA_ASPECT_NORMAL,
+
etheora_ctx ec;
-
fopen("output-video.ogg"), fopen("debug_info.txt"));
+
-
/*encoder start.*/
+
/* encoder configuration. */
-
etheora_enc_start(&ec);
+
etheora_enc_setup(&ec, width, height, ETHEORA_ASPECT_NORMAL,
 +
fopen("output-video.ogv"), fopen("debug_info.txt"));
-
/*drawing next frame, by puting a r,g,b or y,u,v pixel in (i,j) coordinate*/
+
/* encoder start. */
-
etheora_enc_rgb_draw(&ec, i, j, r, g, b) (alternative: etheora_enc_yuv_draw()),
+
etheora_enc_start(&ec);
-
/*submiting frame to encoding.*/
+
/* drawing next frame, by puting a r,g,b or y,u,v pixel in (i,j) coordinate */
-
etheora_enc_nextframe(&ec);
+
etheora_enc_rgb_draw(&ec, i, j, r, g, b);
 +
/* alternative: etheora_enc_yuv_draw()) */
-
/*submiting last frame to encoding by finishing the process.*/
+
/* submiting frame to encoding. */
-
etheora_enc_finish(&ec);
+
etheora_enc_nextframe(&ec);
 +
/* submiting last frame to encoding by finishing the process. */
 +
etheora_enc_finish(&ec);
 +
 +
The functions _yuv_ and _rgb_ works transparently with OC_PF_420, OC_PF_422 and OC_PF_PF_444, having the libtheora version used support for them or not.
 +
 +
== Overview - Decoding ==
The decoding process is quite similar.
The decoding process is quite similar.
-
/*a context declaration.*/
 
-
etheora_ctx *ec;
 
-
/*decoder configuration.*/
+
/* a context declaration. */
-
etheora_dec_configure(&ec, fopen("input-video.ogg"), fopen("debug_info.txt"));
+
etheora_ctx ec;
-
/*decoder start.*/
+
/* decoder configuration. */
-
etheora_dec_start(&ec);
+
etheora_dec_setup(&ec, fopen("input-video.ogv"), fopen("debug_info.txt"));  
-
/*reading video data.*/
+
/* decoder start. */
-
etheora_get_width(&ec);
+
etheora_dec_start(&ec);  
-
etheora_get_heigth(&ec);
+
-
etheora_get_fps_numerator(&ec);
+
-
etheora_get_fps_denominator(&ec);
+
-
etheora_get_aspect_numerator(&ec);
+
-
etheora_get_aspect_denominator(&ec);
+
-
/*getting next frame by decoding it.*/
+
/* reading video data. */
-
etheora_dec_nextframe(&ec);
+
etheora_get_width(&ec);
 +
etheora_get_heigth(&ec);
 +
etheora_get_fps_numerator(&ec);
 +
etheora_get_fps_denominator(&ec);
 +
etheora_get_aspect_numerator(&ec);
 +
etheora_get_aspect_denominator(&ec);
-
/*getting frame data, by reading a r,g,b or y,u,v pixel in (i,j) coordinate*/
+
/* getting next frame by decoding it. */
-
etheora_dec_rgb_read(&ec, i, j, &r, &g, &b) (alternative:
+
etheora_dec_nextframe(&ec);
-
etheora_dec_yuv_read()),
+
-
/* finishing the process.*/
+
/* getting frame data, by reading a r,g,b or y,u,v pixel in (i,j) coordinate*/
-
etheora_dec_finish(&ec);
+
etheora_dec_rgb_read(&ec, i, j, &r, &g, &b)
 +
/* alternative: etheora_dec_yuv_read()) */
-
the functions _yuv_ and _rgb_ works transparently with OC_PF_420,
+
/* finishing the process. */
-
OC_PF_422 and OC_PF_PF_444, having the libtheora version used support
+
etheora_dec_finish(&ec);
-
for them or not.
+
 
-
</nowiki>
+
The functions _yuv_ and _rgb_ works transparently with OC_PF_420, OC_PF_422 and OC_PF_PF_444, having the libtheora version used support for them or not.
 +
 
 +
== Overview - Going Further ==
Etheora is documented here:
Etheora is documented here:
-
http://svn.xiph.org/branches/etheora-0.1/doc/etheora_documentation.pdf
+
http://svn.xiph.org/branches/etheora-0.1.1/doc/etheora_documentation.pdf
Etheora code is here:
Etheora code is here:
-
http://svn.xiph.org/branches/etheora-0.1/src/
+
http://svn.xiph.org/branches/etheora-0.1.1/src/
 +
 
 +
Etheora very simple examples are found here:
 +
http://svn.xiph.org/branches/etheora-0.1.1/examples/
 +
 
 +
Etheora still doesn't have audio/speech support. (Although it can get video data from videos with audio). And uses internally the old libtheora API (ie, not the theora-exp). FIXME: The theora-exp API is what's used now on libtheora 1.0.  Please use that API instead.
 +
 
 +
== TODO ==
 +
 
 +
* Vorbis support
 +
* Speex support
 +
* Skeleton support
-
Etheora examples are here:
+
== See also ==
-
http://svn.xiph.org/branches/etheora-0.1/examples/
+
{{Theora}}
-
Etheora still doesn't have audio/speech support. (Although it can get video data from videos with audio). And uses internally the old libtheora API (ie, not the theora-exp).
+
[[Category:Theora]]

Latest revision as of 22:02, 6 July 2008

Etheora is a a simplified API for programming Theora video encoding/decoding applications with Ogg containers. It uses and encapsulates libtheora + libogg API and structures, so users need to know very few about video and data containers.

Contents

Overview - Encoding

An encoding process is made by these steps:

/* a context declaration. */
etheora_ctx ec;
/* encoder configuration. */
etheora_enc_setup(&ec, width, height, ETHEORA_ASPECT_NORMAL,
fopen("output-video.ogv"), fopen("debug_info.txt"));
/* encoder start. */
etheora_enc_start(&ec);
/* drawing next frame, by puting a r,g,b or y,u,v pixel in (i,j) coordinate */
etheora_enc_rgb_draw(&ec, i, j, r, g, b);
/* alternative: etheora_enc_yuv_draw()) */
/* submiting frame to encoding. */
etheora_enc_nextframe(&ec);
/* submiting last frame to encoding by finishing the process. */
etheora_enc_finish(&ec);

The functions _yuv_ and _rgb_ works transparently with OC_PF_420, OC_PF_422 and OC_PF_PF_444, having the libtheora version used support for them or not.

Overview - Decoding

The decoding process is quite similar.

/* a context declaration. */
etheora_ctx ec;
/* decoder configuration. */
etheora_dec_setup(&ec, fopen("input-video.ogv"), fopen("debug_info.txt")); 
/* decoder start. */
etheora_dec_start(&ec); 
/* reading video data. */
etheora_get_width(&ec);
etheora_get_heigth(&ec);
etheora_get_fps_numerator(&ec);
etheora_get_fps_denominator(&ec);
etheora_get_aspect_numerator(&ec);
etheora_get_aspect_denominator(&ec);
/* getting next frame by decoding it. */
etheora_dec_nextframe(&ec); 
/* getting frame data, by reading a r,g,b or y,u,v pixel in (i,j) coordinate*/
etheora_dec_rgb_read(&ec, i, j, &r, &g, &b)
/* alternative: etheora_dec_yuv_read()) */
/* finishing the process. */
etheora_dec_finish(&ec);

The functions _yuv_ and _rgb_ works transparently with OC_PF_420, OC_PF_422 and OC_PF_PF_444, having the libtheora version used support for them or not.

Overview - Going Further

Etheora is documented here: http://svn.xiph.org/branches/etheora-0.1.1/doc/etheora_documentation.pdf

Etheora code is here: http://svn.xiph.org/branches/etheora-0.1.1/src/

Etheora very simple examples are found here: http://svn.xiph.org/branches/etheora-0.1.1/examples/

Etheora still doesn't have audio/speech support. (Although it can get video data from videos with audio). And uses internally the old libtheora API (ie, not the theora-exp). FIXME: The theora-exp API is what's used now on libtheora 1.0. Please use that API instead.

TODO

  • Vorbis support
  • Speex support
  • Skeleton support

See also

Personal tools


Main Page

Xiph.Org Projects

Audio—

Video—

Text—

Container—

Streaming—