AnsweredAssumed Answered

gstreamer dual rendering from webcams

Question asked by jerome bolduc on Mar 1, 2017
Latest reply on Mar 3, 2017 by jerome bolduc

Hello,

We are having issues with gstreamer using dual USB webcam when we render them through HDMI.

We are using the Variscite VAR-SOM-MX6 Quad. We have the same problem using the NXP SabreSD DualLite processor.

 

When we render 2x Logitech C930 webcams at 720p30 MJPEG onto screen, the video stutters (skipping/repeat) frames when using the following pipelines.

Here is our variables for the pipelines :

DEVICE="/dev/video1"
VELEM="v4l2src device=$DEVICE do-timestamp=false"
VCAPS="image/jpeg, width=1280, height=720, framerate=30/1"
VSOURCE="$VELEM ! $VCAPS"

DEVICE2="/dev/video2"
VELEM2="v4l2src device=$DEVICE2"
VCAPS2="image/jpeg, width=1280, height=720, framerate=30/1"
VSOURCE2="$VELEM2 ! $VCAPS2"

VIDEO_DECODE="vpudec"

HDMI_DISPLAY="imxv4l2sink device=/dev/video18 sync=false"
LCD_DISPLAY="fpsdisplaysink video-sink=overlaysink text-overlay=false sync=false"
VIDEO_CONVERT="imxvideoconvert_g2d"


gst-launch-1.0 -v $VSOURCE ! $VIDEO_DECODE ! $VIDEO_CONVERT ! $HDMI_DISPLAY & $VSOURCE2 ! $VIDEO_DECODE ! $VIDEO_CONVERT ! $LCD_DISPLAY

 

Same problem when we execute the two pipelines in two separate processes.

gst-launch-1.0 -v $VSOURCE ! $VIDEO_DECODE ! $VIDEO_CONVERT ! $HDMI_DISPLAY \

gst-launch-1.0 -v $VSOURCE2 ! $VIDEO_DECODE ! $VIDEO_CONVERT ! $LCD_DISPLAY

 

Same problem when we use the g2d compositor and render them to the hdmi interface.

GST_DEBUG=0 gst-launch-1.0 -v imxcompositor_g2d name=mix \
sink_0::xpos=0 sink_0::ypos=0 sink_0::width=1280 sink_0::height=720 \
sink_1::xpos=1280 sink_1::ypos=180 sink_1::width=640 sink_1::height=360 \
! imxv4l2sink device=/dev/video18 sync=false\
$VSOURCE ! $VIDEO_DECODE ! mix.sink_0 \
$VSOURCE2 ! $VIDEO_DECODE ! mix.sink_1

 

The streams seem to render fluid some time and then it starts to choke for unknown reasons. 

Do you have any ideas why it is happening?

This is not a Variscite issue since I can duplicate the problem on the NXP DualLite eval board.

I'm using kernel 4.1.15 with gstreamer 1.8.1.

 

Tell me if you need any more info.

 

Regards,

Jérôme

Outcomes