Thanks, that looks very close to what I'm trying to do.
For now I'd just be thrilled to get a version of Libav to compile :)

I think I'm going to tinker with trying to write a raw video file with and
then use the command line and avoid this MSVC headache for a bit.

I *just* managed to get a test working in that vein, albeit with an upside
down image and apparently the wrong pixel format  - progress!

So - it seems the default x264 codec doesn't support bgr24 as an input
format - I get this warning during the convert:

Incompatible pixel format 'bgr24' for codec 'libx264', auto-selecting
format 'yu
v420p'
However the colors actually look right, at least to my eyes. Is this doing
a bgr24->yuv420 conversion under the hood for me?

Thanks again for the help so far.

-Aaron



On Mon, Oct 31, 2011 at 2:33 PM, Ulrich von Zadow <[email protected]> wrote:

>
> 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: [email protected]
> Skype: uzadow
>
>
> _______________________________________________
> libav-api mailing list
> [email protected]
> https://lists.libav.org/mailman/listinfo/libav-api
>
>
_______________________________________________
libav-api mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-api

Reply via email to