How to set old camera

Forum for questions and support relating to the 1.28.x releases only.
Locked
User avatar
andrewa
Posts: 18
Joined: Tue Feb 15, 2011 7:22 pm
Location: Bulgaria

How to set old camera

Post by andrewa »

Hi!
I have been using 2 analogue cameras attached to PICO2000 on a Fedora17 system with ZM 1.25 showing B&W images.
Today installed Fedora 23 and moved the PICO2000 board&cameras to it. ZM 1.28.1 installed from ZM repository with all dependancies (great relief!). But cameras show&record black or blue square, no image depending on a few options I experiment. Function & source text are both green. I guess the tuning in Monitor - Source is not correct, there are a few new fields introduced in v1.28.1 compared to v1.25 which probably makes some difference. Old & new camera setup are:
OLD NEW
/dev/video0 /dev/video0 Device Path
V4L2 V4L2 Capture Method
0 0 Device Channet
PAL Nc PAL Nc Device Format
BGR32 BGR32 Capture Palette
Use config Multibuffering
5 Captures/Frame
8 bit greyscale Target Colour Space
640*480 640*480 Resolution

Could someone tip me with a hint to the approprite values in the newly introduced fields and eventual changes in the old values? Below is an extract from log record:

zmdc[11033]: ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
zmdc[11033]: INF [Starting pending process, zmc -d /dev/video0]
zmdc[11033]: INF ['zmc -d /dev/video0' starting at 16/01/24 17:54:57, pid = 11890]
zmdc[11890]: INF ['zmc -d /dev/video0' started at 16/01/24 17:54:57]
zmdc[11033]: WAR [Can't find process with command of 'zma -m 3']
zmc_dvideo0[11890]: INF [Selected capture palette: 24-bit BGR 8-8-8 (BGR3)]
zmc_dvideo0[11890]: INF [Starting Capture]
zms[11913]: WAR [Shared data not initialised by capture daemon, some query functions may not be
zms[11913]: INF [Got signal 15 (Terminated), exiting]
zms[11913]: INF [Terminating Logger]
zmdc[11033]: WAR [Can't find process with command of 'zma -m 3']
zmdc[11033]: INF ['zmc -d /dev/video0' stopping at 16/01/24 17:55:41]
zmc_dvideo0[11890]: INF [Got signal 15 (Terminated), exiting]
zmc_dvideo0[11890]: INF [Terminating Logger]
zmdc[11033]: INF ['zmc -d /dev/video0' exited normally]
zmdc[11033]: INF ['zmc -d /dev/video0' starting at 16/01/24 17:55:42, pid = 11998]
zmdc[11998]: INF ['zmc -d /dev/video0' started at 16/01/24 17:55:42]
zmdc[11033]: ERR ['zmc -d /dev/video0' exited abnormally, exit status 255]
zmdc[11033]: INF [Starting pending process, zmc -d /dev/video0]
zmdc[12002]: INF ['zmc -d /dev/video0' started at 16/01/24 17:55:42]
zmdc[11033]: INF ['zmc -d /dev/video0' starting at 16/01/24 17:55:42, pid = 12002]
zmdc[11033]: WAR [Can't find process with command of 'zma -m 3']
zmc_dvideo0[12002]: INF [Starting Capture]
zmfilter[11156]: ERR [Can't execute filter 'select E.Id,E.MonitorId,M.Name as MonitorName,M.Defa

Filter is not configured.
Thanks!
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: How to set old camera

Post by knight-of-ni »

Capture boards are thing of the past these days. I used to use a pico2000 years ago.

The first thing you need to do for any capture device is to configure the kernel driver. In your case, that is the bttv driver.
The driver will not properly autodetect the card, even though it may look like it.
If you have not created a config file for the bttv driver and placed it into your modprobe.d folder, then that is the very first thing you need to do.
The driver likely has not changed since you used Fedora 17, so you can copy the old config from that if you have not already deleted it. Otherwise, you will need to start Googling for the bttv driver documentation.

Once you complete that step, verify you can view live video using xawtv or vlc (pretty sure vlc will work with local devices).

Once that is successful, you need to turn off the V4L Multibuffering option in ZoneMinder. At least I seem to recall that I had to do 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/
User avatar
andrewa
Posts: 18
Joined: Tue Feb 15, 2011 7:22 pm
Location: Bulgaria

Re: How to set old camera

Post by andrewa »

Thanks for the response!
I have configured the card in /etc/modprobe.d/bttv.conf Tested 3 options:
1 (working in FC17)
options i2c-algo-bit bit_test=1
options bttv card=77 tuner=4 radio=0 triton1=0 vsfx=0 autoload=0
2
options i2c-algo-bit bit_test=1
options bttv gbuffers=16 chroma_agc=1 combfilter=2 full_luma_range=1 coring=1
3
alias char-major-81-0 bttv
options bttv gbuffers=32 card=77 tuner=4 radio=0 coring=1 full_luma_range=1 chroma_agc=1 combfilter=1 autoload=0 triton1=0 vsfx=0

and get:

xawtv -hwscan
This is xawtv-3.103, running on Linux/x86_64 (4.3.3-301.fc23.x86_64)
looking for available devices
port 63-78 type : Xvideo, image scaler name : NX Texture Video

/dev/video0: OK [ -device /dev/video0 ]
type : libv4l
name : BT878 video (GrandTec Multi Cap
flags: overlay capture

Attempt to start player (also with -noxv -nodga) shows black window, now I know the problem is not in ZM:

[root@dvr ~]# xawtv -device /dev/video0
This is xawtv-3.103, running on Linux/x86_64 (4.3.3-301.fc23.x86_64)
switching visual (0xaf)
xinerama 0: 1024x768+0+0
WARNING: Your X-Server has no DGA support.
WARNING: couldn't find framebuffer base address, try manual
configuration ("v4l-conf -a <addr>")
v4l2: WARNING: framebuffer base address mismatch
v4l2: me=(nil) v4l=(nil)
........

CPU is in the basement with thick concrete walls around stopping WiFi, old TV cables are hard to replace with UTP cables, that is why I am not throwing away this old rubbish.
Any idea is appreciated. One more last attempt!
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: How to set old camera

Post by knight-of-ni »

Generally, I've been recommending people replace their capture cards with ip video encoders or just upgrade to ip cameras because the drivers for capture cards aren't maintained anymore. The drivers are still available in the latest kernel, but as you have found it is becoming increasingly difficult to get the drivers working with your device. The problem is only going to get worse as these cards get even older.

I'm not trying to discourage you from a challenge. Rather, I just want you to make an informed decision.

I found the bttv config file I used the last time I was using a pico2000 card. It is similar, but not quite the same as the one you are using:

Code: Select all

# pico2000 card
options i2c-algo-bit bit_test=1
options bttv gbuffers=32 card=77 tuner=4 radio=0 coring=1 full_luma_range=1 chroma_agc=1 combfilter=1 autoload=0 triton1=0 vsfx=0 no_overlay=0
Some users have had success loading the Video for Linux 1 compatibility layer.

First make sure you've got the libv4l package installed:

Code: Select all

rpm -q libv4l
Then read the following:
https://github.com/ZoneMinder/ZoneMinder/issues/637

Good luck.
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/
User avatar
andrewa
Posts: 18
Joined: Tue Feb 15, 2011 7:22 pm
Location: Bulgaria

Re: How to set old camera

Post by andrewa »

Got your point! The extra option "no_overlay=0" did not make any difference, I drop the idea to continue using the old hardware.
Will wait till -10C temperature outside adopts positive value to start stretching UTP cables for new IP cameras. . .

Case closed.
User avatar
knight-of-ni
Posts: 2406
Joined: Thu Oct 18, 2007 1:55 pm
Location: Shiloh, IL

Re: How to set old camera

Post by knight-of-ni »

Yeah, I hear you about the cold weather. My ptz camera broke (it was cheap Apexis), and I am waiting for a warm spell to get out on the ladder and replace it.

I don't know what your budget is, or if you need/want the better image resolution from an IP camera.

If you are looking to spend less and keep your existing analog cameras, keep an eye on EBay for used ip video encoders.

The Axis 241Q would be perfect for what you want to do, and there always seem to be several for sale:
http://www.ebay.com/sch/i.html?_odkw=24 ... q&_sacat=0

However, I'm not sure how easy it will be to ship one to Bulgaria.
Good luck.
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/
User avatar
andrewa
Posts: 18
Joined: Tue Feb 15, 2011 7:22 pm
Location: Bulgaria

Re: How to set old camera

Post by andrewa »

The old analogue cameras cost 25 EUR, new HIK Vision 1MB outdoor IP camera is sold locally for ~80 EUR. I will buy a couple from these. Last year installed 15 pcs at the company warehouse, work fine with ZM, proved for 12 months already.
This year plan to replace 2 old surveilance systems at 2 other company locations with 2M HIK Vision.
Locked