Jump to content
Sign in to follow this  
gma

saa7134 multichannel dvr card options

Recommended Posts

Hi All,

 

We have an 8 channel saa7134 based dvr card bought from a reputable online store.

We have it up and running on Linux but when we monitor more than 3 video channels at the same time we start to see green horizontal lines/interference appear on the video outputs, especially when there is lots of motion.

We saw a similar thing (but not as pronounced) with a 4 channel bt878a card and were able to get around it by using the gbuffers driver option. We think this worked because it reduced the bandwidth going across the PCI-e bus and thus perhaps its a PCI-e bandwidth issue.

However, there doesn't appear to be a similar driver option for the saa7134 device.

Does anyone have any ideas/suggestions?

 

Cheers

Share this post


Link to post
Share on other sites

PCI E bus provides enough data bandwidth. And the card manufacturer had already tested it can hold 8Ch X D1 sized video data. So I do not think it is related to Bandwidth issue. You may check the power supply sufficient enough.You may video jack interfaces loose.

Share this post


Link to post
Share on other sites

Thanks for responding,

 

Its true i would have thought the manufacturer would have checked this out.

For power supply this was recently upgraded so i doubt it is this.

The interference gets progressively worse with each additional video channel that is spawned but system resources look fine.

 

I was thinking that perhaps these cards were intended to be used with CCTV software that perhaps use their own drivers/software. For example, the bttv card we have can support up to 16 channels but the linux bttv driver can only access 4 of these as there are only physically 4 chips/devices and gstreamer can't access the sub channels. Zoneminder however can access each devices subchannel.

 

Cheers

Share this post


Link to post
Share on other sites

It must be using 4 pieces of SAA7134 to make an 8 Ch video capture card. Enough bandwidth and CPU power that you do not need to worry about. But your application software could be wrong if it is to respond to interrupts, being generated every time a line of video data transfer done. You may change interrupts to be generated every time a frame of video data has been transferred to PC's system memory. Can I ask you what kinds of applications for the card?

Share this post


Link to post
Share on other sites

Hi SunnyKim,

 

So here is a rundown of what we have:

 

1 x PCI-e 8 chip saa7134 DVR card - providing 8 individual video devices/channels.

This is installed in a Fedora based PC, the kernel comes prebuilt with the required saa7134 driver module.

We use gstreamer to actually view the video channels using the v4l2src element.

Up to 3 simultaneous gstreamer instances of the first 3 channels are fine.

After this point each additional gstreamer instance that we spawn for each additional card channel causes the video output on each video to become more and more degraded in quality (lots of horizontal lines appearing which makes motion garbled).

 

We then try the same setup but instead use a PCI-e 4 chip BT878a card that provides 4 individual video devices/channels.

This is driven with the bttv module/driver which again come prebuilt with Fedora.

On this card we see a similar thing after we spawn the 4th video output (although it is nowhere as bad as with the saa7134 card).

However, in this case we can use a driver/module option called 'gbufsize' to reduce the default capture buffer size. This makes the video outputs appear to have a reduced framerate but crucially the horizontal line interference disappear.

 

In both cases system resources are fine, this is why we suspected it was PCI-e bandwidth.

There is no such option on the saa7134 driver module to have any effect on its bandwidth footprint.

Manipulating video characteristics such as resolution or framerate with in the gstreamer pipeline is of no use because it has no direct effect on the card output, rather it is only post processing what the card gives us.

Unfortunately, although we can get around the issue on the bt878 card, it is not ideal because there are only 4 chips on it and gstreamer can only see 4 video channels (even though the card supports up to 4 sub channels per chip - gstreamer can't access these).

Share this post


Link to post
Share on other sites

Hi,

 

We use them for testing various video devices.

So basically we hook up 8 devices to the card/system and run automated tests on them.

If 4 or more tests happen to open their respective video card channel at the same time, they will 'experience' the interference i am talking about.

 

The solutions are:

 

1. Find some way to stop the current card from producing interference when more than several channels are used.

2. Find a new card that does not exhibit interference when all the channels are active simultaneously

3. Manipulate the tests such that we avoid opening several video channels at the same time.

 

For solution 1 we cant seem to find any driver options to allow this - last possibility is to try the card out on a PCI-e v 3 slot to rule out bandwidth issues.

For solution 2, unfortunately we are tied to linux so the choice of card is slim.

For solution 3, this would be a last resort.

Share this post


Link to post
Share on other sites

Actually, we have become the only one chipset supplier that has survived from this red ocean. We are also supplying cards with its device driver. But it is all Windows based. If you can develop your own system from our Windows based device driver, without much tech support from us, we can send you some cards to you. If interested in, please leave your address in my Private Message Box on the "user control panel", top-left button above.

One last note from your comments "If 4 or more tests happen to open their respective video card channel at the same time, they will 'experience' the interference i am talking about".

It sounds you are experiencing "power shortage"

Share this post


Link to post
Share on other sites

Hey SunnyKim,

 

Thanks for all your replies and thanks for the offer. If we had the time i'd love to take you up on that. The reality is though that we are tied to linux for various other reasons at the moment (although one thing we would like to explore in the future is to receive the video signals via mutlicast which therefor releases the video capture bit from being linux based.

 

If you are interested this is the card we use (the second one at the bottom Specification Model 5008 (No Audio)):

 

http://www.camsecure.co.uk/PCIECapture.html

 

As you produce chipsets you will have infinitely more expertise in this area. Your theory on power is interesting.I double checked the cards and they have no separate power supply. The power supply to the PC is also the biggest that we can get for this model (DELL proprietary 650W). I don't suppose there are any simple tests to ascertain if it is a power issue? Does it matter for example what type of PCI-e slot the card is inserted into (i.e. x1, x4, x8, x16 etc).

 

Cheers

Share this post


Link to post
Share on other sites

I checked out your board on the link. Thanks. As PCI-E bus slot has one power lane that would cover up to 16 lanes of data transfer, the power would not be an issue for one lane of data transfer. But there could be an buffering issue for saa7134 , as it is not originally designed for such usage. When all 8 saa7134 bursts each of data at the same time, the instantaneous data rate could exceed the bandwidth that one lane of PCI E is limited to. There should be enough amount of memory inside saa7134 to sustain the data flow without overfull. That could mean the board product may not be tested and guaranteed. Please check if the software allows CIF sized video transfer, not D1 sized transfer for display resolution. I guess they may allow such options as the recording size is CIF sized. One more option that you can have is to use 4:2:0 video data transfer mode in stead of 4;2:2 mode.

If not working, you may use 4 Channel board.

Share this post


Link to post
Share on other sites

Hi SunnyKim,

 

Thanks again for your detailed response!

This has been a very informative thread.

Your suggestion sounds very likely. The only problem for us is that there doesn't appear to be any way to change the video characteristics.

Of all the driver options that are exposed there is no way to change e.g. capture resolution, fps or video transfer mode. We can do these things in gstreamer but that happens after the card has sent the video data across the PCI-e to the gstreamer application. The only way i can see to achieve this would be it may be possible to manually change the saa7134 driver source code and recompile it with suitable modifications.

 

Also, we managed to find a pci-e v3 slot which should have more bandwidth than the pci-e v2 slot but we see no difference.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×