Is it possible to send OpenGL framebuffer direct to nvh264enc?

Matthew Waters ystreet00 at gmail.com
Wed May 20 07:08:28 UTC 2020


The nvidia encoding elements nv*enc can consume
video/x-raw(memory:GLMemory) formatted buffers.  The restriction for
them is that the GLMemory buffers you create must be from the
GstGLMemoryPBO allocator to allow for access to the PBO object for the
copy to the cuda memory.

This of course only works from a nvenc element created from a cuda
context and as such may not work on windows.

Cheers
-Matt

On 20/5/20 1:09 pm, F32 wrote:
> Hi,
>
> Suppose we have a video game based on OpenGL and we have its source
> code. In order to capture game video, we can call glReadPixels()
> before swapping buffer, and then send the pixels to gstreamer's nvenc
> plugin. In this way, the frame is first sent from GPU memory to system
> memory, and then to GPU again, which seems to be unnecessary.
>
> Is it possible to send the frame buffer direct to nvenc, so that
> there's no extra glupload / gldownload?
>
> Regards
> Windy
>
>
>  
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200520/1e1081f7/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20200520/1e1081f7/attachment-0001.sig>


More information about the gstreamer-devel mailing list