On 01/27/2016 06:19 PM, Niels Elburg wrote:
> Yes, using something with a v4l2 loopback device would be the
> quickest setup
> (like ffmpeg -f x11grab -r 25 -s 720x576 -i :0.0+0,0 -vcodec
> rawvideo -pix_fmt yuv422p -f v4l2 /dev/video0)
> and it may even be fast enough, depending on the size of the
> source buffer
I was thinking about using the v4l API directly from within my
application, not going the roundtrip of first rendering to the
screen, grabbing from there and then sending to veejay via v4l.
This way I can also have several non-visible layers rendering and
streaming via v4l in parallel.
> I am not aware of anything that resembles Syphon (on Linux) ...
> or what the status is of "similar" projects
Ok will go with v4l for now then, might keep an eye on what's
happening with that DRI 3 development.
> How to go about this, well that's a tough one!
Getting the pixel data out of an FBO should not be an issue, I
was more asking about the v4l API side of things. I will just
look through the docs for now and see how far I get. Otherwise
the v4l2 output driver of ffmpeg will probably contain the code
I'm searching for.
> If you have something working that renders something to an
> offscreen buffer, I could take a look and see if it can be copied
> to veejays shm
Direct communication via shm might of course be an option,
however I'd look into that only after checking how it performs
when using the v4l API directly. Using this will keep it more
generic and I can e.g. interface with mapmap directly, or
restream the 'device' over a network with vlc etc. so it would be
more generically useful for the time being.
Thanks, I'll keep you updated on any progress!