[Ffmpeg-devel] OpenGL-Streaming ?

Joerg Anders j.anders
Tue Jan 9 12:24:53 CET 2007

Hi all!

I want to use the ffserver to stream a live animation produced
by an OpenGL (Mesa-) based program (virtual reality).

The idea behind this is to send an animation which can be influenced
by the user at the receiving side.

I have already some success with the ffmpeg API. My problem is: I don't know
how to bring the Windows Media player to play a live stream without
sending a "Content-Length:" HTTP header. It seems the "asf" date haeder
must contain an appropriate "play endlessly" (or so) information.

And it seems the ffserver can produce such headers, because it is
possible to set the "FileMaxSize" to zero meaning "unlimited".

My problem is: The ffserver is not prepared for a live stream
created by an OpenGL animation. I tried a named pipe to which the OpenGL-Process
writes asf data and the ffserver reads and sends it. But that does not

So I want to change the source. And I'd like to know your opinion.

Near line 2056 in "ffserver.c" is

       if (av_read_frame(c->fmt_in, &pkt) < 0) { ...

It seems this is the location where a frame is read from the webcam
(video4linux). My idea is to change this:

       if (read_opengel_frame(c->fmt_in, &pkt) < 0) { ...


      static int read_opengel_frame(AVFormatContext *s, AVPacket *pkt) {..}

fills an RGB image and converts it to YUV using "sws_scale".

Any comments ?

J.Anders, GERMANY, TU Chemnitz, Fakultaet fuer Informatik

More information about the ffmpeg-devel mailing list