[theora] More examples?
manuel.dahmen at gmail.com
Tue Feb 26 12:26:33 PST 2008
On Tue, 26 Feb 2008 20:54:30 +0100
Yorn <yorn at gmx.net> wrote:
> Hi Manuel,
> have you had a look at wikipedia?
> The explanation is ok, to understand the idea behind YUV (against RGB
> for example)
> As Monty said, the input/output format in theora is YUV420
> That means, the first (width x hight) bytes are representing the
> luminance (Y) of the picture. The U and V are the color(-difference)
> information to blue and red respectivly.
> As the human eye is more focused on luminance than on color, the
> color differences are places in the subsequent (width/2 x hight/2)
> bytes. So that the one color difference is responsible for a square
> of 2x2 luminance pixels.
> All information (Y, U and V) are placed in 8 Bit.
> All this is visualized on the wikipedia picture:
> Hope that helps you.
> - Yorn
> PS: If you want to convert pictures, maybe imagemagick can help you.
> (I never tried it so I do not really know)
Thank you and thanks to Monty too. Now I understand yuv coding.
For the moment I use etheora and libjpeg62 on linux, but I think after
the 1st version of my app I'll use libtheora. For extraction from
video and picture writing I use etheora a very simple function i found
in libjpeg examples, i just have to fill an array with rgb values for
each pixel. I think encoding will be simple, too.
In fact what I want to do is a library for Processing IDE
(processing.org, a java project for graphics and animation creation -
with a scripting language near from Java). My library will add some
- displaying theora videos' frames:
tm = new TheoraMovie("movie.ogg", ... params);
tm.drawNextFrame(x, y , ... other params);
- encoding animation in Theora:
tm = new TheoraMovieMaker("movie.ogg", ... params);
I think it's a good idea because Processing, which is free software,
uses Quicktime for video recording. And Quicktime is not available on
I don't know if there is an Java Library, which uses
libtheora and exposes a very simple API like this...
> Am Montag 25 Februar 2008 13:31:37 schrieb Manuel Dahmen:
> > Hello,
> > I want to make a program to extract frame from a theora movie as
> > images. I tried with the decoding example located at theora web site
> > (dump_video.c. I use it to extract a frame as yuv image but when I
> > try to convert it to ppm with yuvtoppm program i obtain a strange
> > image ( see http://poux.be/tmp/file.ppm ). I think it's a problem
> > with the byte order for yuv, but don't I don't know anything about
> > this format.
> > I'd like to make a simple program to encode chosen frame into ppm.
> > Perhaps it's just ordering properly the bytes issued from the
> > write_video() function in the example and using yuvtoppm to make the
> > conversion.
> > What is the yuv format issued from dump_video.c (444, 422, 420 ?)
> > and when can I find a not-too-hard-to-understand explanation of
> > this format?
> > Thanks in advance for your answers.
> theora mailing list
> theora at xiph.org
More information about the theora