Date: Fri, 5 Oct 2007 17:02:19 +0300 From: Achilleas Mantzios <achill@matrix.gatewaynet.com> To: Mark Tinguely <tinguely@casselton.net> Cc: freebsd-multimedia@freebsd.org Subject: Re: Zoneminder and multichannel cards Message-ID: <200710051702.19372.achill@matrix.gatewaynet.com> In-Reply-To: <200710051307.l95D7leR059696@casselton.net> References: <200710051307.l95D7leR059696@casselton.net>
next in thread | previous in thread | raw e-mail | index | archive | help
=CE=A3=CF=84=CE=B9=CF=82 =CE=A0=CE=B1=CF=81=CE=B1=CF=83=CE=BA=CE=B5=CF=85=
=CE=AE 05 =CE=9F=CE=BA=CF=84=CF=8E=CE=B2=CF=81=CE=B9=CE=BF=CF=82 2007 16:07=
, =CE=BF/=CE=B7 Mark Tinguely =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5:
> Achilleas Mantzios asks:
> > I dont know if you are familiar with zoneminder,
> > it has a capture daemon (zmc) which is used to grab the video.
>
> There are several clone simular to that card.
>
> > In the installation we have at work under linux, using a 4-chip board=
=3D20
> > (LMLBT44), i can see that there are only 4
> > instances of it (zmc) running=3D20
> > on /dev/video0,/dev/video1,/dev/video2,/dev/video3
> > to capture all 8 cameras.
> > This board supports 4 full rate inputs, or 8 multiplexed inputs.
> >
> > So for each one of the 4 chips, the corresponding zmc daemon is used
> > to simultaneously capture both channels (cameras) of the same chip.
> >
> > Theoritically is that possible with FreeBSD's bktr driver?
> > Could we have an app like lets say xawtv to display all (4 in my
> > case)=3D20 channels of a multiplexer board like LMLBT4M which utilizes =
only
> > one 878 ch=3D ip=3D20
> > and supports 4 multiplexed channels i.e. 4 cameras?
> >
> > If your answer is yes, then i should keep on trying with=3D20
> > =3D46reeBSD/ZoneMinder/zmc, etc...
> > Else i should buy 3 additional bt 878 cards, or switch to linux which i
> > wan=3D t=3D20
> > to avoid!
>
> No matter the OS, a BT878 can capture from one video input AT ONE TIME.
>
> The LMLBT4M has only one BT878 video capture chip. A person can write
> a program to capture images from up to 4 inputs using time division
> multiplexing.
I booted with linux and ZM works perfectly with multiplexed inputs.
=46rom what i see in the linux version of the zoneminder, in=20
zm_local_camera.cpp:579
it does:
if ( ioctl( m_videohandle, VIDIOCSCHAN, &vid_src ) < 0 )
{
Error(( "Failed to set camera source %d: %s", channel, strerror(errno) ));
return( -1 );
}
I suppose the above is a service of the linux bttv driver, right?
I.e. the bttv driver does the time division demultiplexing?
I tried smth for the FreeBSD version (zm_fbsd_camera.cpp)
if (ioctl(m_videohandle, TVTUNER_SETCHNL, &tmpchannel) < 0) {
Error(( "Failed to set camera source %d: %s", tmpchannel, strerror(errno) =
));
return( -1 );
}
but i got "Inappropriate ioctl for device".
However for single cameras (and testing with their input number)
ioctl(m_videohandle, METEORSINPUT, &c)=20
where c is
METEOR_DEV0, METEOR_DEV1, METEOR_DEV2, METEOR_DEV3
seems to work (as you had suggested some time ago).
When i tried to be sneaky and replaced the above=20
ioctl(m_videohandle, TVTUNER_SETCHNL, &tmpchannel)
with=20
ioctl(m_videohandle, METEORSINPUT, &c)=20
it didnt complain as a ioctl, but i got a strange (but rather expected effe=
ct)
of the video of one camera, inside the video of the 2nd camera.
(i tested with only 2 cameras).
So what i cant understand is:
1) How bktr understands about METEOR_DEV0, METEOR_DEV1, METEOR_DEV2,=20
METEOR_DEV3, how does it distinguish the 4 channels in LMLBT4M?
2) How could i arrange smth similar, provided its not very time consuming?
( i am trying to do all this at home hours, and they are extremely limited).
If you could have an idea on how to (easily) programmatically demux
the inputs, i'd be grateful.
>
> As you said there are cards with multiple BT878 that are either dedicated
> to one input or allow multiple inputs. For example, the Kodicom 4400 (and
> clones) have 4 BT878 capture chips and a crossbar that lets a person choo=
se
> from 16 inputs (on at a time per capture chip). I have a patch (see last
> week's archive for thread) that sets up the crossbar on the Kodicom 4400.
> There is also a Kodicom 8800 (and clones) with 8 BT878 capture chips which
> I have not used.
>
> --Mark Tinguely.
=2D-=20
Achilleas Mantzios
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710051702.19372.achill>
