== Disclaimer ==
This is not a Xiph codec,
but I was asked to post information about Ogg/Kate on this wiki. As such, please do not assume that Xiph has anythingto do with this, much less responsibility.
== What is Kate? ==
a codec for karaoke and text encapsulation for Ogg. Text and images can becarried by a Kate stream, and animated. Most of the time, this would be multiplexedwith audio/video to carry subtitles, song lyrics (with or without karaoke data), etc,but doesn't have to be. A possible use of a lone Kate stream would be an e-book. Moreover, the motion feature gives Kate a powerful means to describe arbitrary curves, sohand drawing of shapes can be achieved. This was originally meant for karaoke use, but can be used for any purpose. Motions can be attached to various semantics, like position, color, etc, so scrolling or fading text can be defined.
== Why a new codec? ==
*text data: text/image and optional motions, accompanied by optional overrides for style, region, language, etc
*keepalive: can be emitted at any time to help a demuxer know where we're at, but those packets are optional
*end data [EOS]: marks the end of the stream, it doesn't have any useful payload
::0x00 text data (including optional motions and overrides)
::0x7f end packet (EOS)
This format described here is for bitstream version 0.x.
For more detailed information, refer to the format documentation
I have patches for the following with Kate support:
(for multiplexed per-language subtitles - all region/style info is ignored)*xine (everything kate supports, as xine is my testbed)
These may be found in the libkate source distribution (see [[#Downloading|Downloading]]
for a stream holds that information in the granule_shift field,
so each part may be reconstructed from a granulepos.
The kate_info structure for a stream holds a rational fraction
=== Generic timing ===
There are a few things to solve before the Kate bitstream format can be considered good
enough to be frozen:
=== Seeking and memory ===
* spu-subtitles - movie subtitles in DVD style paletted images
* lyrics - song lyrics
* transcript - exact words of a speech
* commentary - runnning commentary about an accompanying eg. video
* narration - narration of an accompanying eg. video
* book - a full book as text, might be a lone Kate stream (or muxed with other languages)
Please remember the 15 character limit if proposing other categories.
== Text to speech ==
instead of simple paletted bitmaps in a Kate streams. Comments would be most welcome on
whether this is going too far, however.
A possible solution to the duplication issue is to have another stream in the container
== Reference encoder/decoder ==
A encoder and a decoder are included in the tools directory. The encoder
pulls its input from a customtext based file format (see [[#The Kate file format|The Kate file format]]),which is by no means meant to be part of the Kate bitstream specification itself , from an SubRip (.srt) format file (the most common subtitle format I found , and a very basic one) , or from a lyrics ( . lrc) format file.
The Kate bitstreams encoded and decoded by those tools are (supposed to be) correct for this
And after all, some people might prefer editing the XML version.
== Matroska mapping ==
== Downloading ==
The libkate source distribution is available at [http://libkate.googlecode.com/ http://libkate.googlecode.com/].
libkate encodes and decodes Kate streams, and is API stable.
The libtiger source distribution is available at [http://libtiger.googlecode.com/ http://libtiger.googlecode.com/].
renders Kate streams using Pango and Cairo, and is alpha , with API changes still possible .
== Things I need to get feedback on ==
* is it a good idea to avoid floating point usage altogether ?