MJPEG Pipeline Very Slow

Tim Müller tim at centricular.com
Wed Aug 11 18:04:51 UTC 2021


Hi Dwight,

> I am trying to stream MJPEG on my IMX8MPLUS. I am using the following
> pipeline, was wondering if you can comment on if there is a way to
> make this faster, I have tried two permutations with the queue and
> without.
> 
> The resulting stream is extremely laggy.

Can you quantify that? Is it delayed? Does it have a much lower
framerate than expected? Both?

What's the receiving application / pipeline you're checking with?



> 2) 
> gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw, width=1920,
> height=1080, framerate=15/1 ! queue ! jpegenc ! queue ! rtpjpegpay
> name=pay0 pt=96 ! udpsink host=192.168.1.50 port=5000
> 

queues are good here.

What kind of camera is the v4l2 device here? Many USB cameras and
webcams will be able to output JPEG directly, in which case you could
save the jpeg encoding step.

Try

gst-launch-1.0 v4l2src device=/dev/video1 !
image/jpeg,width=1920,height=1080,... ! queue ! rtpjpegpay ! ..

Might also be worth checking if the JPEG encoding maxes out any of your
cores to see if that might be limiting throughput.

Cheers
 Tim




More information about the gstreamer-devel mailing list