Video stream lag and “set rotate failed” warnings when using imxcompositor_g2d plugin

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Video stream lag and “set rotate failed” warnings when using imxcompositor_g2d plugin

560 次查看
Olivia
Contributor I

 

Hi all,

When I run this GStreamer pipeline using the imxcompositor_g2d plugin:

GST_DEBUG=3 gst-launch-1.0 \
v4l2src device=/dev/video2 io-mode=2 ! \
video/x-raw,format=GRAY8,width=1280,height=720,framerate=60/1 ! \
queue max-size-buffers=3 leaky=downstream ! \
videoconvert n-threads=8 ! \
video/x-raw,format=NV12 ! \
imxcompositor_g2d name=comp ! \
queue ! \
fpsdisplaysink sync=false text-overlay=true video-sink=autovideosink

 I get a reported FPS of about 60 fps, but the video stream is visibly lagging. The logs repeatedly show this warning:

imxcompositor gstimxcompositor.c:1556:gst_imxcompositor_aggregate_frames:<comp:sink_0> set rotate failed 0xaaab07b7aea0

Without using imxcompositor_g2d, the stream runs smoothly at about 25 fps with no lag.

I want to understand:

  1. Is the “set rotate failed” warning related to the lag and dropped frames?

  2. If not, what might be causing the lag when using imxcompositor_g2d despite the higher FPS reported?

  3. Any suggestions on how to resolve or mitigate this lag?

Thanks!

 

 

 

0 项奖励
回复
3 回复数

528 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

A reported 60 FPS with visible lag in your stream likely indicates a problem with how the stream is being encoded or transmitted, Here's a breakdown of potential issues and how to troubleshoot:

 

 

 Encoding/Streaming Software:
  • Bitrate:
    The bitrate (amount of data per second) you're using for your stream might be too high, even if you are running at 60 FPS. 
     
     
    Encoder Settings:
    Experiment with different encoder settings in your streaming software to see if you can find a better balance between quality and stream stability. 
     
     
    CPU Load:
    If your MX8 is struggling to encode the stream in real-time, it can lead to lag. Consider using a dedicated GPU for encoding if possible. 
 

 

 
Troubleshooting Steps:
Adjust your bitrate:
Lower your bitrate to match your upload speed. You can start by trying a lower bitrate and see if that improves the stream's stability. 
 
  • Close unnecessary processes:
    Make sure you're not running too many background process that are consuming CPU resource
     
    Regards

 

0 项奖励
回复

524 次查看
Olivia
Contributor I
Thanks for the response!

Just to clarify, I’m not encoding or streaming the video — the pipeline is just capturing from a camera and displaying the live feed locally using fpsdisplaysink and autovideosink. There is no encoding or network transmission involved.

The lag only appears when using imxcompositor_g2d, even though the FPS is reported as 60. Without imxcompositor_g2d, I get around 25 FPS, but the video is smooth and without lag.

I’m suspecting the compositor might be buffering frames or introducing latency due to how it processes frames or tries to apply rotation (as hinted by the repeated “set rotate failed” warnings).

Could this internal handling by imxcompositor_g2d (possibly failed transform attempts or extra buffering) be causing the lag even though the FPS is high?

Would love your thoughts on whether this is a known behavior or how to reduce latency while using imxcompositor_g2d.
0 项奖励
回复

466 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

Yes this is well know behavior of imxcompositor, our developers are working to get fixed, but so far nothing, sorry, is the way is works.

regards

0 项奖励
回复