Jumping video (ZM 1.25.0)

Forum for questions and support relating to the 1.25.x releases only.
badger_fruit
Posts: 24
Joined: Wed Apr 18, 2012 3:49 pm

Jumping video (ZM 1.25.0)

Post by badger_fruit »

Hello all!

Although I have googled this, I can't seem to find any relevent topics (perhaps I am searching the wrong keywords?), regardless, this forum strikes me as the best place to ask for a little bit of help!

Further to my previous post, I have managed to get Zm installed and the card working (to a degree at least) ... I've recorded using CamStudio a short (10 second) clip of the feed from my two cameras (this can be found here --> http://viveuk.net/support/tmp/cam.html).

It's driving me mad! Whatever settings I enter into the Zm configuration (click on the /dev/videoN > Source), it does not improve :(
I have enabled and disabled using the Cambozola.jar as well, that didn't make any difference either.

I have plugged the cameras into our existing CCTV system (not ZM but some off-the shelf box) and the pictures display perfectly so the hardware's not at fault ... I very much appreciate any help or suggestions with this!

Thank you for reading my post, hope someone can help!!
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Re: Jumping video (ZM 1.25.0)

Post by jameswilson »

First of all what card you using?
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
badger_fruit
Posts: 24
Joined: Wed Apr 18, 2012 3:49 pm

Re: Jumping video (ZM 1.25.0)

Post by badger_fruit »

Oh, I'm sorry silly me forgot to include my system specifications: The card is described as "4 Channel 4 Chip BT878a Capture Card" (along with the documentation that came with the card, there's a link to "Kodicom 4400r" on ZM's Wiki) and this is installed onto CentOS5.8 as per the ZM Wiki instructions (and help from the forum!). The PC itself is an Intel(R) Pentium(R) 4 CPU 3.00GHz Single-core with 512MB RAM.

As per documentation that was provided with the card, I have added into Modprobe.conf the line:
options bttv gbuffers=16 card=133,132,133,133
I tried to limit the Max FPS to 3 but for some reason, the two monitors then showed the same camera images (and FPS not limited, it reported > 5 fps) and did not cure the flickering problem, removing the max limit restored the display (and also did not cure the flickering problem).

If there is anything else that needs to be described about my configuration, please let me know. Once again, apologies for not including this the first time!
prairietech
Posts: 8
Joined: Thu Mar 15, 2012 1:53 am

Re: Jumping video (ZM 1.25.0)

Post by prairietech »

It appears to me that you have a ground loop. This is caused by a difference is the ground potential between the camera and video card. Have you tried only connecting one camera at a time? Is one camera mounted on metal that is connected to an appliance or electric mains?

I'm not familiar with the electric wiring in the UK (I assumed from the video you posted) but does your computer have a grounded power cable that connects the chassis to the ground (earth) of your AC mains?

In the USA we have a three prong power plug that grounds the computer chassis to the earth ground of the power wiring system. If you have a similar configuration, you could try removing this earth ground to see if the poor video improves. Also be sure any other units like printers or monitors are isolated too. Do this only to confirm a ground loop is your issue. This is only to be done for a test and not a solution!

There are also ground loop eliminators that go in-line with the CCTV coax but good units are expensive.


badger_fruit wrote:Hello all!

Although I have googled this, I can't seem to find any relevent topics (perhaps I am searching the wrong keywords?), regardless, this forum strikes me as the best place to ask for a little bit of help!

Further to my previous post, I have managed to get Zm installed and the card working (to a degree at least) ... I've recorded using CamStudio a short (10 second) clip of the feed from my two cameras (this can be found here --> http://viveuk.net/support/tmp/cam.html).

It's driving me mad! Whatever settings I enter into the Zm configuration (click on the /dev/videoN > Source), it does not improve :(
I have enabled and disabled using the Cambozola.jar as well, that didn't make any difference either.

I have plugged the cameras into our existing CCTV system (not ZM but some off-the shelf box) and the pictures display perfectly so the hardware's not at fault ... I very much appreciate any help or suggestions with this!

Thank you for reading my post, hope someone can help!!
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Re: Jumping video (ZM 1.25.0)

Post by jameswilson »

doesnt look like a ground loop to me looks like a pallete or format issue.
You using pal or ntsc cameras? Also what res you running and what pallete?
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
badger_fruit
Posts: 24
Joined: Wed Apr 18, 2012 3:49 pm

Re: Jumping video (ZM 1.25.0)

Post by badger_fruit »

Good morning and thank you for the replies.

After talking further with a friend, he has also suggested this may be a resolution issue as opposed to anything else.

The "LoadingBay" camera is "GT-DBI2070 NTSC and PAL compatible". The settings for LoadingBay monitor are defined in Zoneminder thusly:
- Method: V4L2
- Format: PAL
- Palette: GREY
- Width: 320 px
- Height: 240 px

The user manual for the camera states: Effective picture is NTSC 1028 H x 508 V (Horizontal and Vertical) or PAL: 1024 x 596 (it makes no mention of palette or which V4L to use, the instructions for the BT card however say to use V4L1 but no matter what setting or configuration I use, I don't get a picture at all).

If I set the resolution to this camera in ZM accordingly, I get a black output (see attached screenshot) and all the defined monitors go 'red' and no longer display anything!

Additional info : I searched for the black-screen on BTTV cards and saw a link back to the forum (http://www.zoneminder.com/forums/viewtopic.php?t=10108); for info, my "uname -a" is Linux 2.6.18-308.4.1.el5 #1 SMP Tue Apr 17 17:08:10 EDT 2012 i686 i686 i386 GNU/Linux. Not sure if it's relevent but posted just in case!
Attachments
30-04-2012 08-36-51.png
30-04-2012 08-36-51.png (15.83 KiB) Viewed 7040 times
30-04-2012 08-35-55.png
30-04-2012 08-35-55.png (22.97 KiB) Viewed 7040 times
badger_fruit
Posts: 24
Joined: Wed Apr 18, 2012 3:49 pm

Re: Jumping video (ZM 1.25.0)

Post by badger_fruit »

OK so after nearly a week of trying various configurations I am still having very limited success with Zoneminder and my cameras :(

I have removed all monitors bar one and figured that if I can get at least one working then it will be a step forward. However, I must have tried every single combination of Format and Palette but no matter what options I select I can only get a display in greyscale with using the 'PAL' format and 'GREY' palette. I've installed and run xawtv and the cameras all give me a colour display and I can run them in any resolution/size (I had it up to 1600 x 900 px at one point!) so what's the deal with Zoneminder, why is it so picky??!!

The success I have enjoyed with xawtv shows me that the card and cameras are both A-OK but I am at a loss how to get it working as well in ZM.
ANY help here would be appreciated!

EDIT:
Added some grabs, colour one is from xawtv the greyscale is from ZM
Attachments
ZM
ZM
04-05-2012 10-09-04.png (193.14 KiB) Viewed 7000 times
XAWTV
XAWTV
snap-unknown-20120504-105833-1.jpeg (37.72 KiB) Viewed 7000 times
badger_fruit
Posts: 24
Joined: Wed Apr 18, 2012 3:49 pm

Re: Jumping video (ZM 1.25.0)

Post by badger_fruit »

Hello forums.
I am sorry for the bump of my own thread but I have been backwards and forwards with this and made zero progress :(

I have read thread after thread until my eyes are sore and my head is pounding!

I have read about using card=77 in modprobe.conf and all sorts of various command-line tools, none of which have helped. The documentation that came with the card says I have to use "options bttv gbuffers=16 card=133,132,133,133" which I have (and at least then, I get an image as per the above post in xawtv / zoneminder).

Here is my lspci for what it's worth:-
00:00.0 Host bridge: Intel Corporation 82915G/P/GV/GL/PL/910GL Memory Controller Hub
00:01.0 PCI bridge: Intel Corporation 82915G/P/GV/GL/PL/910GL PCI Express Root Port
00:1b.0 Audio device: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) High Definition Audio Controller (rev 03)
00:1c.0 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 1 (rev 03)
00:1c.1 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 2 (rev 03)
00:1c.2 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 3 (rev 03)
00:1c.3 PCI bridge: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) PCI Express Port 4 (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 03)
00:1d.1 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #2 (rev 03)
00:1d.2 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #3 (rev 03)
00:1d.3 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #4 (rev 03)
00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d3)
00:1f.0 ISA bridge: Intel Corporation 82801FB/FR (ICH6/ICH6R) LPC Interface Bridge (rev 03)
00:1f.1 IDE interface: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) IDE Controller (rev 03)
00:1f.2 IDE interface: Intel Corporation 82801FR/FRW (ICH6R/ICH6RW) SATA Controller (rev 03)
00:1f.3 SMBus: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) SMBus Controller (rev 03)
01:00.0 VGA compatible controller: nVidia Corporation NV44 [GeForce 6200 TurboCache(TM)] (rev a1)
06:03.0 PCI bridge: Hint Corp HB6 Universal PCI-PCI bridge (non-transparent mode) (rev 11)
06:05.0 FireWire (IEEE 1394): Agere Systems FW322/323 (rev 61)
06:08.0 Ethernet controller: Intel Corporation 82562ET/EZ/GT/GZ - PRO/100 VE (LOM) Ethernet Controller (rev 01)
07:0c.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
07:0c.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)
07:0d.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
07:0d.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)
07:0e.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
07:0e.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)
07:0f.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
07:0f.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)
I have also tried to query the card using zmu -d /dev/video0 -q -v
Error, failed to enumerate standard 20: Success
Google does not help, I found no results to explain this (probably because it's a zoneminder command and not a standard linux command).
This was received regardless of if ZM was running or was stopped.

dmesg | grep bttv:
[ 5.202689] bttv: driver version 0.9.19 loaded
[ 5.202696] bttv: using 16 buffers with 2080k (520 pages) each for capture
[ 5.202762] bttv: Bt8xx card found (0).
[ 5.202786] bttv 0000:07:0c.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
[ 5.202803] bttv0: Bt878 (rev 17) at 0000:07:0c.0, irq: 19, latency: 32, mmio: 0xbfa01000
[ 5.202832] bttv0: using: Kodicom 4400R (slave) [card=133,insmod option]
[ 5.202867] bttv0: gpio: en=00000000, out=00000000 in=00ffffff [init]
[ 5.202939] bttv0: tuner absent
[ 5.203082] bttv0: registered device video0
[ 5.203150] bttv0: registered device vbi0
[ 5.203176] bttv0: PLL: 28636363 => 35468950 .. ok
[ 5.228319] bttv: Bt8xx card found (1).
[ 5.228342] bttv 0000:07:0d.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[ 5.228356] bttv1: Bt878 (rev 17) at 0000:07:0d.0, irq: 18, latency: 32, mmio: 0xbfa03000
[ 5.228381] bttv1: using: Kodicom 4400R (master) [card=132,insmod option]
[ 5.228414] bttv1: gpio: en=00000000, out=00000000 in=00ffffff [init]
[ 5.228491] bttv1: tuner absent
[ 5.228591] bttv1: registered device video1
[ 5.228657] bttv1: registered device vbi1
[ 5.228681] bttv1: PLL: 28636363 => 35468950 ..
[ 13.293039] bttv: Bt8xx card found (2).
[ 13.293074] bttv 0000:07:0e.0: PCI INT A -> GSI 21 (level, low) -> IRQ 21
[ 13.293090] bttv2: Bt878 (rev 17) at 0000:07:0e.0, irq: 21, latency: 32, mmio: 0xbfa05000
[ 13.293119] bttv2: using: Kodicom 4400R (slave) [card=133,insmod option]
[ 13.293169] bttv2: gpio: en=00000000, out=00000000 in=00ffffff [init]
[ 13.293241] bttv2: tuner absent
[ 13.293358] bttv2: registered device video2
[ 13.293432] bttv2: registered device vbi2
[ 13.293465] bttv2: PLL: 28636363 => 35468950 .. ok
[ 21.355034] bttv: Bt8xx card found (3).
[ 21.355067] bttv 0000:07:0f.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[ 21.355081] bttv3: Bt878 (rev 17) at 0000:07:0f.0, irq: 22, latency: 32, mmio: 0xbfa07000
[ 21.355103] bttv3: using: Kodicom 4400R (slave) [card=133,insmod option]
[ 21.355145] bttv3: gpio: en=00000000, out=00000000 in=00ffffff [init]
[ 21.355209] bttv3: tuner absent
[ 21.355303] bttv3: registered device video3
[ 21.355379] bttv3: registered device vbi3
[ 21.355412] bttv3: PLL: 28636363 => 35468950 .. ok
System configuration is OpenSuSE12.1, Pentium 4 at 3GHZ Kernel, ZM installed as per guide --> http://www.zoneminder.com/wiki/index.ph ... s_for_SuSE (used the one-click installer).

Linux 3.1.10-1.9-desktop #1 SMP PREEMPT Thu Apr 5 18:48:38 UTC 2012 (4a97ec8) i686 i686 i386 GNU/Linux
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Jumping video (ZM 1.25.0)

Post by knight-of-ni »

It's been awhile since I've messed with a bt878 card. These days I'd rather use an analog-IP video encoder if I've got analog cameras.

However, I do have a single chip bt878 capture card that's been running for quite some time over at my parent's home. I just checked the settings to jog my memory... seems I had to turn OFF the following in order to get a picture:
Options -> Config -> V4L_MULTI_BUFFER

Try that.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
badger_fruit
Posts: 24
Joined: Wed Apr 18, 2012 3:49 pm

Re: Jumping video (ZM 1.25.0)

Post by badger_fruit »

Hello knnniggett
I am sorry if I wasn't very clear in my post above so let me try to improve this:

I have two problems ...

Problem # 1
If I have a single monitor defined (/dev/video0 channel 3, Format PAL, Palette GREY at W 768 x H 576) I get a picture, it's stable and the Motion detection works etc as expected.
Should I change these settings to try to get the image in colour, I end up with nothing (see attached screengrabs). Irrespective of if I configure PAL or NTSC, as soon as I set the palette to something other than GREY, I get the empty monitor window.

I have used the following line in my modprobe config file but that makes no difference
options bttv gbuffers=16 card=133,132,133,133 chroma_agc=1

So at the moment, I have a 4 port card with a single camera in, displaying a greyscale image which is also in a lower resolution then I am sure it can handle.

Problem # 2
I have a second camera, which is actualy exactly the same make and model of camera as the one I have "working" above. If I then try to add this as another monitor with the same parameters (obviously on the correct channel) then the images on both camera jump around as can be seen in my little video --> http://viveuk.net/support/tmp/cam.html.
Attachments
/dev/video0 channel 3, Format PAL, Palette ANYTHING ELSE at W 768 x H 576
/dev/video0 channel 3, Format PAL, Palette ANYTHING ELSE at W 768 x H 576
09-05-2012 16-44-19.png (12.28 KiB) Viewed 6942 times
/dev/video0 channel 3, Format PAL, Palette GREY at W 768 x H 576
/dev/video0 channel 3, Format PAL, Palette GREY at W 768 x H 576
09-05-2012 16-43-41.png (252.37 KiB) Viewed 6942 times
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: Jumping video (ZM 1.25.0)

Post by knight-of-ni »

My previous comment was in reference to problem #2.
Visit my blog for ZoneMinder related projects using the Raspberry Pi, Orange Pi, Odroid, and the ESP8266
All of these can be found at https://zoneminder.blogspot.com/
badger_fruit
Posts: 24
Joined: Wed Apr 18, 2012 3:49 pm

Re: Jumping video (ZM 1.25.0)

Post by badger_fruit »

knnniggett wrote:My previous comment was in reference to problem #2.
Ah, nice one, well I am about to leave work for the day so when I get in (I already made the configuration change) I shall plug in the 2nd camera and see what happens (you can GUARANTEE I will be re-posting lol!)

Cheers and fingers crossed to see what tomorrow brings!
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Re: Jumping video (ZM 1.25.0)

Post by bb99 »

Set "captures_per_frame" to a value of 2. Leave multi buffers unticked. Use BGR24 as your palette. As for the memory issue: increase shmmax to 150% or more of current value or lower resolution to 320*240. If your using mmap: I'm suggesting you're running out of memory to map. Several command line or gui programs available to verify this but if you go to the FAQ and run the memory calculator it'll tell you what ZM needs per monitor.
badger_fruit
Posts: 24
Joined: Wed Apr 18, 2012 3:49 pm

Re: Jumping video (ZM 1.25.0)

Post by badger_fruit »

bb99 wrote:Set "captures_per_frame" to a value of 2. Leave multi buffers unticked. Use BGR24 as your palette. As for the memory issue: increase shmmax to 150% or more of current value or lower resolution to 320*240. If your using mmap: I'm suggesting you're running out of memory to map. Several command line or gui programs available to verify this but if you go to the FAQ and run the memory calculator it'll tell you what ZM needs per monitor.
Hello bb99
Thank you for the reply but I don't suppose you'd like to elaborate on any of that into finer detail would you?
It's be good/nice to know where these options are, not just for me but if there's others having the same issue ...
Thank you

Richard
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Re: Jumping video (ZM 1.25.0)

Post by bb99 »

Sure: Options::config::CAPTURES_PER_FRAME; Options::config::V4L_MULTI_BUFFER; Source column::source tab::Capture Palette; and http://www.zoneminder.com/wiki/index.ph ... esolutions.
Locked