JRobertJ
2010-01-18 23:01:01 UTC
I’ve written an application in VB.NET running on Windows XP using
WM_CAP_SEQUENCE and WM_CAP_SEQUENCE_NOFILE to capture video from a webcam
and it works correctly. The webcam uses the “USB Video Device” video source,
with stream settings of 640x480 resolution, YUY2, 614400 bytes. I can
preview the image, capture to a file, using the callback function I can
capture a frame and convert it from YUY2 to RGB sucessfully.
Using the same software, I’m attempting to do the same using a video capture
device rather than the webcam, and I’m having some troubles. The video
capture device uses the “Microsoft DV Camera and VCR” video source with
stream settings of 720x480 resolution, dvsd, 1036800 bytes. I can
sucessfully capture the video to a file correctly, however I cannot preview
the video, the capture window remains black. Furthermore, when I capture a
single frame using the callback function, I don’t know how to convert it to
RGB.
I observed that when using the webcam, that the size of the frame data was
the same as the size listed in the stream settings, 614400 bytes, however
when using the video capture device, the frame data was only 120000 bytes
although the stream settings specify 1036800 bytes.
The webcam uses the “USB Video Device” driver that comes with Windows,
whereas the video capture device uses the “AVC Compliant DV Tape
Recorder/Player” driver which also comes with Windows. The video capture
device uses IEEE 1394.
So, my questions are:
1) Why doesn’t the preview work when using the “Microsoft DV Camera and VCR”
video source? Is this a device driver issue, or an issue with the video
capture device? Does the preview data come from a different source than the
captured video data?
2) If the inability to preview is an issue with the driver, is there another
driver I can use, or a way to get the driver fixed?
3) Why aren’t the frame size and the stream setting bytes the same when
using the “Microsoft DV Camera and VCR” video source? I’d guess that the
driver is compressing the data, is this correct?
4) What is the format of the frame data, and how can I convert it to RGB? I
know the fccHandler is identified as “dvsd”, but I can’t find a specification
for it, or a way to convert it to RGB.
Thanks.
WM_CAP_SEQUENCE and WM_CAP_SEQUENCE_NOFILE to capture video from a webcam
and it works correctly. The webcam uses the “USB Video Device” video source,
with stream settings of 640x480 resolution, YUY2, 614400 bytes. I can
preview the image, capture to a file, using the callback function I can
capture a frame and convert it from YUY2 to RGB sucessfully.
Using the same software, I’m attempting to do the same using a video capture
device rather than the webcam, and I’m having some troubles. The video
capture device uses the “Microsoft DV Camera and VCR” video source with
stream settings of 720x480 resolution, dvsd, 1036800 bytes. I can
sucessfully capture the video to a file correctly, however I cannot preview
the video, the capture window remains black. Furthermore, when I capture a
single frame using the callback function, I don’t know how to convert it to
RGB.
I observed that when using the webcam, that the size of the frame data was
the same as the size listed in the stream settings, 614400 bytes, however
when using the video capture device, the frame data was only 120000 bytes
although the stream settings specify 1036800 bytes.
The webcam uses the “USB Video Device” driver that comes with Windows,
whereas the video capture device uses the “AVC Compliant DV Tape
Recorder/Player” driver which also comes with Windows. The video capture
device uses IEEE 1394.
So, my questions are:
1) Why doesn’t the preview work when using the “Microsoft DV Camera and VCR”
video source? Is this a device driver issue, or an issue with the video
capture device? Does the preview data come from a different source than the
captured video data?
2) If the inability to preview is an issue with the driver, is there another
driver I can use, or a way to get the driver fixed?
3) Why aren’t the frame size and the stream setting bytes the same when
using the “Microsoft DV Camera and VCR” video source? I’d guess that the
driver is compressing the data, is this correct?
4) What is the format of the frame data, and how can I convert it to RGB? I
know the fccHandler is identified as “dvsd”, but I can’t find a specification
for it, or a way to convert it to RGB.
Thanks.