6by9 wrote:nickds1 wrote:Well - all upgraded and running 4.4.6+ #869 with your modified driver...
I have both cameras running, but now have my gstreamer command just stopping...
I did say I had more testing to do. Sadly the weekend became busy and I didn't have a chance to do too much. My initial tests had all been with enabling the overlay of each camera at the same time, and that was all OK (I've also now pushed extra commits that allow the overlay location to be moved and resized, although I haven't rebuilt the test module).
Can you stream each camera individually? ie is it both simultaneously that is the issue?
I'll try to have another play tonight.
I've just tried it with two instances of qv4l2 to view 640x480 I420 or RGBX8888 from the two devices. Works fine, other than a chunk of latency which is inherent in the way qv4l2 renders the images.
Giving GStreamer a quick whirl:
Code: Select all
pi@raspberrypi ~ $ GST_DEBUG=fakesink:7 gst-launch-1.0 -v videomixer name=mixer sink_1::xpos=0 sink_2::xpos=320 \
> ! queue \
> ! fakesink \
> v4l2src device=/dev/video0 \
> ! video/x-raw,format=I420,width=320,height=240,framerate=10/1 \
> ! queue \
> ! mixer.sink_1 \
> v4l2src device=/dev/video1 \
> ! video/x-raw,format=I420,width=320,height=240,framerate=10/1 \
> ! queue \
> ! mixer.sink_2
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-negotiated (-4)
Execution ended after 0:00:36.096388088
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
I am on an old Wheezy install. But that did remind me of the bug in GStreamer which is even referenced in the V4L2 driver source:
Code: Select all
/* Gstreamer bug https://bugzilla.gnome.org/show_bug.cgi?id=726521
* v4l2src does bad (and actually wrong) things when the vidioc_enum_framesizes
* function says type V4L2_FRMSIZE_TYPE_STEPWISE, which we do by default.
* It's happier if we just don't say anything at all, when it then
* sets up a load of defaults that it thinks might work.
* If gst_v4l2src_is_broken is non-zero, then we remove the function from
* our function table list (actually switch to an alternate set, but same
* result).
*/
So load the driver with
Code: Select all
sudo modprobe bcm2835-v4l2 gst_v4l2src_is_broken=1
and I can then get stuff streaming with:
Code: Select all
GST_DEBUG=v4l2src:7 gst-launch-1.0 -v videomixer name=mixer sink_1::xpos=0 sink_2::xpos=320 \
! queue \
! fakesink \
v4l2src device=/dev/video0 \
! video/x-raw,format=I420,width=320,height=240,framerate=10/1 \
! queue \
! mixer.sink_1 \
v4l2src device=/dev/video1 \
! video/x-raw,format=I420,width=320,height=240,framerate=10/1 \
! queue \
! mixer.sink_2
I think I'm happy with those patches based on the testing I've done, so I'll create a pull request to get it merged properly.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.