<div dir="ltr"><div dir="ltr"><div>Hi Tim,</div><div><br></div><div>I rechecked the CPU and it turns out that if I run gst-launch-1.0  it is only using 25% of the CPU, and it's actually faster than what I reported. The latency is 1 second or so, and the fps is 2-3 fps. When I run it through my application that includes g-streamer library it slows down a lot more and has a 6 second delay and barely 1 fps, so that might indicate a different problem in the application.<br></div><div><br></div><div>My question is that if gst-launch-1.0 is only using up 25% of the CPU but it is not meeting my frame rate needs, is there a way to use more cores from the gst-launch-1.0 command ?<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 11, 2021 at 2:58 PM Dwight Kulkarni <<a href="mailto:dwight@realtime-7.com">dwight@realtime-7.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Hi Tim,</div><div><br></div><div><i>Can you quantify that? Is it delayed? Does it have a much lower<br>
framerate than expected? Both?</i></div><div><br></div><div><b>>> There is a 6 second delay and the frame rate is around 1 fps. For testing, we have tried a VLC client rtsp network stream, and also used the following Gstreamer command:</b></div><div><b><br></b></div><div><b>src: </b><br></div><div>gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw, width=1920, height=1080, framerate=15/1 ! jpegenc ! rtpjpegpay name=pay0 pt=96 ! udpsink host=192.168.1.50 port=5000</div><div><b><br></b></div><div><b>client:<br></b></div><div>gst-launch-1.0 udpsrc port=5000 ! application/x-rtp, encoding-name=JPEG, payload=96 ! rtpjpegdepay ! jpegparse ! jpegdec ! autovideosink<b></b></div><div><b><br></b></div><div><b><br></b></div><div><i>What kind of camera is the v4l2 device here? Many USB cameras and<br>
webcams will be able to output JPEG directly, in which case you could<br>
save the jpeg encoding step.</i></div><div><b><br></b></div><div><b><b>>>Camera sensor is <span id="gmail-m_-2984102363570623041gmail-:p3.co" style="text-align:left" dir="ltr">OV5640 by OmniVision over MIPI   </span></b></b></div><div><b>>>Regarding JPEG output, our current camera is by default giving out RAW BAYER output. We are looking into if it is possible to have the sensor output JPEG, when I tried your pipeline with current settings, it gave an error as shown below.</b></div><div><b><span id="gmail-m_-2984102363570623041gmail-:p3.co" style="text-align:left" dir="ltr"><br></span></b></div><div><br></div><div><br></div><div>gst-launch-1.0 v4l2src device=/dev/video1 ! image/jpeg, width=1920, height=1080, framerate=15/1 ! queue  max-size-bytes=50000000 max-size-time=500000000 max-size-buffers=10  ! jpegparse ! identity sync=true ! queue max-size-bytes=50000000 max-size-time=500000000 max-size-buffers=10  ! rtpjpegpay name=pay0 pt=96 ! udpsink host=192.168.1.50 port=5000</div><div><br></div><div>Setting pipeline to PAUSED ...<br>Pipeline is live and does not need PREROLL ...<br>Setting pipeline to PLAYING ...<br>New clock: GstSystemClock<br>ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.<br>Additional debug info:<br>../../../../git/libs/gst/base/gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:<br>streaming stopped, reason not-negotiated (-4)<br>Execution ended after 0:00:00.000647375<br>Setting pipeline to PAUSED ...<br>Setting pipeline to READY ...<br>Setting pipeline to NULL ...<br>Freeing pipeline ...<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 11, 2021 at 2:04 PM Tim Müller <<a href="mailto:tim@centricular.com" target="_blank">tim@centricular.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Dwight,<br>
<br>
> I am trying to stream MJPEG on my IMX8MPLUS. I am using the following<br>
> pipeline, was wondering if you can comment on if there is a way to<br>
> make this faster, I have tried two permutations with the queue and<br>
> without.<br>
> <br>
> The resulting stream is extremely laggy.<br>
<br>
Can you quantify that? Is it delayed? Does it have a much lower<br>
framerate than expected? Both?<br>
<br>
What's the receiving application / pipeline you're checking with?<br>
<br>
<br>
<br>
> 2) <br>
> gst-launch-1.0 v4l2src device=/dev/video1 ! video/x-raw, width=1920,<br>
> height=1080, framerate=15/1 ! queue ! jpegenc ! queue ! rtpjpegpay<br>
> name=pay0 pt=96 ! udpsink host=192.168.1.50 port=5000<br>
> <br>
<br>
queues are good here.<br>
<br>
What kind of camera is the v4l2 device here? Many USB cameras and<br>
webcams will be able to output JPEG directly, in which case you could<br>
save the jpeg encoding step.<br>
<br>
Try<br>
<br>
gst-launch-1.0 v4l2src device=/dev/video1 !<br>
image/jpeg,width=1920,height=1080,... ! queue ! rtpjpegpay ! ..<br>
<br>
Might also be worth checking if the JPEG encoding maxes out any of your<br>
cores to see if that might be limiting throughput.<br>
<br>
Cheers<br>
 Tim<br>
<br>
<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><span style="font-size:12.8px">Sincerely,</span><div><br></div><div>Dwight Kulkarni                </div><br></div></div></div></div></div></div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><span style="font-size:12.8px">Sincerely,</span><div><br></div><div>Dwight Kulkarni                </div><br></div></div></div></div></div></div></div>