Multiple video streams display in gstreamer?

Hi,

I have a custom board based on AM5728 SOC with omnivision 0v5640 camera installed on it running linux. I want to support maximum 4 party conference streams using gstreamer.

POC done for three party conference streaming is as follows:-

Three custom boards namely A, B and C were taken.

On A, a gstreamer pipeline was run to open self camera feed and its self video and audio streams were sent to both B and C. B and C were able to receive the video and audio streams as receiving pipelines were run on each.
Also, on B and C pipelines were run to send their respective video and audio streams to A.

It is needed to display the feeds of both B and C at A. How can that be achieved?

The gstreamer pipelines used are as below:-

######################
Sender Pipeline at A
######################

B=192.168.8.139 #(IP address of party B)
C=192.168.8.140 #(IP address of party C)

A_BVidSendPort=5000
A_BAudSendPort=5001
A_CVidSendPort=5002
A_CAudSendPort=5003

gst-launch-1.0 -e v4l2src device=/dev/video1 io-mode=4 ! \
'video/x-raw,format=(string)YUY2,width=1280,height=720,framerate=(fraction)30/1' ! \
vpe num-input-buffers=8 ! \
queue ! ducatih264enc intra-interval=1 ! \
h264parse ! \
rtph264pay mtu=200 ! \
multiudpsink clients=$B:$A_BVidSendPort,$C:$A_CVidSendPort alsasrc device='hw:0,0' ! \
audioconvert ! \
'audio/x-raw,channels=1,depth=16,width=16,rate=16000,encoding-name=(string)L16' ! \
rtpL16pay ! \
multiudpsink clients=$B:$A_BAudSendPort,$C:$A_CAudSendPort sync=false

######################
Receiver Pipeline at A
######################

#TBD

#####################
Sender Pipeline at B
#####################

B=192.168.8.138 # (IP address of party A)
A=192.168.8.139 # (IP address of party B)

A_BVidSendPort=5004
A_BAudSendPort=5005

gst-launch-1.0 -e v4l2src device=/dev/video1 io-mode=4 ! \
'video/x-raw,format=(string)YUY2,width=1280,height=720,framerate=(fraction)30/1' ! \
vpe num-input-buffers=8 ! \
queue ! ducatih264enc intra-interval=1 ! \
h264parse ! \
rtph264pay mtu=200 ! \
udpsink host=$B port=$A_BVidSendPort alsasrc device='hw:0,0' ! \
audioconvert ! \
'audio/x-raw,channels=1,depth=16,width=16,rate=16000,encoding-name=(string)L16' ! \
rtpL16pay ! \
udpsink host=$B port=$A_BAudSendPort sync=false

########################
#Receiver Pipeline at B
########################

B_AVidSendPort=5000
B_AAudSendPort=5001

gst-launch-1.0 -v udpsrc port=$B_AVidSendPort ! \
'application/x-rtp,media=(string)video, clock-rate=(int)90000, payload=(int)96' ! \
rtph264depay ! \
h264parse ! \
ducatih264dec ! \
vpe ! \
'video/x-raw,format=(string)NV12, width=1280,height=1232' ! \
videoscale sharpen=1 ! \
kmssink sync=false \
udpsrc port=$B_AAudSendPort ! \
"application/x-rtp,media=(string)audio,clock-rate=(int)16000, width=16, height=16,\
encoding-name=(string)L16,\
encoding-params=(string)1, channels=(int)1, channel-positions=(int)1,\
payload=(int)96" !\
rtpL16depay ! audioconvert ! alsasink sync=false

#######################
#Sender pipeline at C
######################

B=192.168.8.138 # (IP address of party A)
A=192.168.8.140 # (IP address of party C)

A_BVidSendPort=5006
A_BAudSendPort=5007

gst-launch-1.0 -e v4l2src device=/dev/video1 io-mode=4 ! \
'video/x-raw,format=(string)YUY2,width=1280,height=720,framerate=(fraction)30/1' ! \
vpe num-input-buffers=8 ! \
queue ! ducatih264enc intra-interval=1 ! \
h264parse ! \
rtph264pay mtu=200 ! \
udpsink host=$B port=$A_BVidSendPort alsasrc device='hw:0,0' ! \
audioconvert ! \
'audio/x-raw,channels=1,depth=16,width=16,rate=16000,encoding-name=(string)L16' ! \
rtpL16pay ! \
udpsink host=$B port=$A_BAudSendPort sync=false

########################
#Receiver pipeline at C
#######################

B_AVidSendPort=5002
B_AAudSendPort=5003

gst-launch-1.0 -v udpsrc port=$B_AVidSendPort ! \
'application/x-rtp,media=(string)video, clock-rate=(int)90000, payload=(int)96' ! \
rtph264depay ! \
h264parse ! \
ducatih264dec ! \
vpe ! \
'video/x-raw,format=(string)NV12, width=1280,height=1232' ! \
videoscale sharpen=1 ! \
kmssink sync=false \
udpsrc port=$B_AAudSendPort ! \
"application/x-rtp,media=(string)audio,clock-rate=(int)16000, width=16, height=16,\
encoding-name=(string)L16,\
encoding-params=(string)1, channels=(int)1, channel-positions=(int)1,\
payload=(int)96" !\
rtpL16depay ! audioconvert ! alsasink sync=false

This is the POC for 3 party conference streaming. Since there are multiple piplelines already in 3 party POC, 4 party conference will have furthermore pipelines added to these.
Wouldn’t it affect the system performance as the number of pipelines are increased?
Also can the sender and receiver pipelines be improved using gstreamer’s mux feature?

Hi,
For receiving at A from B and C I made the pipeline below. But I am getting the error -

Setting pipeline to PAUSED …
0:00:00.678620246 2104 0x1b7240 ERROR ducati gstducatividdec.c:1645:gst_ducati_viddec_change_state: Failed to create codec ivahd_h264dec, not supported
ERROR: Pipeline doesn’t want to pause.
/GstPipeline:pipeline0/GstKMSSink:kmssink0: display-width = 1024
/GstPipeline:pipeline0/GstKMSSink:kmssink0: display-height = 600
/GstPipeline:pipeline0/GstKMSSink:kmssink0: display-width = 0
/GstPipeline:pipeline0/GstKMSSink:kmssink0: display-height = 0
Setting pipeline to NULL …
Freeing pipeline …

Here is my pipeline written in a shell script:-

B_AVidSendPort=5004
C_AVidSendPort=5006
GST_DEBUG=3 gst-launch-1.0 -v udpsrc port=$B_AVidSendPort !
‘application/x-rtp,media=(string)video, clock-rate=(int)90000, payload=(int)96’ !
rtph264depay !
h264parse !
ducatih264dec !
queue ! comp.sink_0
udpsrc port=$C_AVidSendPort !
‘application/x-rtp,media=(string)video, clock-rate=(int)90000, payload=(int)96’ !
rtph264depay !
h264parse !
ducatih264dec !
queue ! comp.sink_1
compositor name=comp
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=640 sink_0::height=480 sink_0::zorder=0 sink_0::alpha=1
sink_1::xpos=640 sink_1::ypos=0 sink_1::width=640 sink_1::height=480 sink_1::zorder=0 sink_1::alpha=1 !
video/x-raw,format=RGBA,width=1280,height=480 ! kmssink

Please help!!

Hi!
This is a gentle reminder. If someone could discuss the issue!! Please help!

Thank you !

Hi,
Do you know what caps are being set in the pipeline?
At first the error seems to be a caps mismatch since the error points to the format not being supported for decoding.

Have you tested having separate receiver pipelines for B and C?

Since the error you shared also points to not being able to PAUSE but this seems after the main issue. It still might be good to test the separate pipelines during the prototyping,