On 03/13/2016 03:41 PM, Tony IBM-MAIN wrote: > Hans, > > Sorry for the long delay in responding. Only just got around to testing > qv4l2. > > All was well with qv4l2 on 4 camera's each capturing 25fps. Then when I > activated the 5th camera it all went pear shaped. > One camera dies, the image on its screen freezes on the last good frame. > All the other cameras get corrupt screens like line sync is missing. > Horizontal lines everywhere. See > http://www.doom.talktalk.net/2016-03-13-124047_1152x864_scrot.png. > > I have seen this effect 4 years ago using zoneminder. I had two camera > working fine in zoneminder with motion detect recording. Adding two more > caused the effect in the screen capture. Eventually I put it down to > Zoneminder being very CPU hungry event at the lowest framerate. I > switched to motion and it would happily run motion detect on 6 cameras > using about 15% on one CPU (Dual core AMD Athlon(tm) II X2 270u > Processor 1600Mhz). Both zoneminder and motion were using the same old > tw68 module from github. I think I know what the problem is. The default pixelformat that the driver choses is RGB24 (3 bytes per pixel). One stream of 720x576p25 then takes 30 MB/s, so 5 streams is 150 MB/s which is more than the max bandwidth of a PCI device (133 MB/s). I suspect that the default format of the old driver was probably YUYV, which is only 20 MB/s, so 120 MB/s for 6 streams. The solution would be to set the format to YUYV before streaming. I don't know if that's possible with the software you're using, but you can always use qv4l2 or v4l2-ctl (v4l2-ctl -d /dev/videoX -v pixelformat=YUYV) for this. Another option is to scale down the image and reduce the bandwidth that way. > I have set up motion to capture at a relative low 2fps, it is all I > need. Can I set qv4l2 to capture at a lower rate to see if it resolves > the problem? No, that's not possible. But changing the format to YUYV should fix the issue for you. Regards, Hans -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html