Efficiently change color space for vaapih264enc
Nicolas Dufresne
nicolas at ndufresne.ca
Wed Oct 23 14:33:14 UTC 2019
Le mer. 23 oct. 2019 11 h 55, ambyjkl <ambareeshbalaji at gmail.com> a écrit :
> Hi everyone, I have a pipeline where I want to record the screen into an
> h264
> stream using vaapi. Here is what I'm doing at the moment
>
> gst-launch-1.0 \
> ximagesrc use-damage=false \
> ! queue \
> ! videorate ! video/x-raw,framerate=2993/100 \
> ! glupload ! glcolorconvert ! gldownload
> ! video/x-raw,format=I420,framerate=2993/100 \
> ! vaapih264enc \
> ! fakesink
>
> As you can see I'm trying to utilize the gpu as much as possible. Since
> vaapi caps expect the video to be one of a few supported color channels,
> I'm
> having to convert color spaces. But the sad part is, on my setup, the
> glcolorconvert part is using more than double the CPU of everything else
> combined! This is because of the extra copying overhead of glupload !
> glcolorconvert ! gldownload, which copies into a gl buffer and back.
> However, this still seems to be faster than a CPU driven videoconvert in my
> case.
Please consider using vaapipostproc
> Since the final destination is vaapi anyway which is on the GPU, is there a
> way to optimize the pipeline by avoiding the gldownload and have vaapi work
> directly on the gl buffer? If not, is there something like vaapipostproc
> that would let vaapi manage the color space conversion itself *before* the
> encoding?
>
> Thanks :)
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> 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/20191023/2514a110/attachment.html>
More information about the gstreamer-devel
mailing list