Page 1 of 1
Can't get proper pictures on my cameras
Posted: Fri Apr 06, 2007 7:45 pm
by Drakeweb
I've got two cameras installed on my zoneminder server. They are cheap CMOS cameras connected to an 878 4 -channel PCI card. Unfortunately, I can't seem to get proper pictures from either of them. Below is what I currently see:
The images are constantly rolling.
Can anyone offer any helpful tweeks or configs to get them settled and clear?
Thanks,
Adam
Posted: Fri Apr 06, 2007 9:26 pm
by jameswilson
your card isnt correctly setup, you need to tell bttv what card you have. What card do you have
dmesg | grep bttv
Posted: Fri Apr 06, 2007 9:37 pm
by Drakeweb
This is what I get from issuing the following command:
dmesg | grep bttv
[ 33.518652] bttv: driver version 0.9.16 loaded
[ 33.518664] bttv: using 8 buffers with 2080k (520 pages) each for capture
[ 33.518674] bttv: Host bridge needs ETBF enabled.
[ 33.518761] bttv: Bt8xx card found (0).
[ 33.518858] bttv0: Bt878 (rev 17) at 0000:00:12.0, irq: 10, latency: 32, mmio: 0xe5800000
[ 33.518930] bttv0: using: *** UNKNOWN/GENERIC *** [card=0,autodetected]
[ 33.518952] bttv0: enabling ETBF (430FX/VP3 compatibilty)
[ 33.518995] bttv0: gpio: en=00000000, out=00000000 in=00f360ff [init]
[ 65.508047] bttv0: using tuner=-1
[ 65.508057] bttv0: i2c: checking for MSP34xx @ 0x80... <7>eth0: no IPv6 routers present
[ 81.503146] bttv0: i2c: checking for TDA9875 @ 0xb0... not found
[ 97.498251] bttv0: i2c: checking for TDA7432 @ 0x8a... not found
[ 113.493358] bttv0: i2c: checking for TDA9887 @ 0x86... not found
[ 129.488566] bttv0: registered device video0
[ 129.488619] bttv0: registered device vbi0
Is this not set up correctly?
Posted: Fri Apr 06, 2007 9:51 pm
by Drakeweb
And this from:
zmu -d /dev/video -q -v
Code: Select all
Video Capabilities
Name: BT878 video ( *** UNKNOWN/GENER
Type: 171
Can capture
Can tune
Overlay onto frame buffer
Can clip
Scalable
Video Channels: 4
Audio Channels: 1
Maximum Width: 924
Maximum Height: 576
Minimum Width: 48
Minimum Height: 32
Window Attributes
X Offset: 0
Y Offset: 0
Width: 320
Height: 240
Picture Attributes
Palette: 4 - 24bit RGB
Colour Depth: 24
Brightness: 32000
Hue: 32000
Colour :32000
Contrast: 32000
Whiteness: 0
Channel 0 Attributes
Name: Television
Channel: 0
Flags: 3
Channel has a tuner
Channel has audio
Type: 1 - TV
Format: 0 - PAL
Channel 1 Attributes
Name: Composite1
Channel: 1
Flags: 2
Channel has audio
Type: 2 - Camera
Format: 0 - PAL
Channel 2 Attributes
Name: S-Video
Channel: 2
Flags: 2
Channel has audio
Type: 2 - Camera
Format: 0 - PAL
Channel 3 Attributes
Name: Composite3
Channel: 3
Flags: 2
Channel has audio
Type: 2 - Camera
Format: 0 - PAL
Posted: Fri Apr 06, 2007 10:04 pm
by jameswilson
lol, as i said your card isnt setup
[ 33.518930] bttv0: using: *** UNKNOWN/GENERIC *** [card=0,autodetected]
as the bttv doesnt know the card its guessing what it is, and its guessing wrong. You need to tell it what card you have, each card that is supported has a number. If its a single chip card you could try adding
options bttv card=77
to your modprobe.conf
in /etc/
Thanks!
Posted: Fri Apr 06, 2007 10:50 pm
by Drakeweb
Damn! You're good.
Thanks for that - you were completely correct. I needed to define the card type (which, for Ubuntu users, was in the following file:)
/etc/modprobe.d/options
I assumed that because my card was a cheap one from HK, that the UNKNOWN/GENERIC type it has assigned was correct.
I now have two cameras showing pictures. I'd post the images, but I'm sure you all believe me.
Finally, can you help me with this one?
After I rebooted to check the modprobe options, I had to CHMOD 777 /dev/video to make the cameras work, even though the link already had its permissions set to 777. Freaky, eh?
Thanks again,
Adam
Posted: Fri Apr 06, 2007 10:56 pm
by cordel
Try using /dev/video0 instead of the symlink.
/dev/video0
Posted: Fri Apr 06, 2007 11:09 pm
by Drakeweb
Nope. No go.
I changed the settings in zm to have the sources listed as /dev/video0 instead of /dev/video.
I checked that both /dev/video and /dev/video0 had permissions of 777.
I rebooted the server.
The zm webadmin showed the source as being /dev/video0, but it was coloured red. I looked at the camera image, and it was broken.
I then typed chmod 777 /dev/video (not video0) and the zm webadmin changed the source colour to orange and and camera images appeared.
So, I still need help with this one ...
Posted: Fri Apr 06, 2007 11:12 pm
by cordel
Then you need to check your logs. Part of the application should already be setting the video device (this is zmfix's job) so if it's not working it should be producing an error describing what is wrong.
ZMDC.LOG
Posted: Fri Apr 06, 2007 11:31 pm
by Drakeweb
I get this from zmdc.log:
Code: Select all
04/07/07 00:03:47.493485 zmdc[3334].INF [Server starting at 07/04/07 00:03:47]
04/07/07 00:03:51.082839 zmdc[3334].INF ['zmc -d /dev/video0' starting at 07/04$
04/07/07 00:03:51.203179 zmdc[3334].ERR ['zmc -d /dev/video0' exited abnormally$
04/07/07 00:03:51.204432 zmdc[3334].INF [Starting pending process, zmc -d /dev/$
04/07/07 00:03:51.212245 zmdc[3334].INF ['zmc -d /dev/video0' starting at 07/04$
04/07/07 00:03:51.252976 zmdc[3334].ERR ['zmc -d /dev/video0' exited abnormally$
04/07/07 00:03:51.732317 zmdc[3334].INF ['zmc -d /dev/video0' starting at 07/04$
04/07/07 00:03:51.773753 zmdc[3334].ERR ['zmc -d /dev/video0' exited abnormally$
04/07/07 00:03:52.332290 zmdc[3334].INF ['zmfilter.pl' starting at 07/04/07 00:$
04/07/07 00:03:53.822311 zmdc[3334].INF ['zmaudit.pl -c' starting at 07/04/07 0$
04/07/07 00:03:54.982272 zmdc[3334].INF ['zmwatch.pl' starting at 07/04/07 00:0$
04/07/07 00:03:56.072216 zmdc[3334].INF ['zmupdate.pl -c' starting at 07/04/07 $
04/07/07 00:04:01.071025 zmdc[3334].INF [Starting pending process, zmc -d /dev/$
04/07/07 00:04:01.082208 zmdc[3334].INF ['zmc -d /dev/video0' starting at 07/04$
04/07/07 00:04:01.120263 zmdc[3334].ERR ['zmc -d /dev/video0' exited abnormally$
04/07/07 00:04:21.021019 zmdc[3334].INF [Starting pending process, zmc -d /dev/$
04/07/07 00:04:21.032174 zmdc[3334].INF ['zmc -d /dev/video0' starting at 07/04$
04/07/07 00:04:21.069886 zmdc[3334].ERR ['zmc -d /dev/video0' exited abnormally$
04/07/07 00:04:26.052371 zmdc[3334].INF ['zmc -d /dev/video0' starting at 07/04$
04/07/07 00:04:26.097477 zmdc[3334].ERR ['zmc -d /dev/video0' exited abnormally$
04/07/07 00:04:26.652389 zmdc[3334].INF ['zmc -d /dev/video0' starting at 07/04$
04/07/07 00:04:26.694358 zmdc[3334].ERR ['zmc -d /dev/video0' exited abnormally$
04/07/07 00:04:37.242362 zmdc[3334].INF ['zmc -d /dev/video0' starting at 07/04$
04/07/07 00:04:37.287841 zmdc[3334].ERR ['zmc -d /dev/video0' exited abnormally$
04/07/07 00:04:38.242353 zmdc[3334].INF ['zmc -d /dev/video0' starting at 07/04$
04/07/07 00:04:38.285948 zmdc[3334].ERR ['zmc -d /dev/video0' exited abnormally$
04/07/07 00:04:49.102528 zmdc[3334].INF ['zmc -d /dev/video0' starting at 07/04$
04/07/07 00:04:49.147608 zmdc[3334].ERR ['zmc -d /dev/video0' exited abnormally$
04/07/07 00:04:49.732296 zmdc[3334].INF ['zmc -d /dev/video0' starting at 07/04$
04/07/07 00:04:49.773793 zmdc[3334].ERR ['zmc -d /dev/video0' exited abnormally$
04/07/07 00:05:00.322712 zmdc[3334].INF ['zmc -d /dev/video0' starting at 07/04$
04/07/07 00:05:00.368091 zmdc[3334].ERR ['zmc -d /dev/video0' exited abnormally$
04/07/07 00:05:00.912340 zmdc[3334].INF ['zmc -d /dev/video0' starting at 07/04$
04/07/07 00:05:00.955871 zmdc[3334].ERR ['zmc -d /dev/video0' exited abnormally$
04/07/07 00:05:11.512393 zmdc[3334].INF ['zmc -d /dev/video0' starting at 07/04$
04/07/07 00:05:11.556183 zmdc[3334].ERR ['zmc -d /dev/video0' exited abnormally$
04/07/07 00:05:12.112378 zmdc[3334].INF ['zmc -d /dev/video0' starting at 07/04$
04/07/07 00:05:12.151812 zmdc[3334].ERR ['zmc -d /dev/video0' exited abnormally$
04/07/07 00:05:22.712423 zmdc[3334].INF ['zmc -d /dev/video0' starting at 07/04$
04/07/07 00:05:22.755254 zmdc[3334].ERR ['zmc -d /dev/video0' exited abnormally$
04/07/07 00:05:23.302279 zmdc[3334].INF ['zmc -d /dev/video0' starting at 07/04$
04/07/07 00:05:23.342843 zmdc[3334].ERR ['zmc -d /dev/video0' exited abnormally$
04/07/07 00:05:33.902274 zmdc[3334].INF ['zmc -d /dev/video0' starting at 07/04$
This is the point at which I chmod 777 /dev/video and the errors in the log stop.
I'm afraid I can't get much inderstanding from the errors. Do they shed any light on the problem?
Posted: Fri Apr 06, 2007 11:34 pm
by cordel
No these errors don't show anything useful.
Did you check the zmpkg.log and your messages or syslog?
Your looking for an error from zmfix.
You can also try running zmfix manualy.
FIXED!
Posted: Sun Apr 08, 2007 12:04 pm
by Drakeweb
This second problem has been fixed. See the following topic:
http://www.zoneminder.com/forums/viewtopic.php?t=8621
Thanks to all who helped.
Adam