Noisy, interlaced frames after adding two more PAL cameras

Forum for questions and support relating to the 1.25.x releases only.
Locked
zSeries
Posts: 30
Joined: Thu Aug 18, 2011 12:43 pm

Noisy, interlaced frames after adding two more PAL cameras

Post by zSeries »

I am setting up ZM 1.25 from scratch on Lubuntu 12.10. For the last couple of years I used ZM 1.24 & Ubuntu 10.04.

I posted some info in http://www.zoneminder.com/forums/viewto ... 14&t=20507 about my config.

On my new install I am using a LinkDelight 8 channel card with two TW6816 chips. I have been testing with 2 CCTV cameras on Video0 and Video1 for a few weeks. It has been running perfectly with 2 cameras both at 25fps.

Yesterday I connected 2 more cameras on Video4 and Video5, they are attached to the second TW6816 chip but now all images from all cameras are corrupted. Frames appear overlayed and shifted vertically and also have horizontal stripes. It is not normal interlacing caused by PAL I know that well and it doesnt bother me if a single frame has a slight combing effect.

The situation improves if I set the max frame rate to 10fps on each camera but I still get a lot of bad frames. I am now getting a total of 40fps whereas before it was 50fps.

System load is 0.20 and Disk used 2%.

I there anything I can do about this? I'll post a sample image.

Thanks.
zSeries
Posts: 30
Joined: Thu Aug 18, 2011 12:43 pm

Re: Noisy, interlaced frames after adding two more PAL camer

Post by zSeries »

Sample
Attachments
image
image
ZM_Noisy_Interlaced.png (217.17 KiB) Viewed 13013 times
theforce
Posts: 129
Joined: Tue May 11, 2010 5:22 am

Re: Noisy, interlaced frames after adding two more PAL camer

Post by theforce »

Under options

How many images are captured per returned frame, for shared local cameras

Change that to 4 I think. Since you have a 2 chip card thats 4 cameras per chip.
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Re: Noisy, interlaced frames after adding two more PAL camer

Post by bb99 »

Yep, change options::config::CAPTURES_PER_FRAME to value of 2 and/or untick V4L_MULTI_BUFFER
zSeries
Posts: 30
Joined: Thu Aug 18, 2011 12:43 pm

Re: Noisy, interlaced frames after adding two more PAL camer

Post by zSeries »

Thanks for the suggestions. They seemed to help but do not fix the problem completely. The only thing that really works is to reduce the Max fps on all cameras down to about 5. Vetry disappointing for a card that supports 200 fps.

It's been a nightmare to get this far with ZM 1.25 on Lubuntu, many Lubutu problems along the way, nearly all turned out to be known bugs that never get resolved without a manual work around. It still isn't working after a month of fiddling in my spare time so it is time for a change. After all I am trying to build a simple reliable CCTV system, it is not a full time hobby. I am going to install Windows 7 and the software that comes with the card and/or go back to Ubuntu 10.04 LTS + ZM 1.24 on another partition and see if they work.

Once again, thanks for your input.
theforce
Posts: 129
Joined: Tue May 11, 2010 5:22 am

Re: Noisy, interlaced frames after adding two more PAL camer

Post by theforce »

If your still getting scan lines you might want to try changing your camera resolution. Something like 320x240 or whatever the pal equivalent is. I remember when I had analog cameras I tried upping the resolution from 320x240 to 640x480 and had noticeable scan lines kind of like whats in your screen shot. If you go to a higher resolution than your camera can support you will see lines like that.
zSeries
Posts: 30
Joined: Thu Aug 18, 2011 12:43 pm

Re: Noisy, interlaced frames after adding two more PAL camer

Post by zSeries »

Hello theforce,
I want the highest resolution possible from the system. The analog cameras are 700 TVL and I am using 704*576 and I used that with two cameras quite happily for a couple of years. Interlaced alternate line scans should have no effect on static images as above. You will notice that some combing is in effect giving a zig zag appearance to vertical lines, that should not happen here. And if you look closer you see the frames slip out of sync. At the top the alternate scans are in sync but towards the bottom it is way out. So I have some like

Line 1
Line 2
Line 3
Line 4
Line 5
Line 8
Line 7
Line 10
Line 9
Line 14

I have just used gparted to alter my disk partitions and about to install Win7 and Ubuntu 10.04...... I'll let you know how it goes.
Best Regards.
zSeries
Posts: 30
Joined: Thu Aug 18, 2011 12:43 pm

Re: Noisy, interlaced frames after adding two more PAL camer

Post by zSeries »

I am posting a follow-up incase anyone else has this problem and i want to document the whole story.

I installed Ubuntu 10.04.4 LTS and Zoneminder 1.24. I got exactly the same problems as described above. The only way to stablise the image is to reduce the max fps on all cameras to about 5. Looking at a TOP display shows there is plenty of CPU power spare, zmc 3% per cam at 5fps. I turned on a small area on all cams for Mocord and zma uses about 20% CPU each cam. Also "cat /proc/cpuinfo" still shows the CPU sometimes at 2400Mhz and sometimes throttled down at 800Mhz even with Mocord. There are no memory related errors in the logs but I have just ordered some more RAM so I'll have 4Gb instead of 1GB (onboard graphics grabbing 128MB) as I would like more buffers to hold pre/post images for events.

The sofware I got with the card was iDVR4000 and is supported on Win 7. The server software mostly works as does the client so it is usable. However there are plenty on reports that this software is flakey, unreliable. I have found numberours features that dont work. The server provides a web interface that doesnt work at all. I have contacted the vendor and am waiting for a response (after chinese new year!).
axelm
Posts: 46
Joined: Wed Feb 06, 2013 1:50 pm

Re: Noisy, interlaced frames after adding two more PAL camer

Post by axelm »

I have noisy PAL cams too. Check out my post here. http://www.zoneminder.com/forums/viewto ... 29&t=20810
zSeries
Posts: 30
Joined: Thu Aug 18, 2011 12:43 pm

Re: Noisy, interlaced frames after adding two more PAL camer

Post by zSeries »

I increased my RAM from 1Gb to 4GB but it didnt make any differece so I decided to install an alternation program called "motion" and this works OK with all 4 cameras. It records jpegs and creates an swf movie on all 4 camera concurrently, 10 jpegs per cam per sec. TOP shows 110% CPU while it is doing this. I have still to get the web interface working but this now looks like a Zoneminder problem. Not sure where to go from here but I'll keep digging.
axelm
Posts: 46
Joined: Wed Feb 06, 2013 1:50 pm

Re: Noisy, interlaced frames after adding two more PAL camer

Post by axelm »

Hi zseries,

Got your PM. Deinterlacing is implemented in this version http://www.zoneminder.com/forums/viewto ... =9&t=17652.

I am going to try it out before ditching ZM altogether.

Regards
zSeries
Posts: 30
Joined: Thu Aug 18, 2011 12:43 pm

Re: Noisy, interlaced frames after adding two more PAL camer

Post by zSeries »

i got the web interface for Motion working. No laggy interface like with ZM. Motion doesnt have all the options of ZM and its all configured with one or more text files. but there again it is working after a hour or so where-as ZM is still unuseable after weeks. I need to play with motion detection and if that works OK it looks like I'll be ditching ZM. It's a pity because ZM is so promising and at least it still appears to still be under developement.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Re: Noisy, interlaced frames after adding two more PAL camer

Post by jameswilson »

I have only played with the techwell cards and had to install the driver for it as it wasnt in the kernel. It isnt ideal.

You say you have it working in motion perfectly?
Id be interested if you explained more on this as id like to see where the difference is?

James
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
zSeries
Posts: 30
Joined: Thu Aug 18, 2011 12:43 pm

Re: Noisy, interlaced frames after adding two more PAL camer

Post by zSeries »

James,

My config option for Motion are

v4l2_palette 8

width 720
height 576
framerate 10

pre_capture 5
post_capture 5

snapshot_interval 60

ffmpeg_cap_new off
ffmpeg_timelapse 5
ffmpeg_deinterlace on

Each camera has its own config file containing two lines like this

videodevice /dev/video1
webcam_port 8091

There are no complex set up or options as in ZM. The deinterlace option is required and does smooth out PAL interlacing when movement occurs.
Locked