[libav-api] Help getting started with Windows.

Ulrich von Zadow coder at c-base.org
Mon Oct 31 20:33:05 CET 2011


On Oct 31, 2011, at 4:08 PM, Aaron San Filippo wrote:
> 
> What I'm trying to do: I'm capturing openGL framebuffer output each frame, from a plugin in a cross-platform 3D engine. 
> At the moment I'm capturing each frame as a simple BGR buffer. Maybe there's a trivial raw output format I could write to and then pass to libav in one shot? best performance is important here as this is a process that will run on a server that we pay by the hour for, so I'm assuming that writing a sequence of images and then reading from that would be sub-optimal. But perhaps that's a faulty assumption.

Have a look at the code here (part of libavg):

http://www.libavg.de/browser/trunk/libavg/src/player/VideoWriter.cpp and 
http://www.libavg.de/browser/trunk/libavg/src/player/VideoWriterThread.cpp

It downloads buffers from the graphics card and forwards them to a second thread that writes them to disk using libav, so everything runs in parallel. This takes next to zero time on the rendering thread :-). The output format we use is MJPEG, which doesn't take much CPU power to compress.

As bonus, there is a code path that does color space conversion to YUV on the GPU, saving you more than 50% of the compression time.

Of course, you'll have to extract the relevant parts of the code...

Cheers,

  Uli

--
Any technology distinguishable from magic is insufficiently advanced.

Ulrich von Zadow | +49-172-7872715
Jabber: coder at c-base.org
Skype: uzadow

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libav.org/pipermail/libav-api/attachments/20111031/225a89ef/attachment.html>


More information about the libav-api mailing list