Its not a code issue, rather something with Gstreamer itself. If I modify the pipeline to write a video file to disk and use gst-launch-1.0 we get the following result.
Using videomixer;
gst-launch-1.0 libcamerasrc camera-name=/base/soc/i2c0mux/i2c@1/ov5647@36 ! videorate ! video/x-raw,width=640,height=480,framerate=10/1,format=RGBx ! m.sink_0 libcamerasrc camera-name=/base/soc/i2c0mux/i2c@0/ov5647@36 ! videorate ! video/x-raw,width=640,height=480,framerate=10/1,format=RGBx ! m.sink_1 videomixer name=m sink_1::xpos=640 ! video/x-raw,width=1280,height=480,format=BGR ! videoconvert ! videoscale ! x264enc ! flvmux ! filesink location=/tmp/testvid.flv
Output and successfully writes to /tmp/testvid.flv - I hit Ctrl-C to exit.
Setting pipeline to PAUSED ...
[8:19:28.684614390] [2871] INFO Camera camera_manager.cpp:297 libcamera v0.0.5+83-bde9b04f
[8:19:28.720661831] [2872] INFO RPI vc4.cpp:437 Registered camera /base/soc/i2c0mux/i2c@0/ov5647@36 to Unicam device /dev/media0 and ISP device /dev/media3
[8:19:28.731953746] [2872] INFO RPI vc4.cpp:437 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media1 and ISP device /dev/media4
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[8:19:28.794839988] [2878] INFO Camera camera.cpp:1033 configuring streams: (0) 640x480-XBGR8888
[8:19:28.795061726] [2879] INFO Camera camera.cpp:1033 configuring streams: (0) 640x480-XBGR8888
[8:19:28.795554295] [2872] INFO RPI vc4.cpp:565 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format: 640x480-SGBRG10_1X10 - Selected unicam format: 640x480-pGAA
[8:19:28.797172036] [2872] INFO RPI vc4.cpp:565 Sensor: /base/soc/i2c0mux/i2c@0/ov5647@36 - Selected sensor format: 640x480-SGBRG10_1X10 - Selected unicam format: 640x480-pGAA
Redistribute latency...
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:08.411845431
Setting pipeline to NULL ...
Freeing pipeline ...
Using “compositor”
gst-launch-1.0 libcamerasrc camera-name=/base/soc/i2c0mux/i2c@1/ov5647@36 ! videorate ! video/x-raw,width=640,height=480,framerate=10/1,format=RGBx ! m.sink_0 libcamerasrc camera-name=/base/soc/i2c0mux/i2c@0/ov5647@36 ! videorate ! video/x-raw,width=640,height=480,framerate=10/1,format=RGBx ! m.sink_1 compositor name=m sink_1::xpos=640 ! video/x-raw,width=1280,height=480,format=BGR ! videoconvert ! videoscale ! x264enc ! flvmux ! filesink location=/tmp/testcomp.flv
Output
Setting pipeline to PAUSED ...
[8:20:20.403698494] [2893] INFO Camera camera_manager.cpp:297 libcamera v0.0.5+83-bde9b04f
[8:20:20.448272486] [2894] INFO RPI vc4.cpp:437 Registered camera /base/soc/i2c0mux/i2c@0/ov5647@36 to Unicam device /dev/media0 and ISP device /dev/media3
[8:20:20.459615362] [2894] INFO RPI vc4.cpp:437 Registered camera /base/soc/i2c0mux/i2c@1/ov5647@36 to Unicam device /dev/media1 and ISP device /dev/media4
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Redistribute latency...
Redistribute latency...
[8:20:20.528974416] [2902] INFO Camera camera.cpp:1033 configuring streams: (0) 640x480-XBGR8888
[8:20:20.529747056] [2894] INFO RPI vc4.cpp:565 Sensor: /base/soc/i2c0mux/i2c@0/ov5647@36 - Selected sensor format: 640x480-SGBRG10_1X10 - Selected unicam format: 640x480-pGAA
[8:20:20.531147762] [2901] INFO Camera camera.cpp:1033 configuring streams: (0) 640x480-XBGR8888
[8:20:20.531654183] [2894] INFO RPI vc4.cpp:565 Sensor: /base/soc/i2c0mux/i2c@1/ov5647@36 - Selected sensor format: 640x480-SGBRG10_1X10 - Selected unicam format: 640x480-pGAA
Redistribute latency...
Redistribute latency...
WARNING: from element /GstPipeline:pipeline0/GstCompositor:m: GStreamer error: clock problem.
Additional debug info:
../libs/gst/base/gstaggregator.c(2069): gst_aggregator_query_latency_unlocked (): /GstPipeline:pipeline0/GstCompositor:m:
Impossible to configure latency: max 0:00:00.119710000 < min 0:00:00.120647000. Add queues or other buffering elements.
WARNING: from element /GstPipeline:pipeline0/GstCompositor:m: GStreamer error: clock problem.
Additional debug info:
../libs/gst/base/gstaggregator.c(2069): gst_aggregator_query_latency_unlocked (): /GstPipeline:pipeline0/GstCompositor:m:
Impossible to configure latency: max 0:00:00.119710000 < min 0:00:00.120436000. Add queues or other buffering elements.
WARNING: from element /GstPipeline:pipeline0/GstCompositor:m: GStreamer error: clock problem.
The error message and warning from the last few lines repeat.