FPS Drop When Streaming Monochrome Camera Using GStreamer (IMX8MPlus)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FPS Drop When Streaming Monochrome Camera Using GStreamer (IMX8MPlus)

592 Views
Olivia
Contributor I

Hi everyone,

I’m facing a performance issue with streaming from an IMX8MPlus camera using GStreamer. Here's what's happening:

Command 1: Fake Video Sink (Testing FPS)

gst-launch-1.0 -v v4l2src device=/dev/video2 ! video/x-raw,format=GRAY8,width=1280,height=720,framerate=60/1 ! videoconvert ! fpsdisplaysink video-sink=fakevideosink sync=false

In this case, I’m just testing the FPS, and I get a stable ~106 FPS without any issues. Here's part of the debug log output:

/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstFakeVideoSink:fakevideosink0/GstFakeSink:sink: sync = false
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 56, dropped: 0, current: 110.36, average: 110.36
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 56, dropped: 0, current: 110.36, average: 110.36

Command 2: Autovideosink (Streaming)

gst-launch-1.0 -v v4l2src device=/dev/video2 ! video/x-raw,format=GRAY8,width=1280,height=720,framerate=60/1 ! videoconvert ! fpsdisplaysink text-overlay=true video-sink=autovideosink sync=false

When I try to stream using autovideosink, the FPS drops drastically to ~7 FPS, and the streaming performance is really poor. Here’s the log output:

/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:autovideosink0/GstWaylandSink:autovideosink0-actual-sink-wayland: sync = false
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 5, dropped: 0, current: 9.77, average: 9.77
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 5, dropped: 0, current: 9.77, average: 9.77

Questions:

  • How can I resolve this FPS drop when using autovideosink for streaming?

  • Are there any GStreamer pipeline tweaks or configurations that could help improve performance in this case?

Any suggestions would be greatly appreciated!

Thanks!

0 Kudos
Reply
2 Replies

545 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

Apparently is the GRAY8 that is not currently default by gstreamer however you can see more pipelines in the following guide:

https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/imx-processors%40tkb/15/2/i.MX8GStreamer...

 

regards

0 Kudos
Reply

363 Views
Olivia
Contributor I
Hello,

I'm working on an i.MX8M Plus platform and capturing grayscale video from a monochrome camera at 1280x720@60fps using v4l2src, which outputs video/x-raw, format=GRAY8.

I currently use videoconvert to convert GRAY8 to I420 or NV12, so that I can pass it to imxvideoconvert_g2d or display it with autovideosink. However, videoconvert appears to be CPU-bound and is limiting my pipeline to around 25 FPS.

My goal is to achieve full 60 FPS using hardware-accelerated paths only.

Is there any GStreamer element (ideally hardware-accelerated or zero-copy capable) that accepts GRAY8 input directly, bypassing the need for videoconvert?
0 Kudos
Reply