I would like to composite streams of 2 USB cameras. One is a thermal camera with an USB(2) port, one is a Gopro with an HDMI to USB3 adapter. Each camera alone works, see picture from the Thermalcamera, but the pipeline with nvcompositor terminates with the shown error.
If I use two cameras with the same HDMI 2 USB3 interface the pipeline works fine.
I think it is a format problem, but I am not very versed with gstreamer. It would be very nice if someone has some suggestions.
If I use both cameras in different pipelines in Python with Gstreamer the result has a great delay and very low framerate or is pending totally.
These are the data of the cameras.
Thermalcamera
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: 'YU12'
Name : Planar YUV 4:2:0
Size: Discrete 640x512
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Index : 1
Type : Video Capture
Pixel Format: 'Y16 '
Name : 16-bit Greyscale
Size: Discrete 320x256
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Index : 2
Type : Video Capture
Pixel Format: 'NV12'
Name : Y/CbCr 4:2:0
Size: Discrete 640x512
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Index : 3
Type : Video Capture
Pixel Format: ''
Name : 3132564e-0000-0010-8000-00aa003
Size: Discrete 640x512
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Gopro with HDMI to USB3
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: 'YUYV'
Name : YUYV 4:2:2
Size: Discrete 1920x1080
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 640x480
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 800x600
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1024x768
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1280x960
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1280x1024
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1360x768
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1400x900
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1440x900
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Pipeline
gst-launch-1.0 nvcompositor name=mix sink_1::xpos=0 sink_1::ypos=0 \
sink_1::width=640 sink_1::height=512 sink_1::alpha=1 ! nv3dsink \
\
\
v4l2src device=/dev/video1 ! video/x-raw, framerate=30/1, width=1280, height=720 ! \
nvvidconv ! alpha alpha=1 ! nvvidconv ! mix.sink_2 \
\
v4l2src device=/dev/video0 ! video/x-raw, framerate=30/1, width=640, height=512 ! \
alpha alpha=1 ! nvvidconv ! mix.sink_1 \
\
Error message
willi@willis:~$
willi@willis:~$ ./testvv_boson
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason error (-5)
Execution ended after 0:00:00.314211458
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
willi@willis:~$
Best regards,
Wilhelm