Tried a lot of things, but still BTTV/BT878 Problems :-(

Post here to ask any questions about hardware suitability, configuration in ZoneMinder, or experiences. If you just want to know if something works with ZoneMinder or not, please check the Hardware Compatibility sections in the forum, and the Wiki first. Also search this topic as well.
Post Reply
kz
Posts: 2
Joined: Thu May 31, 2007 2:43 pm

Tried a lot of things, but still BTTV/BT878 Problems :-(

Post by kz »

Hi!

I own an analogue camera (FBAS) connected to a Leadtek WinFast VC100 XP PCI-Framegrabber-Card with a BT878-chipset:
Image

ZM gets a picture from the v4l-device (/dev/video0), but from time to time it looks like ZM "looses" the signal (OSD-date is then 1.1.1970) for some seconds. Another symptom is, that I never reach the full fps-rate of 25 fps (PAL). When I configure lower frame-rate, it's also not constantly reached.

The bttv-driver outputs the always following error messages:

Code: Select all

Sep 27 13:53:07 cctvserver kernel: bttv0: OCERR @ 3858001c,bits: VSYNC HSYNC OFLOW FBUS OCERR*
Sep 27 13:53:25 cctvserver kernel: bttv0: OCERR @ 3858001c,bits: HSYNC OFLOW OCERR*
Sep 27 13:53:25 cctvserver zma_m1[5390]: INF [camera1: 7000 - Processing at 18.52 fps]
Sep 27 13:53:43 cctvserver kernel: bttv0: OCERR @ 3858001c,bits: VSYNC HSYNC OFLOW OCERR*
Sep 27 13:53:44 cctvserver zmc_dvideo0[5493]: INF [camera1: 4000 - Capturing at 18.52 fps]
Sep 27 13:53:54 cctvserver kernel: bttv0: OCERR @ 3858001c,bits: HSYNC OFLOW FBUS OCERR*
Sep 27 13:54:00 cctvserver kernel: bttv0: OCERR @ 3858001c,bits: HSYNC OFLOW FBUS OCERR*
Sep 27 13:54:19 cctvserver zma_m1[5390]: INF [camera1: 8000 - Processing at 18.52 fps]
Sep 27 13:54:34 cctvserver kernel: bttv0: OCERR @ 3858001c,bits: HSYNC OFLOW FBUS OCERR*
Sep 27 13:54:35 cctvserver kernel: bttv0: OCERR @ 3858001c,bits: HSYNC OFLOW OCERR*
Sep 27 13:54:38 cctvserver zmc_dvideo0[5493]: INF [camera1: 5000 - Capturing at 18.52 fps]
Sep 27 13:54:41 cctvserver kernel: bttv0: OCERR @ 3858001c,bits: HSYNC OFLOW OCERR*
Sep 27 13:54:48 cctvserver kernel: bttv0: OCERR @ 3858001c,bits: HSYNC OFLOW OCERR*
Sep 27 13:54:58 cctvserver kernel: bttv0: OCERR @ 3858001c,bits: HSYNC OFLOW FBUS OCERR*
Sep 27 13:55:02 cctvserver kernel: bttv0: OCERR @ 3858001c,bits: HSYNC OFLOW OCERR*
The ZMC daemon is also restarted often (see also the bttv reset messages):

Code: Select all

Sep 27 16:35:06 cctvserver zmc_dvideo0[3673]: INF [Debug Level = 0, Debug Log = <none>]
Sep 27 16:35:06 cctvserver zmdc[2827]: INF ['zmc -d /dev/video0' starting at 07/09/27 06:35:06, pid = 3673]
Sep 27 16:35:06 cctvserver kernel: bttv0: reset, reinitialize
Sep 27 16:35:06 cctvserver kernel: bttv0: PLL: 28636363 => 35468950 . ok
Sep 27 16:35:06 cctvserver zmc_dvideo0[3673]: INF [Starting Capture]
Sep 27 16:35:10 cctvserver kernel: bttv0: timeout: drop=6278 irq=317395/317395, risc=36a2561c, bits: VSYNC HSYNC OFLOW RISCI
Sep 27 16:35:15 cctvserver zmdc[2827]: INF [Starting pending process, zmc -d /dev/video0]
Sep 27 16:35:15 cctvserver zmdc[3674]: INF ['zmc -d /dev/video0' started at 07/09/27 06:35:15]
Sep 27 16:35:15 cctvserver zmdc[2827]: INF ['zmc -d /dev/video0' starting at 07/09/27 06:35:15, pid = 3674]
Sep 27 16:35:15 cctvserver zmc_dvideo0[3674]: INF [Debug Level = 0, Debug Log = <none>]
Sep 27 16:35:15 cctvserver kernel: bttv0: reset, reinitialize
Sep 27 16:35:15 cctvserver kernel: bttv0: PLL: 28636363 => 35468950 . ok
Sep 27 16:35:15 cctvserver zmc_dvideo0[3674]: INF [Starting Capture]
Sep 27 16:35:22 cctvserver zma_m1[2851]: INF [camera1: 232000 - Processing at 13.16 fps]
The bttv-driver seems to detect the card correct. Kernel output:

Code: Select all

bttv: driver version 0.9.16 loaded
bttv: using 8 buffers with 2080k (520 pages) each for capture
bttv: Bt8xx card found (0).
bttv0: Bt878 (rev 17) at 0000:00:01.0, irq: 16, latency: 32, mmio: 0xec000000
bttv0: detected: Leadtek WinFast VC 100 [card=114], PCI subsystem ID is 107d:6607
bttv0: using: Winfast VC100 [card=114,autodetected]
bttv0: gpio: en=00000000, out=00000000 in=00ffffff [init]
bttv0: using tuner=4
bttv0: i2c: checking for TDA9887 @ 0x86... not found
bttv0: registered device video0
bttv0: registered device vbi0
bttv0: PLL: 28636363 => 35468950 . ok
What I tried so far

IRQ problems: this was the first problem I thought of. So tried to change the slots of the PCI cards in the server in many different ways. The grabber card has now it's own IRQ, but there is nearly no difference. Worst configuration (nothing was displayed) was, when the grabber card had to share its IRQ with a network card.

BTTV parameters: I also tried several parameters of the bttv-module including to specify other cards (card=nnn) or to enlarge the number of capture buffers (gbuffers). Nothing changed. :-(

Changed resolution and fps-rate:
This is the only thing where I can notice clearly, that the number of error messages decreases, when I configure ZM to use a higher resolution (eg 640x480) and decreases if use a lower resolution (320x240, nearly no errors from bttv). The resolution I want (480x360), doesnt work without errors :-(, but when I use 320x240@10fps there is nearly no error message in the kernel log.

Please: can someone give me a hint what I can try else or how I can isolate the problem?

THANKS IN ADVANCE and best regards,
Kurt.

PS: Here is also the output from ZMU:
# zmu -d /dev/video0 -q -v
Video Capabilities
Name: BT878 video (Winfast VC100)
Type: 171
Can capture
Can tune
Overlay onto frame buffer
Can clip
Scalable
Video Channels: 3
Audio Channels: 0
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: 32768
Hue: 32768
Colour :32768
Contrast: 32768
Whiteness: 0
Channel 0 Attributes
Name: Composite0
Channel: 0
Flags: 2
Channel has audio
Type: 2 - Camera
Format: 0 - PAL
Channel 1 Attributes
Name: S-Video
Channel: 1
Flags: 2
Channel has audio
Type: 2 - Camera
Format: 0 - PAL
Channel 2 Attributes
Name: Composite2
Channel: 2
Flags: 2
Channel has audio
Type: 2 - Camera
Format: 0 - PAL
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

This problem is a bugger, It can be any of the following:
:arrow: Interferance on/poor feed line will cause it to lose sync.
:arrow: Bad cam.
:arrow: Bad board.
:arrow: Kernel driver problems (bug, wrong driver, etc.)
:arrow: board overheating (You should have heatsinks on the bt8xx chips).
:arrow: IRQ Conflict

How to find out....
Try just one camera directly to the card (no long feed lines) with only one input on the capture device enabled if you still see the error change cameras, if still errors try changing inputs ( I have only had one board go bad my self, but didn't do a whole lot of testing, it could be possable that one input on a chip can go bad but I have not verified this, and it is just as possible that the whole chip and all inputs will fail. Agian, I have not verified this).
Try a different Distro ( Live CD works great for this as well ;) ).
It's a process of elimination, I know of no other way

[Edit] Add IRQ conflict to the list.
Last edited by cordel on Mon Feb 11, 2008 8:09 pm, edited 1 time in total.
User avatar
robi
Posts: 477
Joined: Sat Mar 17, 2007 10:48 am

Re: Tried a lot of things, but still BTTV/BT878 Problems :-(

Post by robi »

kz wrote:I own an analogue camera (FBAS) connected to a Leadtek WinFast VC100 XP PCI-Framegrabber-Card with a BT878-chipset
This was my very first card I was having, when I first tried ZoneMinder. It worked very stable, straight out of the box, not needing any tuning in modprobe either with the LiveCD Mandriva 2007.0 provided by Ross, back then with ZM 1.22.3. This card doesn't need a heatsink, it has one composite input and one S-Video input, which can be accessed as separate inputs, but you need an S-Video cam for the second input...

So it worked rock solid, offered me stable 25fps in PAL from that single composite input, for months (I use 384x288 - this is the biggest PAL resolution with no interlacing). The only reason I changed it was that I needed several cameras, and all of them were composite-only - I replaced it with a Pico2000, however I still keep this card as a backup, and considering now to put it back as a second card, for one of my cameras that perhaps needs more fps than the pico can give.

This is a great card to start with!
Last edited by robi on Mon Feb 11, 2008 11:08 am, edited 2 times in total.
v1.25.0 + Ubuntu Linux 12.04 Server
User avatar
robi
Posts: 477
Joined: Sat Mar 17, 2007 10:48 am

Post by robi »

cordel wrote:This problem is a bugger, It can be any of the following:
:arrow: Interferance on/poor feed line will cause it to lose sync.
:arrow: Bad cam.
:arrow: Bad board.
:arrow: Kernel driver problems (bug, wrong driver, etc.)
:arrow: board overheating (You should have heatsinks on the bt8xx chips).
Plus make sure your motherboard doesn't have a VIA chipset.
v1.25.0 + Ubuntu Linux 12.04 Server
Post Reply