Win 32 Grabber Support for
vic
The original port of vic for Windows 95 and Windows NT was done by
John Brezak. This version extends
it's capabilities by adding video for windows compatible grabber support.
For more information about vic look at
the vic home page on the LBL
web server.
Contents
Download
This work is still in progress. The latest version compiled by me was updated
on 25th March 1998. If you get wierd colors on some display modes let
me know. I had some color problems on 16 bit displays and had to compile
color-hi.cc without some optimisations (there is a bug in the optimiser of
VC++ 5). Kris
Hasler has compiled a binary using Tcl/Tk 8.0 which also includes
some UI mods and is available from his shrimp binaries web
page. Modifications from earlier versions are described in the change log. You can pickup a copy of the current version
of the binary from here. The zip file contains two
executables.
- vic.exe
This is the vic binary with the video for windows grabber support.
- vc.exe
This is a helper program for configuring cards with braindead drivers! You can
run this before running vic and select input port and video format settings.
When setting the format make sure to select the image size that you intend to
use when transmitting with vic. Select 320x240 for normal size transmission
and 160x120 for small size. This should not be necessary if your grabber
vendor has done a decent job with their driver.
Download vic.zip
Known problems
A large number of the problems listed here are caused by the very bad design
by Microsoft of the video capture API.
- Port selection not supported.
As far as I can tell there is absolutely no way of selecting an input port
through the API. The only way around this is for the application to request
the driver to popup a dialogue box for the user to select a port. As this
seems a particularly bad idea which cannot be intergrated in a clean way in
vic, I have supplied a helper application to perform this task before
starting vic.
- Detection of video standard not possible.
Again detection and selection of the video standard (PAL, SECAM or NTSC) is
only possible through a driver supplied video source dialogue. What is worse
is I have not found a way to get the video standard information through to
vic. As a result I assume all sources are NTSC and use 640x480 as the base
grabbing size.
- Video format selection doesn't work on all drivers.
Surprisingly apart from the standard dialogue box technique there is also
an API call for setting the captured frame format. The problem here is that
it is not properly supported by many of the drivers I have come across.
Some (like the QuickCam driver) completely ignore all requested settings but
on return indicate that the call to set the frame format was successful.
Others pay attention just to the format information and not the image size
requested. As a result with some cards you may get your image sitting at the
upper left corner of the window or alternatively only the upper left corner
of the image filling your capture window.
- Frame rate setting problems during capture.
All drivers I tried refuse to change the grabbing frame rate after
initiating capture. As a result in the first versions of the vic port
increasing the frame rate during capture had no effect. Reducing it did
reduce the send rate but not the amount of time the CPU spent in grabbing
frames. By stopping and restarting capture you could get the hardware to
grab at a different rate.
I have since modified the way in which the main vic thread interacts with
the driver thread. The driver now has to wait for vic to use up a frame
before it fetches the next one. A sideffect of this is that you can request
a very high frame rate from the driver and prevent it from using up CPU
time by starving it from frame buffers. As a result frame rate setting now
works but not very accurately due to performance issues. This technique was
suggested by Jay Borseth.
- No standard access to YUV formats.
The only standard frame formats that can be selected through the API all
give RGB data with different number of bits per pixel. The only driver
whose source code I have access to grabs data in YUV format and goes through
a series of conversions to achieve the requested RGB format. I suspect this
is the case with many grabber cards. Vic expects the data in YUV format so
after acquiring it from the driver in RGB it has to be converted back to
YUV. A large amount of processing goes to waste resulting in much lower
frame rates than would otherwise be possible. Some drivers do provide direct
access to YUV data but using a proprietary format. I intend to try and
support some of these formats for individual cards and drivers in order to
improve performance.
Tested hardware
Windows NT capture cards
Hardware tested by me at UCL:
- Grayscale
QuickCam by Connectix
The grayscale driver has now been released and can be obtained from the
Connectix web site. There is also a beta driver for the Color QuickCam but I
havn't had the time to test it.
I have tested the
beta
driver for the grayscale version of the QuickCam for Windows NT with
some success. After playing around a bit I found out that it has similar
problems to the 95 grayscale QuickCam driver. I couldn't however find out
where it stores the format information to hack it (like I did with the 95
driver). As a solution I have made vic pop up the driver configuration menus
when you start transmission so that the size of the image can be selected.
This solution worked.
There also seems to be a problem with the intensity settings. The driver is
unstable and unpredictable! It will on occasion crash the operating system!
There is some information available for this driver in the
FAQ that was distributed with the driver anouncement.
Nicholas Race and
Richard J Taylor
have also reported success with this driver.
Hardware tested by others:
Windows 95 capture cards
Hardware tested by me at UCL:
- Wincast/TV by Hauppauge
This is the best card I have tried so far. Apart from being very cheap it
comes with a built in TV tuner. There are also FreeBSD and Linux drivers
available on the net. There are several versions of this card which vary in
price and capability. Theoreticly as they all use the bt848 chip they will
all work.
- PCTV by miroMEDIA
Similar properties to the card above as it uses the bt848 chip.
- ComputerEyes/PCI
by Digital Vision, Inc
Excellent card! Comes with drivers specific for Windows95.
- Stinger
by VideoLabs, Inc
Excellent card! Comes with drivers specific for Windows95.
- Screen Machine II
by FAST
This card also worked. The only problem I encountered was that after
restarting capture a few times, the system crashes. Also reported working by
Guido Wessendorf.
- Video Galaxy GAMMA
by Aztech
The driver of this card almost works. When requesting an image format, it
accepts the number of bits per pixel and bitmap size for the frames but
does not scale the image to fit the bitmap. To get around this you have to
use the helper application to set the video format
before starting capture.
- Grayscale QuickCam
by Connectix
Tests I made with the QuickCam driver showed that it completely ignores all
information in the call for configuring the image format. To get around this
problem I have made the vic binary directly modify the quickcam.ini file to
select the required video format. In order for this hack to work you have to
name the vic binary "vic.exe".
- Color QuickCam
by Connectix
Works very well! Originally reported by
Julian J. Bunn.
- Video
Blaster RT300 by Creative Labs
Does not provide RGB bitmaps. Versions of vic after October 20 should
support it if you have an installed converter for it's output format.
Also reported working by
Richard Taylor.
Original problems reported by Bob
Olson.
Hardware tested by others:
Key to symbols:
- Card plugs into ISA bus.
- Card plugs into PCI bus.
- PCI cards offer much better performance to ISA cards (speed of PCI bus
is much higher) and are in general a lot easier to install as PCI cards can
share interrupts.
- Card comes with Windows 95 drivers.
- When the drivers are designed specificly for Windows 95 they are a lot
easier to install and configure. Devices that do not have Windows 95 drivers
do not intergrate properly into the system and do not show up in the Device
Manager hardware list.
A collection of Windows 95 drivers for various types of hardware can be
found here.
Card manufacturers who are having problems getting vic to work with their
cards and are willing to donate a card for debugging purposes, please contact
Isidor Kouvelas to make arrangements.
Feedback
I am very interested in finding out experiences other people have had with
this port. In particular I would like to extend my list of data about
grabber cards. The binary outputs debugging information which you can
collect either running it through Visual C++ or using Matt Pietrek's
loadprof utility which is included in the Microsoft Developers Network
library CD. Please send comments to
Isidor Kouvelas.
Acknowledgments
I would like to thank John Brezak
for providing me with his unfinished grabber code which considerably
accelerated this release, Mark Handley for
helping debug many bizarre looking images and Orion
Hodson for helping out with the most difficult task of PC hardware
configuration! This work has been supported by Hewlett Packard Labs Bristol
who donated the PCs used for development and by the
MERCI project (Telematics
Applications Programme - 1007).
Click here for more
information on UCL-CS.