My machine for reference:
CPU: Xeon W3550 (Quad core, 3GHz)
6 gigs of RAM
Ubuntu 12.04 LTS
Capture card: ProVideo PV183 w/8 cameras connected, 640x480 res at NTSC
We were running ZoneMinder 1.25 on this machine with 8 cameras connected to the capture card - no problems at all. I tried uploading to 1.27, which worked fine, but now all the feeds from the capture card are horribly interfaced.
The difference from what I noticed is the removal of the "ZM_V4L2_CAPTURE_FIELDS" setting. On 1.25 the cameras would be interlaced like crazy until we set that value to "2". After changing to that, no problems at all. The new version doesn't have this setting. I've tried every setting on the "Deinterlace" dropdown and none of them seem to have any effect whatsoever. And in the new version, if I set it to "top frame only", it will only capture at 640x240, resulting in a horrible squished image.
Has anyone gotten a PV183 to work on 1.27 without terrible interlacing? I've also tried changing to the "CAPTURES_PER_FRAME" to 2, 4, and 8 with no change, and enabled/disabled V4L_MULTI_BUFFER, with no change.
Terrible interlacing in 1.27
Re: Terrible interlacing in 1.27
Looking into it more and playing with 1.27 all day, I believe I have various solutions:
I tried video from the PV183-8 and it's BT878 chips with various settings:
No Deinterlacing at 320x240 at 30 fps, all cameras function fine, but there is still interlaced video.
Field motion adaptive at either 640x480 or 768x480 works okay as long as all streams are limited to 5 fps. As this is has eight BT878 chips, that's not great.
With "Use more than one buffer for Video 4 Linux devices" turned on, the interlacing is much, much worse.
Before, when I had ZM_V4L2_CAPTURE_FIELDS set to "2", it only captured one of the interlaced frames and worked great.
So now I'm going to sift through the code and find out where it's requiring it to cut the vertical resolution in half and see what happens if I force it to accept 640x480. It doesn't even really make sense to me, because one frame should be half the height, but it worked before, so I don't know why it shouldn't work again!
I tried video from the PV183-8 and it's BT878 chips with various settings:
No Deinterlacing at 320x240 at 30 fps, all cameras function fine, but there is still interlaced video.
Field motion adaptive at either 640x480 or 768x480 works okay as long as all streams are limited to 5 fps. As this is has eight BT878 chips, that's not great.
With "Use more than one buffer for Video 4 Linux devices" turned on, the interlacing is much, much worse.
Before, when I had ZM_V4L2_CAPTURE_FIELDS set to "2", it only captured one of the interlaced frames and worked great.
There was a slight loss of quality because of the single frame, but it was good enough for our old analog cameras. The same setting here appears to be "V4L2: Capture top field only", but when set to that with a video size of "640x480", it will crash out unless I set the capture to 640x240. But - looking at the video it's a squished down image, the image *should* be 640x480.From the settings of 1.25: The most useful other values are 2 (top, or 3 for bottom) which prevent interlacing by only capturing one field (or set of scanlines), or 7 which captures both fields but in separate images.
So now I'm going to sift through the code and find out where it's requiring it to cut the vertical resolution in half and see what happens if I force it to accept 640x480. It doesn't even really make sense to me, because one frame should be half the height, but it worked before, so I don't know why it shouldn't work again!