GST quad compositor resulting in slow video via rtspserver

cancel
Showing results for 
Search instead for 
Did you mean: 

GST quad compositor resulting in slow video via rtspserver

320 Views
mercyyuen
Contributor II

To save bandwidth, I'm trying to make a composite of 4 separate videos and streaming them out as one stream. I am using the test-launch program that comes with the gst-rtspserver.

the shmsink socket is being populated using this pipeline

'''

gst-launch-1.0 rtspsrc location=rtsp://192.168.200.2/$chan \
     ! decodebin ! videoconvert ! videoscale ! videorate \
     ! "video/x-raw,format=I420,framerate=15/1"  \
     ! shmsink socket-path=/tmp/cam$chan shm-size=2000000 wait-for-connection=false sync=false async=false

'''

This command with a quad composite works, but the videos are playing at a slower rate and lag more and more as the time passes.

./test-launch --gst-debug=3 "( imxipucompositor name=c \
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=720 sink_0::height=480 \
sink_1::xpos=720 sink_1::ypos=0 sink_1::width=720 sink_1::height=480 \
sink_2::xpos=0 sink_2::ypos=480 sink_2::width=720 sink_2::height=480 \
sink_3::xpos=720 sink_3::ypos=480 sink_3::width=720 sink_3::height=480 \
! queue2 ! video/x-raw, width=1440, height=960 ! queue ! imxvpuenc_h264 idr-interval=32 bitrate=2500 ! rtph264pay name=pay0 pt=96 \
shmsrc socket-path=/tmp/cam1 is-live=true do-timestamp=true \
! video/x-raw, format=I420, width=720, height=480, framerate=15/1, interlace-mode=progressive ! queue2 ! c.sink_0 \
shmsrc socket-path=/tmp/cam2 is-live=true do-timestamp=true ! \
video/x-raw, format=I420, width=720, height=480, framerate=15/1, interlace-mode=progressive ! queue2 ! c.sink_1 \
shmsrc socket-path=/tmp/cam3 is-live=true do-timestamp=true \
! video/x-raw, format=I420, width=720, height=480, framerate=15/1, interlace-mode=progressive ! queue2 ! c.sink_2 \
shmsrc socket-path=/tmp/cam4 is-live=true do-timestamp=true \
! video/x-raw, format=I420, width=720, height=480, framerate=15/1, interlace-mode=progressive ! queue2 ! c.sink_3 )"

 

If I use the same pipeline as above but send it to the HDMI output instead of the rtspserver, the delay disappears.  Also, if I remove one video and make this a 3-video composite, the delay also disappears. I wonder if this is a limitation with my imx6 hardware? Or perhaps if there is a setting in my rtspserver that I need to set?  Anyone have any ideas?

0 Kudos
2 Replies

298 Views
mercyyuen
Contributor II

How would you suggest reducing the resolution?  From the sending script? Or from the receiving? It would really help if you could post a sample pipepline on how to reduce the resolution.

I have found a solution, but I'm wondering if there is a better solution?  I reduce the resolution from the send script by adding height and width.  but I had to pt in the element imxg2dvideotransform to make sure that the receiving script would be able to translate the package correctly. 

0 Kudos

307 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello mercyyuen,

This is a limitation of i.MX6 or you have to reduce the resolution.

Regards

0 Kudos