Gstreamer h264 udp stream is to laggy

Nicolas Dufresne nicolas.dufresne at gmail.com
Fri Nov 4 14:29:25 UTC 2016


Le vendredi 04 novembre 2016 à 02:41 -0700, kingalione a écrit :
> Hi Nicolas,
> 
> thanks for your help. I tried your solution and it didn't helped
> much. I
> still got a lag 3-5 seconds long. How can I enable an HW encoder for
> my
> platform?
> 
> I'm running gstreamer on a Intel Nuc celeron with linux ubuntu 14.04
> 

If it's supported by this HW, the encoder will be provided by
gstreamer-vaapi. Ubuntu 14.04 built-in gstreamer is too old. You likely
want to try with something really really recent, but check if this NUC
have such encoding HW, they don't all have it.

Note, you are likely chasing the wrong target. I just notice that you
capture at 2K from the camera, and SW convert + scale to 600x450.
That's ways too much for the NUC CPU. Try scaling in GL, you'll pay the
cost of upload/download, but it's more likely to work.

If you have a really recent version of the linux kernel and GStreamer,
you can make the upload zero-copy using dmabuf, something like:

  v4l2src io-mode=dmabuf ! glfilterbin filter="glcolorscale" ! x264enc ...

Replace x264enc with vaapih264enc if you have it for better perf.

regards,
Nicolas


More information about the gstreamer-devel mailing list