Very low performance of imx6 with gstreamer rtp ?

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

Very low performance of imx6 with gstreamer rtp ?

2,331 Views
rans
Senior Contributor I

Hello,

We are using imx6 quad sabresd.

we use yocto morti. yocto morti was added with gstreamer plugin from community.

We try a very simple test with gstreamer:

gst-launch-1.0 testvideosrc! video/x-raw,width=1280,height=1024 autovideosink.

The video appears in rate slow on screen , and there are warning that the cpu is too slow.

With "top" we see that it get 100% cpu usage.

Does it make sense that such a simple pipeline gets 100% cpu ?

We also tried to test with yocto jethro, but get the same behaviour.

yocto jethro does was not added with community plugin.

We also wanted to verify that gpu workjing, but trying to execute the test fails (in both yocto images...):

The gpu test does not work (it says it is missing /opt/viv... / is imssing)

Do you have the same result under you imx6 quad sabresd or are we  using gstreamer in some wrong way?

Thank you,

Ran

0 Kudos
8 Replies

1,652 Views
rans
Senior Contributor I

HelloYuri

I have not find in section 7 how to use gpu with gstreamer.

Is it possible that our imx6 quad does not support gpu ?

Thank you

0 Kudos

1,652 Views
Yuri
NXP Employee
NXP Employee

Hello,

  Although i.MX6Q has GPU, for Your case GPU is not needed, just use 

overlaysink or imxv4l2sink elements.

  Also, queue max-size-buffers=0  and max-size-time=0  options may help.

Regards,

Yuri.

0 Kudos

1,652 Views
rans
Senior Contributor I

Hן Yuri,

 

Can you please see if the above pipeline should work correctly with imx6 quad ? We don't yet understand why we get low performance with simple gstreamer pipeline. We are not sure it use gpu.

We might need to re-think if imx6 can be used in our project, if it has such low performance capability.

Another question is why do you think  that the above pipeline doesn't require gpu , I mean, can't gpu be use for all 2d/3d graphics  ?

 

Thanks

Ran

0 Kudos

1,652 Views
Yuri
NXP Employee
NXP Employee

Hello,

  Looks like GST item autovideosink does not use optimized for i.MX6 elements.

Please try overlaysink or imxv4l2sink elements, as shown in "i.MX_Linux_User's_Guide.pdf".

The overlaysink plugin is based on the GPU. But mainly GPU is intended for graphics.

 

Regards,

Yuri.

0 Kudos

1,652 Views
rans
Senior Contributor I

Hi Yuri,

Thanks for the assistance.

We are close to giving up for doing it with imx6. We thought that its gpu/cpu should handle this (rtp with resolution of 1240,1020)

This is what we tried:

1. Change screen settings to support 32 bit per pixel:

fbset -depth 32 -xres 1920 -yres 1080 

2. --- Linux Ubuntu sender (bouncing ball)-----

gst-launch-1.0 -v videotestsrc pattern=18 ! video/x-raw,width=1280,height=1024,framerate=25/1,sampling=YCbCr-4:2:0 ! rtpvrawpay ! udpsink host=192.168.204.101 port=5000

3. --- Imx.6 reciever using display sink with GPU support ( imxg2dvideosink ) -----

gst-launch-1.0 -v udpsrc port=5000 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)RAW,width=(string)1280,height=(string)1024, payload=(int)96,sampling=YCbCr-4:2:0" ! rtpvrawdepay ! imxg2dvideosink use-vsync=true 

Doing the same test with intel cpu, works fine.

If we reduce the resolution in imx6 test to a lower resolution width=(string)320,height=(string)340, then it works much better (yet, still not perfect even then)

We think that maybe imx6 is just too weak for doing this in cpu/gpu, but in order to check this assumption we need to do GPU profiling, right ? 

cpu load is ~30% , so in order to check this assumption we must do a gpu profiler test. But I see in some threads in community that there is a bug in vivante profiler kit which always shows 100% usage.

I also suspect that gpu might be in full load , according to this benchmarks, which might explain why the same rtp test works fine with Intel's cpu, but not with imx6:

GeForce 210 67 GFLOPs
Intel HD4400 with i3-CPU (2.9GHz) 105 GFLOPS
NVIDIA GT610 156 GFLOPs
NVIDIA GTX970 4087 GFLOPs
imx6 quad 21.6 GFLOPS

What do you think we can try now ?

Should the profiler answer if it is 100% usage (I am not sure how to understand it's usage if it always shows 100% usage) ?

Thank you for any idea,

Ran

0 Kudos

1,652 Views
Yuri
NXP Employee
NXP Employee

Hello,

Also, as has been mentioned buffering can help: try parameters 

 queue max-size-buffers  and max-size-time .

Regards,

Yuri.

0 Kudos

1,652 Views
rans
Senior Contributor I

Dear Yuri,

Thank you for suggestions.

It still did not help.

I suspect that maybe the serial terminal collide with gstreamer.

I disabled desktop environment with:

systemctl set-default multi-user.target

But xterm is still there. I am not sure how to get rid of it.

On stopping the gstreamer pipeline it always shows again the xterm, so not sure how to get rid of it.

Trying with kill -9 [pid] did not help, becuase it always opens another one.

Do you think it is issue of collision between xterm and gstreamer ?

How to disable xterm ?

Another thing which make us suspect xterm is that after reset we see with mmdc profiler that there is about 450MB/s read bandwidth. and in hdmi output we have the xterm.

Maybe the problem is that it is based on yocto x11 distribution, and we can't get rid of x11 servers ?

Thank you for any ideas.

Regards,

Ran

0 Kudos

1,652 Views
Yuri
NXP Employee
NXP Employee

Hello,

  Looks like software implementation of GST elements is used in Your case.

  Please try the recent NXP BSP and examples in section 7 (Multimedia)

of "i.MX_Linux_User's_Guide.pdf", that are intended to involve hardware 

options of i.MX6.

https://www.nxp.com/webapp/Download?colCode=L4.9.11_1.0.0_LINUX_DOCS 

i.MX 6 / i.MX 7 Series Software and Development Tool|NXP 

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos