iMX8MM imxvideoconvert_g2d element lose frame

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

iMX8MM imxvideoconvert_g2d element lose frame

612 Views
pyh0603
Contributor III

Hi everyone,

Release: L4.14.98_2.0.0_ga_images_MX8MMEVK.zip

Board: i.MX8MM EVK

I found that adding imxvideoconvert_g2d element  to GStreamer will cause frame loss. Here are some tests I did using the official GStreamer RTSP Demo.

Test conditions:

Input source: /dev/video0 1080p 60fps uyvy format

Player: liveplayer (bin) 20170408

rtsp demo codehttps://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-launch.c

    1.Do not add imxvideoconvert_g2d element, direct transmission after encoding

Enter command:

./test-launch  -p 554  "v4l2src  device=/dev/video0 ! video/x-raw,format=UYVY,width=1920,height=1080 ! queue !  vpuenc_h264 bitrate=4096 ! rtph264pay name=pay0 pt=96"

Test results:

1.png

It is normal that the input source is 60fps and it is still 60fps after transmission

    2.Add imxvideoconvert_g2d element, transmission after encoding

Enter command:

./test-launch  -p 554  "v4l2src  device=/dev/video0 ! video/x-raw,format=UYVY,width=1920,height=1080 ! queue ! imxvideoconvert_g2d ! video/x-raw,width=1920,height=1080 ! videorate ! video/x-raw,framerate=(fraction)60/1 ! vpuenc_h264 bitrate=4096 ! rtph264pay name=pay0 pt=96"

Test results:

2.png

The input source is 60fps. After transmission, it becomes 52 ~ 54fps, so the frame is lost. Moreover, the 4m code rate was originally set, but the player displays only about 3.8m code rate.

    3.Add imxvideoconvert_g2d element, add a videorate element to set the frame rate, and then transmit after encoding

Enter command:

./test-launch  -p 554  "v4l2src  device=/dev/video0 ! video/x-raw,format=UYVY,width=1920,height=1080 ! queue ! imxvideoconvert_g2d ! video/x-raw,width=1920,height=1080 ! videorate ! video/x-raw,framerate=(fraction)60/1 ! vpuenc_h264 bitrate=4096 ! rtph264pay name=pay0 pt=96"

Test results:

3.png

The input source is 60fps, and it is still 60fps after transmission, but the delay will add about 60ms. It is possible to use the video rate element to copy frames until 60fps is met. Therefore, the delay is too large.

 

My current imxvideoconvert_g2d element version:

4.png

My current videorate element version:

5.png

My current vpuenc_h264 element version:

6.png

My question:

  1. How to solve the problem of losing frame rate after adding imxvideoconvert_g2d element without adding additional delay?
  2. Can replacing imxvideoconvert_g2d element with the latest version solve this problem? If yes, please provide the corresponding version number?
  3. I found that this problem only exists at 1080p and 60fps. Can the hardware performance only reach this level and cannot be optimized?

 

Labels (1)
0 Kudos
1 Reply

600 Views
igorpadykov
NXP Employee
NXP Employee

Hi Peng

 

L4.14.98_2.0.0 is old release, may be recommended to try with latest L5.10.52_2.1.0

and imx-gst1.0-plugin version

https://source.codeaurora.org/external/imx/imx-gst1.0-plugin/tree/?h=MM_04.06.03_2110_L5.10.y

https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applicat...

 

Best regards
igor

0 Kudos