Single Chip BT878 Generic 4 Chan Card: resolution?

Post here to indicate any hardware you have used and which is known to work with ZoneMinder. Not for questions.
v1s
Posts: 2
Joined: Wed Dec 03, 2008 12:46 am

Single Chip BT878 Generic 4 Chan Card: resolution?

Post by v1s »

I have a Generic 4 chan card with single chip. I have it working sort of I think. I have it set options to card=77 and all 4 channels are working but they are only seem to work at 320x240 at 3fps or less. I thought the card can support 640x480 but when i put the resolution to that. I dont get a picture. It supported it under Windows when I was using the generic software that came with it. Anyone know if this supports higher resolutions under linux? What settings I need to do. my current modprobe options are:

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


The info from: lspci

01:01.0 Multimedia video controller: Brooktree Corporation Bt878 Video Capture (rev 11)
01:01.1 Multimedia controller: Brooktree Corporation Bt878 Audio Capture (rev 11)

Pic of what it looks like:

Image

Let me know if anything else is needed that could help.

Thanks
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Have a look at this post in the FAQ:
http://www.zoneminder.com/wiki/index.ph ... esolutions.
v1s
Posts: 2
Joined: Wed Dec 03, 2008 12:46 am

Post by v1s »

Thanks followed what it said and it worked perfect.

Thanks again.
User avatar
Lee Sharp
Posts: 1069
Joined: Sat Mar 31, 2007 9:18 pm
Location: Houston, TX

Post by Lee Sharp »

By the way, I have found that card to work best with this in the options file.

Code: Select all

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
sly
Posts: 7
Joined: Fri Jan 09, 2009 9:05 pm

Post by sly »

I have a card exactly like that.. only.. i have a different problem... It works just great under windows, i mean colour, and different resolutions. But in zm the best i get is 352x288, and garbage instead of images (garbage as in a lot of video noise, lines, dots and other stuff like that). the best i could do was some kind of an image, filled with noise, and b/w. I would like to try these settings that Lee Sharp so kindly shared, but i've got no idea how to find the options file.. or where to look for it... I;ve installed zm live cd 1.22.2.. i think... any help ????
thx. :D
buzz_host
Posts: 20
Joined: Sat Jan 03, 2009 1:45 pm

Post by buzz_host »

I have two of them working under ZM (Ubuntu 8.10) with no issues at all (initially had a colour issue but that was solved here). You may need to be a little more persistent?
sly
Posts: 7
Joined: Fri Jan 09, 2009 9:05 pm

Post by sly »

solved it in the meantime.now i've got 3 cameras going at 320x240 at around 2-3 fps. It's not much, but as I understood from this forum, it's the limit of this card. It's enough for now. Now I've seen another thing happening... One of the cameras is in modetect mode. Whenever i want to see the events i get a message along the lines of... ''An error has occured.Please consult your logs for error number... " and there is a hexadecimal number there.Any ideeas what can i do ? Thx.
User avatar
Lee Sharp
Posts: 1069
Joined: Sat Mar 31, 2007 9:18 pm
Location: Houston, TX

Post by Lee Sharp »

see the wiki about fixing a corrupt database.
sly
Posts: 7
Joined: Fri Jan 09, 2009 9:05 pm

Post by sly »

thanks lee... done just that, and now i'm back in zm... :)
on the other side, why is that after a couple of hours (maybe more) the image starts.. hmmmm.... not flickering.. but it looks like it's shrinking vertically and the expanding back to normal size. It doesn't shrink all the way.. it's like a flicker, but in both up-down directions at the same time... i've tried reducing the buffers and that fixed it for a while.. :)
any help ?
thx
LE:
any idea why can't i go any higher than 320x240 resolution ? if i try even 352x288, or simply change the buffers, whole thing turns red... i've increased the shared memory to 512 megs, but to no avail... :(
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Are you restarting ZM after you change settings so that ZM can reinitialize the proper amount of memory?
sly
Posts: 7
Joined: Fri Jan 09, 2009 9:05 pm

Post by sly »

thanks for the time taken to answer cordel, but yeap, i am doing /etc/init.d/zm stop and then start after evry change where zm tells me that i need to restart it... even after a "shutdown -r now" it's just the same. it doesn't bother me too much, but i just wanted to explore the limits of it all, and right now, those limits are pretty tight... :), and i was wondering if it's something (wrong) that i've done... :) any other suggestions ? any other logs that i might need to provide in order to see what is wrong ?
Thx.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Okay lets go down through a list of things since this issue you have I have not ever seen nor do I recall ever hearing of :?
These are in no particular order.

:arrow: All configured monitors on a device (each BT878 chip is one device) must be configured to be the same size, format, and palette. Since this card has four inputs all going to one BT878, all four must be exactly the same. Don't configure any inputs you are not using though, If you have three cams, configure only the three inputs.

:arrow: Some times using gbuffers=32 creates problems, you can try gbuffers=16 if your using a "slower" machine. You could even go down to 8. I know that the new V4L2 driver is supposed to be able to allocate this value depending on the applications needs, although I'm not sure how this is passed from the application to V4L2. While it's nice to be able to buffer 32 frames, If you are using analysis (looking for motion) ZM might get behind.

:arrow: Something else you can do is either put a dvd player on an input and see if you still see the same effect from that, then you know it's something on the computer. Or you could try plugging the camera into a monitor and see if you get the effect there which would mean the camera is sending it like that.

:arrow: Might try putting a heat sink on the BT878 especially if you running it as fast as it can go. They get fairly darn hot from switching between the inputs and it can affect the performance of the device including it stability.

Logs:
Run dmesg from the console after this problem starts, any errors that the kernel encounters show up usually here towards the end of the output as far as things hardware related which includes capture cards (Not IP cams though).
sly
Posts: 7
Joined: Fri Jan 09, 2009 9:05 pm

Post by sly »

thanks cordel. let me take it one step at a time...
1. I am using 3 cameras. I have only 3 inputs configured, all 3 running at 320x240,rgb24,3 fps.
2. everything was running ok as default
(ie. Image Buffer Size (frames) 40
Warmup Frames 25
Pre Event Image Count 10
Post Event Image Count 10
Stream Replay Image Buffer 1000
Alarm Frame Count 1) until the image started ''flickering''. that's when i stepped in and changed the settings from above to half (ie. image buffer size 20,warmup frames 12,pre event image count 5,post event image count 5 and stream replay image buffer 500). these settings worked, for a while, and now, the image is back at doing what it knows (:) flicker) and if i try to change the buffers back to the default settings, all monitors in zm console turn red.
ipcs -l comes back as :
------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 4194303
max total shared memory (kbytes) = 8192000
min seg size (bytes) = 1

------ Semaphore Limits --------
max number of arrays = 1024
max semaphores per array = 250
max semaphores system wide = 256000
max ops per semop call = 32
semaphore max value = 32767

------ Messages: Limits --------
max queues system wide = 16
max size of message (bytes) = 65536
default max size of queue (bytes) = 65536

3. and 4. haven't thought of doing, but once i get home i'll try it and let you know what happens.
Thanks again for taking the time to bother with such issues... :)
sly
Posts: 7
Joined: Fri Jan 09, 2009 9:05 pm

Post by sly »

well.. solved the "shrinking"/"flickering" issue. apparently, if i try and put the card to capture at anything above 1.5 fps, this is what happens. i set the max fps to 1, and now the card is just fine, working along at ~1.3 fps (why is this difference?).
thx for everything guys. i'll come back if anything else appears.
stugster
Posts: 2
Joined: Sat Mar 14, 2009 4:29 pm

Post by stugster »

Hi Guys,

I've just got my card finally working using

Code: Select all

modprobe 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
But the quality of the image is extremely poor. Tried all the settings, but nothing seems to be making it any better. It's a B&W camera, PAL. Any ideas?
Post Reply