TVideoGrabber v7.5 build 212.26 - April 23, 2008
description
download
user guide
faq support
purchase
FAQ - TROUBLESHOOTING
READ FIRST
Codecs and debugging
Licensing
How do I remove the nag-screens?
What is the difference between the "without
sources" and "with source code" versions?
Graphics and text overlays
The graphic or text overlays are not refreshed when the video clip
is paused
The graphics or text overlays are displayed during the
recording,
but when I play the clip they do not appear
The graphics or text overlays I apply look fine during
recording,
but they look wrong during playback
Is it possible to draw over individual
frames, e.g. to draw a circle on the 50th video frame?
When I add my own code in the
OnFrameOverlayUsing... events, the program freezes
I need to invert colors only in a part of the video frame
Display
When I start preview or I open the player I get a black window (or sometimes white
window)
How can I dock / undock the component?
Preview
By default the control resizes by itself. How can I get full control
on the width and height of the
control?
The full screen preview is not smooth
I put a TVideoGrabber component on the form,
run the project but no video appears
DV preview appears interlaced in full size
My video card is shipped with a custom third-party renderer
filter, how can I use it instead of the default video renderers?
Preview does not start
automatically when I run my project
Preview does not restart
after changing a property or calling one of the dialogs
No window transparency when starting preview
The video quality settings are not available for my capture
device. When running MainDemo.exe, the "Quality" button is disabled and the
"IsVideoQualityAvailable" property returns "false".
StartPreview fails on a Windows Media Center platform
AVI/MPEG Recording
In the "stream" dialog my video capture device shows a compression
format (e.g. I420). How can I select this format? Is it related to
CompressionMode?
Black screen when invoking StartRecording
When invoking PauseRecording the frame count
goes on and on - (paused or not)
Black screen when invoking StartRecording
During recording, can I create several small video
sequences instead of a large video clip?
I assign a value to the RecordingBacktimedFramesCount
property, but when I
start recording to fill the buffer nothing happens.
How can I record 2 cameras synchronously?
I get an error or a black window if I start the recording from the IDE, but
not if I run the ".exe" out of the IDE
I want to record an AVI file encoded in Windows Media 9 format, but the Windows Media
Video 9 codec does not appear in the VideoCompressors list.
WMV (ASF) recording
The ASF recording fails to start
Motion detection
How can I record only when motion is detected?
Frame capture
The frame capture does not work when playing a MPEG2 clip or previewing a MPEG2
stream
Player
Does TVideoGrabber support Dolby 5.1 audio playback (AC3)?
When the clip is paused, the overlays are not refreshed (e.g. the mouse free
hand drawing included in the demo does not refresh)
When the clip is playing, how can I know the total duration
and/or frame count of the clip?
Is it possible to play Quicktime (*.mov) media clips?
In paused mode, the player frame positioning is not
accurate, either by using
the PlayerTrackbar, either by using SetPlayerFramePosition or
SetPlayerTimePosition.
I wish to use only the player, how can I disable
features related to the video and audio capture devices
How to connect a trackbar to TVideoGrabber?
I added a TTrackBar in the form. Butthe it was not moving when playing a video.
When the player is paused and I step forward or backward by using the arrow
keys with the player's trackbar, sometimes frames are reported twice by the OnFrameProgress
event.
I use my own trackbar control to control the player position. When I change
the PlayerFramePosition from the trackbar's event, the PlayerFramePosition value jumps back and forth from the current value to what the old value would have been. This causes the slider to jump back and forth.
Reencoding
The reencoding of VOB files fails.
Codecs
"MPEG Layer-3" codec and concurrent recordings
Does TVideoGrabber include a MPEG-2 decoder?
Explorer crashes when opening a DivX video
*.VRO clips fail to play
Multiple cameras
I can't preview 2 DV cameras concurrently. Either only one camera
is previewing
at the same time, either my test project crashes
Can I do network streaming with more than one camera?
I have a standard 4 inputs card, I need some sample code to get 2 inputs previewing in 2 separated
TVideoGrabber components.
When using a video card with 4 multiplexed inputs, the video is jumping
in multiplexed mode (master/slave or mosaïc)
Network streaming
Do you have examples of video and audio
streaming?
The network streaming fails to start on a Windows 2000 platform
Could you explain me how to setup my computer that is running TVideoGrabber and watch the live video stream by using another computer over the network ?
How can I get live network streaming WITH AUDIO in preview
mode?
When I enable the live network streaming under Windows 98 or Windows ME preview
and/or recording fails.
My computer has a non-routable local IP address (192.168.0.122) behind a
router/firewall, and my ISP assigns me a dynamic IP address that changes every
day. How can my clients connect from the Internet to the one of my computers that is streaming
TVideoGrabber?
Motion detection
How can record to AVI only when motion occurs?
Audio
The AudioInputLevel property has no
effect on the speaker volume
No audio rendering or recording with ATI cards
General
How can I capture 2 cameras synchroneously?
Preview, recording or playback fails to start
Error when opening mpeg clips. Nothing is
displayed
Interaction with third-party applications
When TVideoGrabber is displaying the
video, I can't start my application
that reports an error saying the hardware display is not available
INSTALL
Invoking regsvr32.exe on Vista
returns DLLRegisterServer failed with error code 80004005
Visual C# .NET
How can I use TVideoGrabber with Visual C# .NET?
How can I create a user control including TVideoGrabber with Visual C# .NET?
How can I assign a new font to the
TextOverlay_Font property?
I get the "Error 1 Cannot implicitly convert type
'int' to ..."
error when assigning an int value to a TVideoGrabber property
How can I retrieve the RGB values of a pixel on the current video
frame?
Visual Basic 6
I can't open the Visual Basic MainDemo project because the FM20.OCX
(FM20.DLL) controls are not installed
I do not find in the OCX several properties and functions that are listed in
the user guide
I invoke TVideoGrabber between a main form and child forms, and I get an
error when exiting or closing a child form
Visual C++ 6
I get an error when building or running my VC++
project after upgrading the vidgrab_VC6.ocx library
Delphi and C++Builder
I installed the trial version of C++Builder. I installed the component without
problem, placed it on a form, but when I run my project I get an error
How can I choose between creating a project's
".exe" that contains the full TVideoGrabber library, or a small project's
".exe" than links to the TVideoGrabber library?
I get an error "the procedure entry point ...
procedure$qri ... could not be located in library Vcl40.bpl"
error when I try to install TVideoGrabber on the component palette.
TVidgrab.lib or TVidgrab.bpi file not
found when compiling
How must I configure C++Builder to make an
.exe that does not require TVidGrab.bpl at runtime?
About Delphi trial versions
Exception error CPU window when running from the IDE
Video capture devices
Hauppauge PVR: no audio rendering during recording
or playback
I am calling the VideoDevices list from the OnDeviceArrivalOrRemoval
event. When I turn a video device on, the VideoDevices list is updated, but when I turn it off it is not removed from the list.
How can I use TVideoGrabber with 4 cameras?
Logitech webcams: how can I disable the face
tracking feature?
Provideo PV326C / PV326CH does not appear in the
VideoDevices list.
Avermedia EZMaker USB 2.0: can't set the analog video standard and
video input
Hauppauge WinTV USB: no AVI audio capture
NVIDIA Video Capture driver: incorrect video
windows
Pinnacle systems Movie Box / Movie Box Deluxe USB
IDS Falcon: not all the video capture device features are
available programmatically.
Typhoon WebShot USB 300K: black frame capture
or jerkey display
Sample capture
Is it possible to access the
compressed video data buffer from TVideoGrabber?
READ FIRST
Codecs and debugging
Some codecs are protected against debugging, and this may cause problems when
running your application under the control of the debugger.
The symptoms are: preview, recording or playback fails, or just a few frames are
displayed, or just a black window appears. Sometime the codec popups automatically a message
like this
one, and the application is closed immediately.
This problem occurs ONLY when the project is running from the IDE and the debugger is
enabled.
To verify that, simply run the .exe of your project out of the IDE. If it
works, either you must run your project out of the IDE, either you must disable the integrated debugger to make these tests
(Tools | Debugger Options, uncheck "integrated debugging").
This problem has been reported e.g. when trying to play MPEG2 video clips recorded with an Hauppauge PVR
(the concerned codec is the InterVideo Video Decoder).
One workaround consists to install a different codec having the same input and output formats, that can play the video clips under a debugger control.
If the stream is a MPEG-2 stream, for debugging purpose you can install
third-party MPEG2 decoders, e.g. like:
- the
Elecard MPEG2
decoder (note that the evaluation version of this codec shows a nag-screen walking across the
video)
- the GPL
MPEG2 decoder (download and install MpegDecoder012.msi)
Licensing
How do I remove the nag-screens of
the evaluation package?
After purchasing the license, you will receive a download link
to the licensed package, that includes the component binaries without
nag-screens.
You will have simply to replace the evaluation component binaries by the
licensed component binaries as explained in the "readme.txt" file to
get the nag-screens removed.
What is the difference between the "without sources"
and "with source code" versions?
The "without sources" licensed package looks like the full evaluation package that can be downloaded from our web site, but of course without
nag-screens.
The "with source code" package looks like a "without sources" package, but includes additionally the source code of the TVideoGrabber component
itself, written in Delphi.
The code of the demo projects included in the package is free of
use. The purpose of the demo projects is to show how to implement the component within
an application. This code can be reused as needed.
GRAPHICS AND TEXT OVERLAYS
The graphic or text overlays are not refreshed
when the video clip is paused
Enable the PlayerRefreshPausedDisplay
property.
The graphics or text overlays are displayed during the recording, but when I
play the clip they do not appear
- disable the RecordingInNativeFormat property,
- set the FrameGrabber property to fg_BothStreams.
The graphics or text overlays I apply look
fine during recording, but they look wrong during playback
Simply check that the frame grabber (or at least the graphics overlays) are disabled during
playback.
The frame overlay feature can be applied during recording as well as during
playback. Of course, usually, if it is applied during recording, it should not be applied during
playback.
If you do not disable the graphics overlay during playback, these operations will be
re-applied over the playback frames in the same manner they were during
recording, so the frame overlay will be performed 2 times, one time
during recording and one time during playback.
To prevent this problem:
- either disable the frame grabber during playback (but you won't have the
frame capture feature available during playback),
- either check in the OnFrameOverlayUsing... events that you are in a
"recording" state, e.g.:
procedure
TfrmMainForm.VideoGrabberFrameOverlayUsingDIB(Sender: TObject;
const FrameInfo: TFrameInfo; DibSection: PDIBSection);
begin
if VideoGrabber.CurrentState = cs_Recording then begin
// we perform overlay operations only during
recording
end;
end;
Is it possible to draw over individual
frames, e.g. to draw a circle on the 50th video frame?
Yes, this can be done easily from the OnFrameOverlayUsingDC
event, e.g.:
procedure TForm1.VideoGrabber1FrameOverlayUsingDC(Sender:
TObject;
const FrameInfo: TFrameInfo; Dc: HDC);
const
BORDER = 10;
var
OldBrush: LongInt;
OldPen: LongInt;
TransparentBrush: HGDIOBJ;
Pen: HPEN;
begin
if FrameInfo.FrameNumber < 50 then begin
// we want a transparent circle background
TransparentBrush :=
GetStockObject(NULL_BRUSH);
// we want to draw a blue circle
Pen :=
CreatePen(0, 1, clBlue);
// we save the current brush and select the new brush
OldBrush := SelectObject (Dc,
TransparentBrush);
// we save the current pen and select the new pen
OldPen :=
SelectObject(Dc, Pen);
// we draw the blue circle
Ellipse (Dc, BORDER, BORDER, VideoGrabber1.VideoHeight - BORDER, VideoGrabber1.VideoHeight - BORDER);
// we restore the current pen
SelectObject (Dc,
OldPen);
// we restore the current brush
SelectObject (Dc,
OldBrush);
// we delete our brush
DeleteObject
(TransparentBrush);
// we delete our pen
DeleteOBject
(Pen);
end;
end;
When I add my own code in the OnFrameOverlayUsing... events, the program freezes
From these events you should not perform any actions with the potential to block, such as holding a critical section or waiting on another
thread. Also, do not call any GDI or USER32.DLL APIs that might cause a window to
move.
Important:
Reading or setting properties of VCL components may invoke indirectly these
functions, therefore you can have to use intermediary variables or flags to set/retrieve
VCL component properties from the OnFrameOverlay... events.
E.g. to read a property of a TListBox from the OnFrameOverlay... event, use an intermediate
TStringList variable that will be set when the TListBox.Text property changes,
and then read the TStringList variable within the OnFrameOverlay... event.
I need to invert colors only in a part of the
video frame
This can be done easily from the
OnFrameOverlayUsingDC event by using the following sample code:
procedure TForm1.VideoGrabberFrameOverlayUsingDC(Sender:
TObject; Dc: HDC; FrameNumber: Cardinal; FrameTime: Int64; FrameId: Integer);
var
TempDc: HDc;
begin
TempDc := CreateCompatibleDc (Dc);
BitBlt (Dc, 0, VideoGrabber.VideoHeight - 50,
VideoGrabber.VideoWidth, VideoGrabber.VideoHeight, TempDc, 0, 0, DSTINVERT);
DeleteDc (TempDc);
end;
Feel free to contact us at support@datastead.com
if you need the same sample code for VB6 or Visual VB and C# .NET.
DISPLAY
When I start preview or I open the player I get a black window (or
sometimes white window)
This problem can have 2 origins:
1. the current video render is not compatible:
Try VideoRenderer = vr_VMR7, or VideoRenderer =
vr_StandardRenderer
2. the current video subtype may not be
supported for the current video size (when a video capture device is used as
video source):
In this case try a different VideoSubtype index
in the VideoSubtypes list.
How can I dock / undock the component?
Here is the sample code to undock the component:
procedure TForm1.btnUndockClick(Sender: TObject);
begin
VideoGrabber1.Parent := nil;
VideoGrabber1.Visible := false;
Videograbber1.Display_Embedded := false; // undock
VideoGrabber1.Display_AutoSize := True; // disable it to force the width and height specified in Display_SetLocation bloew
VideoGrabber1.Display_KeepAspectRatio := True; // disable it to adjust the video window to the control window
VideoGrabber1.Display_SetLocation (10, 10, 320, 240); // 320 and 240 are not used because of AutoSize above
end;
and then to dock it again:
procedure TForm1.btnDockClick(Sender: TObject);
begin
Videograbber1.Display_Embedded := True;
VideoGrabber1.Visible := True;
VideoGrabber1.Parent := MyParentControl;
end;
PREVIEW
By default the control resizes by itself. How can I get full control over the width and height of the
control?
Disable the Display_AutoSize and Display_KeepAspectRatio
properties.
The full screen preview is not smooth
Try the following:
- set the video renderer to VMR7 or VMR9 (VideoRenderer =
vr_VMR7 or VideoRenderer = vr_VMR9)
- disable the frame grabber if not required (set FrameGrabber =
fg_Disabled)
I put a TVideoGrabber component on the form, run the project but no
video appears
The AutoStartPreview property is disabled by default. You can:
- either enable AutoStartPreview: the preview will start automatically when the form is
created, even if it is not
yet visible,
- either invoke StartPreview from the OnShow event of the form where
TVideoGrabber is located, to start preview only when the form is shown.
My video card is shipped with a custom third-party
renderer filter, how can I use it instead of the default video renderers?
Invoke the ThirdPartyFilter_AddToList function before invoking StartPreview, and
pass the CLSID of your third-party filter. E.g.:
...
uses ComObj;
...
procedure
TfrmMainForm.Button1Click(Sender: TObject);
const
CLSID_MyRendererFilter: TGUID =
'{70e102b0-5556-11ce-97c0-00aa0055595a}';
begin
if VideoGrabber.ThirdPartyFilter_AddToList (tpf_VideoRenderer,
GUIDtoString (CLSID_MyRendererFilter), 'rndr', true, false) > -1 then begin
ShowMessage ('filter added');
VideoGrabber.StartPreview;
end;
end;
Feel free to contact us at support@datastead.com if you don't
know how to retrieve the CLSID of your renderer filter.
DV preview appears interlaced in full size
To get it deinterlaced:
- with the frame grabber enabled(1) : enable the Video_Deinterlace
property,
- with the frame grabber disabled(1) : select the VMR7 video renderer.
(1) the frame grabber is disabled when the FrameGrabber
property = fg_Disabled
Preview does not restart
automatically after changing a property or calling one of the dialogs.
1) the AutoStartPreview does not work:
- when the component is dynamically created at runtime,
- with the "OCX" version,
- when the component is built into a DLL.
In these cases simply invoke StartPreview when
running the application.
2) when the component is placed on a Delphi or C++Builder form, you have to enable the AutoRefreshPreview
property.
No window transparency when starting
preview.
If you do not need to capture frames or draw over frames, disable the frame
grabber (FrameGrabber = fg_Disabled), or insert it on the capture stream
only or (FrameGrabber = fg_CaptureStream).
The video quality settings are not available for my capture
device. When running MainDemo.exe, the "Quality" button is disabled
and the "IsVideoQualityAvailable" property returns "false".
If your video capture device has video quality settings and they
are not available, it is possible that the driver of your device does not expose
the quality properties. If your capture card is based on Btxxx chips (which is
the case of 80% of the PCI video capture boards) we suggest you to try this generic
WDM driver.
StartPreview fails on a
Windows Media Center platform
You may have to stop the Media Center service before invoking
StartPreview or StartRecording.
AVI/MPEG RECORDING
In the "stream" dialog my video capture device shows a compression
format (e.g. I420). How can I select this format? Is it related to
CompressionMode?
It is not related to CompressionMode. The CompressionMode and CompressionType
properties are used ONLY to activate the sofware compressors available in the VideoCompressors and AudioCompressors list.
The formats exposed in the "stream" dialog of the video capture
devices are considered as "native" formats. They are exposed in the
"VideoSubtypes" list and selected with the VideoSubtype index.
So to specify you want to record in one of the native formats of the video
device (e.g. I420), proceed as follows (let's suppose your webcam appears in the
VideoDevices list as "Creative Webcam (WDM)")
VideoGrabber.VideoDevice =
VideoGrabber.VideoDeviceIndex ("Creative Webcam (WDM)")
VideoGrabber.VideoSubtype = VideoGrabber.VideoSubtypeIndex ("I420")
VideoGrabber.RecordingInNativeFormat = true
VideoGrabber.CompressionMode = cm_None
VideoGrabber.StartRecording
Black screen when invoking StartRecording
This problem has been reported when video compression is enabled and the
video compressor selected is not suitable.
Be sure that CompressionMode = cm_NoCompression, or that a suitable VideoCompressor
is selected in the VideoCompressors list.
When invoking PauseRecording the frame
count goes on and on (paused or not)
The pause/resume feature is disabled by default. Enable the RecordingCanPause property
before invoking StartRecording.
During recording, can I generate several small video sequences
instead of a large video clip?
Yes, during recording (after invoking StartRecording),:
- if you want to let TVideoGrabber generate the new file name automatically
according to the AutoFileName propety, set RecordingFileName = "" then
invoke RecordToNewFileNow, e.g:
VideoGrabber.recordingFileName =
""
VideoGrabber.RecordToNewFileNow
- if you want to provide your own recording file name, assign to
RecordingFileName the file name to use, then invoke RecordToNewFileNow,
e.g.:
VideoGrabber.recordingFileName =
"c:\myclips\mynewclip.avi"
VideoGrabber.RecordToNewFileNow
The video clip currently recording is immediately closed and a video clip having the new file name starts
recording.
You can also use a timer to do new video sequences periodically, e.g. every 5
min.
I assign a value to the RecordingBacktimedFramesCount
property, but when I
start recording to fill the buffer nothing happens.
First of all, be sure that:
- the "RecordingInNativeFormat" property is disabled,
- the frame grabber is enabled on both streams or on the capture stream (FrameGrabber = fg_BothStreams or
fg_CaptureStream).
E.g. if you assign RecordingBacktimedFramesCount = 30, and the video source frame rate is 30
fps, you will get about 1 sec video time shifting.
When you start recording directly by invoking StartRecording without enabling
HoldRecording, of course TVideoGrabber does not have any "back-timed" video frame to put in the recorded
stream, so it repeats the first video frame in the video clip until the 30 frames buffer is
filled, so you will see a "static image" during 1sec, then you will see the back-timed
video.
If you want to record the back-timed video immediately, you have to start the recording
"held" in preview mode, by enabling HoldRecording before invoking
StartRecording.
Then you can release the recording by invoking ResumeRecording, and by this way the back-timed video will start without having a static image at the beginning of the video clip.
How can I record 2 cameras synchronously?
Enable the Synchronized property before invoking StartRecording, e.g.:
VideoGrabber1.Synchronized := True;
VideoGrabber2.Synchronized := True;
VideoGrabber1.VideoDevice := 0; // e.g. index of the 1st camera in the VideoDevices list
VideoGrabber2.VideoDevice := 1; // e.g. index of the 2nd camera in the VideoDevices list
VideoGrabber1.StartRecording;
VideoGrabber2.StartRecording;
// then both recordings will start at the same time
end;
I get an error or a blak window if I start the recording from the IDE, but
not if I run the ".exe" out of the IDE
This problem is caused by a third-party filter that is protected against
debugging, detects the debugger and generate a "halt" or a
"break"
This explain why the problem does not occurs when running the application's
".exe" out of the debugger.
The workaround consists either to avoid testing the recording from the IDE,
either to uninstall the third-party filter that causes the problem. Feel free to
contact our support team at support@datastead.com
if you need help to identify the filter concerned.
I want to record an AVI file encoded in Windows Media 9 format, but the
Windows Media Video 9 codec does not appear in the VideoCompressors list.
You need to install the Windows Media Video 9 VCM (wmv9VCMsetup.exe)
that you can download from the Microsoft web site here.
WMV (ASF) RECORDING
The ASF recording fails to start
Install the Windows Media Encoder 9 Series
encoder pack.
MOTION DETECTION
How can I record only when motion is detected?
Before invoking StartRecording, enable these 3 properties:
- MotionDetector_Enabled
- RecordingOnMotion_Enabled
- RecordingCanPause
E.g.:
...
VideoGrabber.VideoDevice = 2; // e.g. index of your video device in the
VideoDevices list
videograbber.MotionDetector_Enabled = True;
VideoGrabber.RecordingOnMotion_Enabled = True;
VideoGrabber.RecordingCanPause = True;
VideoGrabberStartRecording;
FRAME CAPTURE
The frame capture
does not work when playing a MPEG2 clip or previewing a
MPEG2 stream.
The default MPEG2 codec currently available on your platform is
not compatible with the frame grabber.
You can try the InterVideo codec, that is shipped e.g. with the
WinDVD player.
If you use e.g. a Hauppauge PVR (hardware-encoded MPEG2) capture
device to record the video clips, be sure that the InterVideo MPEG2
decoder for Hauppauge is properly installed, then add the following code before
invoking VideoGrabber1.OpenPlayer:
VideoGrabber1.PlayerForcedCodec := 'InterVideo NonCSS Video Decoder for
Hauppauge';
This will force TVideoGrabber to use this MPEG2 codec instead of
the default one.
Important
-
this string is case sensitive.
- the InterVideo codec does not like AT ALL the debuggers. If you need to open a
MPEG2 clip, or to preview a MPEG2 stream, Be sure to run your app out of the
IDE, or disable temporarily the debugger, otherwise you will get a black video
window or some unpredictable results.
PLAYER
Does TVideoGrabber support Dolby 5.1 audio playback (AC3)?
Yes, you just need to install an AC3 decoder filter, e.g.: http://sourceforge.net/projects/ac3filter/
When the clip is paused, the overlays are not refreshed (e.g. the
mouse free hand drawing included in the demo does not refresh)
Enable the PlayerRefreshPausedDisplay property.
When the clip is playing, how can I know the total duration
and/or frame count of the
clip?
Create a OpenPlayerOpened event. When this event occurs, the clip has just been opened, so from this event you can read:
- the PlayerDuration property (that gives the time in 100ns units, 1 second = 10000000),
- the PlayerFrameCount property, that gives the total number of frames.
Is it possible to play Quicktime (*.mov) media clips?
Yes, you need to install first a Quicktime decoder codec, e.g.
like Quicktime Alternative.
In paused mode, the player frame positioning is not
accurate,
either by using the PlayerTrackbar, either by using SetPlayerFramePosition or
SetPlayerTimePosition.
Check that you are not using the VMR9 to display the video. The
VMR9 buffers 3 video frames and this is the usual source of this problem.
Use the VMR7 (same quality), or the standard renderer (VideoRenderer = vr_VMR7 or
vr_StandardRenderer).
I want to use only the player, how can I disable features related to the video and audio capture
devices?
From the Object Inspector, set VideoDevice = -1 and AudioDevice = -1.
How to connect a trackbar to TVideoGrabber?
I added a TTrackBar in the form, but it was not moving when playing a video.
1. put a TTrackbar component on the form where is located TVideoGrabber.
2. click on the TVideoGrabber component, and, from the Object Inspector, locate
the "PlayerTrackbar" property, browse it and select the TrackBar
component.
and now the trackbar will move automatically according to the current
position of the video clip.
When the player is paused and I step forward or backward by using the arrow
keys on the trackbar, sometimes frames are reported twice by
the OnFrameProgress event.
Set VideoRender = vr_VMR7.
I use my own trackbar control to control the player position. When I change
the PlayerFramePosition from the trackbar's event, the PlayerFramePosition value jumps back and forth from the current value to what the old value would have been. This causes the slider to jump back and forth.
if you update the trackbar position from the OnFrameProgress event, you must test the
"InFrameProgressEvent" state in your trackbar's "OnChange" event code to cancel updating the player position in this case.
If this test is not done, when the OnFrameProgress event occurs -> you set a new trackbar position -> the OnChange event occurs -> from this event you update the player position ->
an OnFrameProgress event occurs... an so on, this generates random loopbacks and the player trackbar looks jerky when the user moves it.
E.g.:
procedure TForm1.TrackBar1Change(Sender: TObject);
begin
if not VideoGrabber1.InFrameProgressEvent then begin
VideoGrabber1.PlayerFramePosition := TrackBar1.Position;
end;
end;
REENCODING
The reencoding of VOB files fails
It is probable that you do not have a MPEG2 codec on this platform, or that
the MPEG2 codec you have is not compatible with TVideoGrabber.
You can install e.g. one of the following codecs:
- the GPL MPEG1/2 decoder
- the Elecard MPEG Player that you can download here.
This will install the Elecard MPEG2 decoder, that is compatible with
TVideoGrabber.
If you still have problems anyway, contact the support.
CODECS
MPEG Layer-3 codec and concurrent recordings
The Microsoft's MPEG-3 codec (that appears in the AudioCompressors
list as "MPEG Layer-3") does not support concurrent recording.
E.g. you can't use 2 TVideoGrabber components that record with MP3 compression
in the same application.
If you need to do that, use the Elecard MP3 "Lame Audio
Encoder" instead.
You can download it here
(download the lame_dshow.zip package, "MPEG Layer III Audio Encoder")
Does TVideoGrabber include a MPEG-2
decoder?
TVideoGrabber does not include any codec. You must install separately a third-party MPEG2
decoder, e.g.
like the GPL MPEG1/2 decoder.
The following DVD
packs (recommended by Microsoft) include MPEG2 decoders.
Note:
if you have a video capture board, check if it shipped with a DVD player software
(e.g. WinDVD, PowerDVD, etc...).
By installing the DVD Player software, a licensed MPEG2 decoder will be
automatically installed.
Several of these DVD players are shipped with the InterVideo MPEG2 decoder. This
codec works well with TVideoGrabber but does not support running
from the IDE.
Explorer crashes when opening a DivX video
This is a conflict between the DivX and XVid codecs. The method to fix the
problem is described here.
*.VRO files fail to play
You need to install the PANASONIC DV codec. Search for "Panasonic VFW DV codec"
on Google.
MULTIPLE CAMERAS
I can't preview 2 DV cameras concurrently. Either only one camera
is previewing at the same time, either my test project crashes
First step, if you are using Windows XP SP2, apply the Microsoft
update fix KB885222
and make a new test.
If the problem remains, verify that the 2 DV cameras can run concurrently out of
TVideoGrabber. Proceed as follows:
- close any application that could keep the DV cameras in use,
- open Windows Explorer
- click on "My Computer"
- you should see your 2 DV cameras at the end of the list, double-click on the 1st DV camera to run its preview
- open and 2nd instance of Windows Explorer
- click on "My Computer"
- double-click on the 2nd DV camera to run its preview
- now by switching from an explorer window to the other, you should see both devices previewing
concurrently.
If this does not work, the origin of the problem is Windows XP SP2 that does not supports concurrent DV devices on the same IEEE1394 bus.
In this case, the workaround consists to install an additional IEEE1394 PCI card (cheap), and to connect the 2nd DV camera to this card.
If this still does not work, feel free to contact our support team at support@datastead.com
Does TVideoGrabber handle multiple cameras ? Can I perform network streaming with more than one
camera ?
Yes, you can, by the following ways:
1) ONE TVIDEOGRABBER COMPONENT BY VIDEO INPUT:
If you have a "true inputs" card (one input = one video chip), e.g. like the
IEI IVC200G, that has 4 inputs and 4
ouputs.
Simply put 4 TVideoGrabber components on the form, and assign each
"VideoDevice" property respectively to each input (0, 1, 2 and 3).
In this case you have to assign an unique network port to each
"ASFNetworkPort" property of the TVideoGrabber components, so you will have 4 network streaming URLs with 4 different network ports.
Of course you have to open each network port on the router or firewall, if any.
2) A SINGLE TVIDEOGRABBER component handles one card having 4
or 16 multiplexed inputs: the multiplexed inputs are switched periodically
and automatically by TVideoGrabber, that lets you display them in a "mosaic
layout" mode, in which TVideoGrabber shows the whole 4 or 16 inputs into the same larger video
window.
This mode is activated simply by setting the "MultiplexedRole" property to mr_MultiplexedMosaic4 or
mr_MultiplexedMosaic16.
In this case you can stream the 4 or the 16 inputs
simultaneously in a single video window and a single network stream (in this
case you need only one network port for 4 or 16 channels).
3) A master TVIDEOGRABBER component handles one card having 4
or 16 multiplexed inputs, and each input is distributed to one TVideoGrabber
slave component.
This is the master/slave mode, where a "master" TVideoGrabber component distributes each of the 4 or 16 inputs to 4 or 16 TVideoGrabber
"slaves" components. Each slave component can be used as a normal
TVideoGrabber component, that receives the video frames from one of the inputs
of the master component.
This mode is described in the user guide, and you can find 2 Delphi demo projects in the
"MultiplexedInputs" folder included in the package.
I have a standard 4 inputs card, I need some
sample code to get 2 inputs previewing in 2 separated
TVideoGrabber components.
You need to work in "master/slave" mode: one master
TVideoGrabber component distributes the inputs to up to 4 TVideoGrabber slaves
components.
E.g.:
procedure TForm1.Button1Click(Sender: TObject);
begin
VideoGrabber1 := TVideoGrabber.Create (Self);
VideoGrabber2 := TVideoGrabber.Create (Self);
VideoGrabber3 := TVideoGrabber.Create (Self);
// select the video device index in the VideoDevices list
VideoGrabber1.VideoDevice := 0;
//
VideoGrabber1 will be the "master" component
VideoGrabber1.MultiplexedRole := mr_MultiplexedMaster;
// VideoGrabber2 will be the 1st "slave" component
VideoGrabber2.MultiplexedRole :=
mr_MultiplexedSlave;
// VideoGrabber3 will be the 2nd "slave" component
VideoGrabber3.MultiplexedRole :=
mr_MultiplexedSlave;
// VideoGrabber2 will receive the input #2
from VideoGrabber1
VideoGrabber1.AssociateMultiplexedSlave (2, VideoGrabber2.UniqueID);
// VideoGrabber2
will receive the input #3 from VideoGrabber1
VideoGrabber1.AssociateMultiplexedSlave (3, VideoGrabber3.UniqueID);
VideoGrabber1.Parent := Form1;
VideoGrabber2.Parent := Form1;
VideoGrabber3.Parent := Form1;
VideoGrabber1.Left := 10;
VideoGrabber2.Left := 10;
VideoGrabber3.Left := 10;
VideoGrabber1.Top := 10;
VideoGrabber2.Top := 300;
VideoGrabber3.Top := 600;
VideoGrabber1.StartPreview;
end;
If you need e.g. 4 video inputs add a VideoGrabber4 and a
VideoGrabber5 component, and put them the same code than the VideoGrabber2 and
VideoGrabber3 have (select the desired inputs when invoking AssociateMultiplexedSlave).
If you need more explanations feel free to contact
our support team.
When using a video card with 4 multiplexed inputs, the video is jumping
in multiplexed mode (master/slave or mosaïc)
Set the frame rate to 6 (fps).
NETWORK STREAMING
Do you have examples of video and audio streaming?
SAMPLE CODE (server side)
Streaming a live video source (video only):
VideoGrabber1.VideoDevice := 0;
VideoGrabber1.NetworkStreaming := ns_ASFDirectNetworkStreaming;
VideoGrabber1.NetworkStreamingType := nst_VideoStreaming;
VideoGrabber1.ASFNetworkPort := 10500;
VideoGrabber1.StartPreview;
Streaming a live video source (audio + video):
VideoGrabber1.VideoDevice := 0;
VideoGrabber1.AudioDevice := 0;
VideoGrabber1.NetworkStreaming := ns_ASFDirectNetworkStreaming;
VideoGrabber1.NetworkStreamingType := nst_AudioVideoStreaming;
VideoGrabber1.ASFNetworkPort := 10500;
VideoGrabber1.StartPreview;
Streaming a video clip:
VideoGrabber1.VideoSource := vs_VideoFileOrURL;
VideoGrabber1.VideoSource_FileOrUrl := " replace by the file path to your video clip"
VideoGrabber1.NetworkStreaming := ns_ASFDirectNetworkStreaming;
VideoGrabber1.NetworkStreamingType := nst_AudioVideoStreaming;
VideoGrabber1.ASFNetworkPort := 10500;
VideoGrabber1.StartPreview;
SAMPLE CODE (client side)
Note: to view the streaming on the client, you need to open the server URL, that is built as
follows:
mms:// IP : port
E.g. if the server IP is 192.168.0.123 and the streaming port is 10500 the URL will be
mms://192.168.0.123:10500
To know the IP address of the server:
- either run IPConfig on the server to show it,
- either use the OnDirectNetworkStreamingHostUrl event (on the
server) that returns directly the URL to open in the client when starting the preview or recording
(HostUrl parameter).
VideoGrabber1.VideoSource :=
vs_VideoFileOrURL;
VideoGrabber1.VideoSource_FileOrUrl := 'mms://192.168.0.123:10500';
VideoGrabber1.StartPreview;
The network streaming fails to start on a Windows 2000 platform
Install the Windows Media Encoder 9 Series
encoder pack.
Could you explain me how to setup my computer that is running
TVideoGrabber and watch the live video stream by using another computer over
the network ?
This example explains how to stream a webcam to the network.
Let's call the computer that sends the video stream the "master", and the computer that watches the live video over the network the "client".
First of all, on the "master" side you need a free IP port of your choise
(let's say for this example 8805), and
to be sure that this port is opened on the firewall settings of the XP control panel, and on the firewall of your router or DSL modem, if
any. See the (*) comment below.
1) Make a quick test by running MainDemo.exe included in the package. Proceed as
follows:
a) on the "master" computer:
- run MainDemo.Exe
- go to the "network streaming" tab
- in the "network streaming" groupbox, click on "direct network streaming"
- in the "direct ASF network streaming:" groupbox, enter 8805 in the "Port" edit
field"
- go to the "video source" tab, and click "Start preview"
- in the memo field on the left, write down the "streaming url:" that
appears, e.g. mms://64.21.142.209:8805. See the (*) comment below.
b) on the "client" computer:
You can use either TVideoGrabber or directly the Windows Media Player to view the live network
stream.
With the Windows Media Player, click "file | Open URL", and enter the streaming URL of the
"master" computer, e.g. mms://64.21.142.209:8805
With TVideoGrabber:
- run MainDemo.exe,
- select "video file or URL" as video source,
- in the "video source = file or url" edit field, enter the streaming URL of the
"master" computer, e.g. mms://64.21.142.209:8805
2) The TVideoGrabber properties and functions programming is:
a) on the "master" computer:
- set the NetworkStreaming property of TVideoGrabber to ns_ASFDirectNetworkStreaming
- set the ASFNetworkPort property to 8805,
- invoke StartPreview to start previewing the live video, this will also start sending the video to the network
- the streaming URL to use on the "client" computer is returned by the DirectNetworkStreamingHostUrl event (host URL
parameter) when the network streaming starts, e.g. mms://64.21.142.209:8805
b) on the "client" computer (if you use TVideoGrabber to view the live network
streaming),
- set VideoSource = vs_VideoFileOrURL,
- set VideoSource_FileOrUrl = e.g. mms://64.21.142.209:8805,
- invoke StartPreview
(*) if the IP address of the "master" computer that runs
TVideoGrabber is a non-routable local IP address (e.g. that begins by 192.... or by 10...), you must setup a port forwarding
(of the local IP address of your computer) for the 8805 port on the NAT of your router or DSL modem.
In this case the real IP address to use by the "client" over the internet will be the current IP address of your router or DSL modem on the port
8805, e.g. if your router or DSL modem IP is 64.21.142.209, the client URL to open will be
mms://64.21.142.209:8805.
How can I get live network streaming WITH AUDIO
in preview mode?
Enable the AudioDeviceRendering property before invoking StartPreview, otherwise the audio section is not binded to the graph.
When I enable the live network streaming under Windows 98 or
Windows ME preview and/or recording fails.
The problem will be fixed by installing the Windows Media Format 9 Series SDK that can be downloaded
from:
https://wmlicense.smdisp.net/ei0u439/91ac29746/download.asp
My computer has a non-routable local IP address (192.168.0.122)
behind a router/firewall, and my ISP assigns me a dynamic IP address that changes
every day. How can my clients connect from the Internet to the one of my
computers that is streaming TVideoGrabber?
First of all, you need to choose a free TCP port for each TVideoGrabber component running at the same time.
Choose a port number you want to open. Any free port number can be used, to
avoid conflicts choose it above 6000 (and
below 65535). E.g. let's choose for this example 8800.
Assign this value to the ASFNetworkPort property of the TVideoGrabber
component.
Then create on your router/firewall a NAT routing on this port e.g. for the TCP port 8800 to the local address of
your computer running TVideoGrabber (e.g. 192.168.0.122 in this example).
As your IP address changes every day, you need to use a dynamically DNS name, e.g.
from http://www.dyndns.org. Ccreate a Dynamic DNS
account, and you will get a dynamic domain name, e.g. mydomainname.ath.cx.
This dynamic DNS must be refreshed periodically to your current IP address, and for that you have to install an update client that will refresh
periodically your IP address at dyndns.org, look at http://www.dyndns.org/services/dns/dyndns/ ->
"Update Clients", you will find several recommended client softwares.
Then give to your clients on the internet the dynamic dns address on the corresponding port,
e.g.:
mms://mydomainname.ath.cx:8800
Now, how does it work?
Let's say that today your IP adress assigned by your ISP is 64.88.121.102, and let's say this address has been updated by your update client at
www.dyndns.org.
- your clients will connect to mms://mydomainname.ath.cx:8800
- the client's computer will get automatically the IP address from dyndns.org, so it will connect to
mms://64.88.121.102:8800
- finally your router/firewall will receive the connection and send it to the
corresponding local ip address at mms://192.168.0.122:8800.
MOTION DETECTION
How can record to AVI only when motion
occurs?
Use the set of "RecordingOnMotion_..." properties.
E.g.:
...
// activate the motion detection
VideoGrabber1->MotionDetector_Enabled = true;
// activate the recording only when motion occurs
VideoGrabber1->RecordingOnMotion_Enabled = true;
// pause recording each time motion detection stops for 2 seconds
VideoGrabber1->RecordingOnMotion_NoMotionPauseDelayMs = 2000;
// minimal motion sensitivity that activates the recording
VideoGrabber1->RecordingOnMotion_MotionThreshold = 0.001;
VideoGrabber1->StartRecording();
...
AUDIO
The AudioInputLevel property has no effect on the speaker volume
a) if your video capture device is a DV device, it is normal. Use the general
AudioVolume property to control the audio output level.
b) if the audio out (e.g. of your TV card) is connected to the line-in or microphone input, the audio goes through the general mixer, independently of
TVideoGrabber, and this explains why the AudioMute and AudioInputLevel properties of TVideoGrabber don't seem to act on the audio input
level, although they do. Proceed as follow:
1. open the control panel, go to the volume audio control ("advanced"
button), and disable the corresponding input in the audio control panel,
2. in TVideoGrabber, for the AudioInputLevel property to work, be sure to disable the
"AudioMute" property, and to select an input (e.g. line or microphone), and not the mixer.
No audio rendering or recording with ATI cards
Upgrade to the latest version of the ATI driver.
GENERAL
How can I capture 2 cameras synchroneously?
- put 2 TVideoGrabber components on a form
- assign the VideoDevice of each component respectively to the index of each
camera in the VideoDevices list
- enable the "Synchronized" property on each component.
- then invoke StartPreview or StartRecording.
E.g.:
procedure TForm1.Button1Click(Sender:
TObject);
begin
VideoGrabber1.Synchronized := true;
VideoGrabber2.Synchronized := true;
VideoGrabber1.StartPreview;
VideoGrabber2.StartPreview;
end;
Preview, recording or playback fail to start
First of all, try the Codecs and
debugging solution.
Such problems have been reported after installing third-party
codecs, and they have been fixed by reinstalling the latest version of the DirectX
runtime. You can download it
here.
If the problem remains after, feel free to contact us at support@datastead.com.
Error when opening mpeg clips. Nothing is displayed.
1. the codec required by your
clip is probably not installed on your platform. To check that, try to open the clip with
the Windows Media Player.
- if the media player reports an error, try to find and install the required
codec.
- if the media player downloads and install automatically the codec, and then,
plays the clip, try again to open the clip with TVideoGrabber.
2. errors when opening clips are often caused by bugs in third-party codecs.
Try to open the clip in the Windows Media Player. If the clip don't work in the
WMP as well, and you have an additional codec installed, remove it and try again.
INTERACTIONS WITH THIRD-PARTY APPLICATIONS
When TVideoGrabber is displaying the
video, I can't start my application, that reports an error saying the
hardware display is not available
The problem occurs because the overlay mixer (that uses hardware acceleration)
is used by TVideoGrabber (when VideoRenderer = vr_Default or vr_OverlayRenderer).
So it can't be used by another app when the TVideoGrabber is displaying the
video.
To let the overlay mixer available for other applications while TVideoGrabber, set VideoRenderer with
another value, e.g. vr_VMR7, vr_VM9 or vr_StandardRenderer.
INSTALL
Invoking regsvr32.exe on Vista returns "DLLRegisterServer failed with error code 0x80004005"
On Vista platforms, regsvr32.exe must be ran as Administrator to be able to register the OCX on the
platform.
Therefore the user that installs the TVideoGrabber OCX must have the administrator
rights.
- if you invoke regsvr32.exe directly from your install program, right-click on your install program and click "run as
Administrator".
- if you run directly Register.cmd or Unregister.cmd, right-click on the
.cmd file and click "run as Administrator".
Visual C# .NET
How can I use TVideoGrabber with Visual C# .NET?
First of all, be sure that the Vidgrab_NET.OCX control is registered:
- unzip the TVideoGrabber package in a folder of your choice,
- copy vidgrab_NET.OCX in a folder of your choice
- register vidgrab_NET.OCX by invoking regsvr32, e.g. "regsvr32 c:\vidgrab\vidgrab_NET.ocx'
- run Visual Studio .NET
- click on File | New | Project
- select the "Visual C#" folder, and click on "Windows Application"
- right-click on the ToolBox, click "Add/Remove items"
- select the "COM Components" tab
- browse the list, and near the end check the "VideoGrabberNET control" component, click "OK"
- now the TVideoGrabber component appears in the ToolBox, select it and place it on the form
(wait a few seconds before the control appears)
- select the "Windows Form" toolbox, select a button and place it on the
form,
- double click on the button, and put this code in the button1_click event: "axVideoGrabberX1.StartPreview();"
- now start the project, click on the button and you should get the preview running.
How can I create a user control including TVideoGrabber with Visual C# .NET?
First of all, be sure that the OCX control is registered: unzip the TVideoGrabber package in a folder of your
choice, then click on regVGX.cmd in the ActiveX subfolder.
1. create the user control
- run Visual Studio .NET
- click on File | New | Project
- select the "Visual C#" folder, and click on "Windows Control Library" (let's assume it will be named "WindowsControlLibrary1")
- right-click on the ToolBox, click "Add/Remove items"
- select the "COM Components" tab
- browse the list, and near the end check the "VideoGrabberX Control" component, click "OK"
- now the TVideoGrabber component appears in the ToolBox, select it and place it on the user contol
(it can take a few seconds before the control appears)
- select the "Windows Form" toolbox, select a button and place it on the user control,
- double click on the button, and put this code in the button1_click event: "axVideoGrabberX1.StartPreview();"
- now save the project, build the solution, then close the solution.
2. create a project including the user control
- click on File | New | Project
- select the "Visual C#" folder, and click on "Windows Application" (let's assume it will be named "WindowsApplication1")
- in the solution explorer, right-click on "References" and click on
"Add Reference"
- open the "WindowsControlLibrary1\Bin\Debug" folder, select "WindowsControlLibrary1.dll", then click "OK"
- right-click on the ToolBox, click "Add/Remove items"
- select the ".NET Framework Components" tab
- click on the "browse" button, and open the
"WindowsControlLibrary1\Bin\Debug" folder, then select "WindowsControlLibrary1.dll", the "UserControl1" control should appear and be checked in the list
- click "OK", and now "UserControl1" should appear in the ToolBox in the "My User
Controls" list
- click on "UserControl1" and put it on the form
- save the project
- start the project, click on the button and you should get the preview running.
How can I assign a new font to the TextOverlay_Font
property?
Use the ToHfont().ToInt32(), function of the Font object.
E.g.:
Font NewFont = new Font("Courier New", 14);
axVideoGrabberNET1.TextOverlay_Font = NewFont.ToHfont().ToInt32();
axVideoGrabberNET1.TextOverlay_Enabled = true;
axVideoGrabberNET1.StartPreview();
I get the "Error 1 Cannot implicitly convert type
'int' to ..." message when assigning an int value to a TVideoGrabber
property.
Use Convert.ToInt32. E.g.:
int MyVideoDeviceIndex;
MyVideoDeviceIndex = 1;
axVideoGrabberNET1.VideoDevice = Convert.ToInt32 (MyVideoDeviceIndex);
How can I retrieve the RGB values of a pixel on the current video frame?
Start from the following sample code in the OnFrameOverlayUsingDC event (e.g.
to get the pixel at the 10, 15 position):
private void axVideoGrabberNET1_OnFrameOverlayUsingDC(object sender, Axvidgrab_NET.IVideoGrabberNETEvents_OnFrameOverlayUsingDCEvent e)
{
Color RGBColor = System.Drawing.Color.FromArgb (axVideoGrabberNET1.GetRGBPixelAt(10,
15));
textBoxR.Text = RGBColor.R.ToString();
textBoxG.Text = RGBColor.G.ToString();
textBoxB.Text = RGBColor.B.ToString();
}
VISUAL C++ 6
I get an error when building or running my VC++ project after upgrading the
vidgrab_VC6.ocx library
To upgrade a VC++ project from an earlier version, proceed as follows:
- exit VC++
- unregister the old ocx (e.g. "regsvr32 /u c:\vidgrab\vidgrab_vc6.ocx")
- overwrite the old vidgrab_vc6.ocx with the new vidgrab_vc6.ocx file
- register the new vidgrab_vc6.ocx (e.g."regsvr32 c:\vidgrab\vidgrab_vc6.ocx")
- in your VC++ project's folder, overwrite the videograbbervc6.cpp and videograbbervc6.h by the new ones included in the "VC6\Interfaces" folder of the new package
- run VC++, open the project
- open the form on which is located the TVideoGrabber component
- select the TVideoGrabber component
- cut the TVideoGrabber component (Ctrl + X)
- paste the TVideoGrabber component (Ctrl + V)
- save and full rebuild the vc++ project.
I do not find in the OCX several properties and functions that are
listed in
the user guide
Some properties does not appear when browsing the component because they are
not "published" (their values are not stored).
However they can be assigned or read programmatically without problem.
VISUAL BASIC 6
I can't open the Visual Basic MainDemo project because the FM20.OCX
(FM20.DLL) controls are not installed
This library is NOT REDISTRIBUABLE, however it is shipped with the Microsoft ActiveX Control
Pad, that you can freely download and install.
The Control Pad install package (SETUPPAD.EXE) must be downloaded from:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaxctrl/html/cpad.asp
I invoke TVideoGrabber between a main form and child forms, and I get an
error when exiting or closing a child form
Proceed as follows:
- in your main form, create a public boolean:
Public CanUnload As Boolean
- in the FormLoad, set it to false:
Private Sub Form_Load()
CanUnload = False
...
end Sub
then create a FormUnload event in the main form that set it to true when the
main form is destroyed:
Private Sub Form_Unload(Cancel As Integer)
CanUnload = True
...
End Sub
then for each of the child forms, create a Form_Unload event as follows:
Private Sub Form_Unload(Cancel As Integer)
If Not MainForm.CanUnload Then
Hide
Cancel = True
End If
End Sub
This prevents destroying the child form if the main form is not being destroyed.
DELPHI AND C++BUILDER
I installed the trial version of
C++Builder. I installed the
component without problem, placed it on a form, but when I run my project I get
an error.
The origin of this problem is the "use dynamic RTL" option that is enabled by
default. Proceed as follows:
- go to Project | Options | Linker (ilink32) | Linking, and uncheck "use dynamic RTL"
How can I choose between creating a project's ".exe"
that contains the full TVideoGrabber library, or a small project's ".exe"
than links to the TVideoGrabber library?
a) to create a project's ".exe" that contains the full TVideoGrabber
library,
- go to Project | Options | Packages, uncheck "Build with runtime packages"
- rebuild your project
b) to create a small project's ".exe that links to the TVideoGrabber
library:
- go to Project | Options | Packages, check "Build with runtime packages".
- rebuild your project
- then you will have to copy the TVidGrab.bpl file in the folder where is located your Project's ".exe" file,
or in the Windows\System32 folder.
I get an error "the procedure entry point ...
procedure$qri ... could not be located in library Vcl40.bpl" error when I try to install TVideoGrabber on the component palette.
TVideoGrabber has been compiled with the latest update packs applied on Delphi and
C++Builder, and the latest Borland update packs have not been applied on your Delphi or
C++Builder
compiler.
This problem has been reported mainly with Delphi 4, on which you need to apply
"d4upd2.exe" on the "CD" install.
visit the following pages at Borland to download and apply the latest update packs:
Delphi : http://info.borland.com/devsupport/delphi/downloads/index.html
C++Builder : http://info.borland.com/devsupport/bcppbuilder/
I installed the component as explained in the readme.txt. When I
compile my project I get a Fatal Error " Cant't find TVidgrab.lib
or TVidgrab.bpi" message.
This is a Delphi or C++Builder common "search path" problem. According to
your Delphi or C++Builder version, check the following points:
- go to Tools | Environment Options | Library, and check that you have
;$(DELPHI)\Imports (for Delphi) or ;$(BCB)\Imports
(for C++Builder) in the Library path, otherwise add it at the end of the
edit field;
- go to Project | Options | Packages, check "Build with runtime
package", go to the end of the packages list, remove
";TVidGrab", and then uncheck "Build with runtime
package".
If the problem remains contact us at support@datastead.com.
How must I configure C++Builder to make an .exe that does not require TVidGrab.bpl
at runtime?
- go to Project | Options | Packages, check "Build with runtime package", go to the end of the packages
list, remove ";TVidGrab", and then uncheck "Build with runtime package".
- go to Project | Options | Linker, uncheck "use dynamic RTL".
- rebuild the project.
I loaded up the demo for
TVideoGrabber in Delphi 6 Trial or Delphi 7 Trial and
tried to build it.
I am getting and error at address nnnnnnn in
module dccn0.dll read of address nnnnnnnn.
The trial version
comes with a different DCU format than the real one. TVideoGrabber or other third-party components
can't be used in the trial.
Exception error CPU window occurs when running the project from the IDE, but
not out of the IDE:
If you see "breakpoint" labels in the CPU window, this problem is
commonly caused by debug statements left in of some codecs (like
Voxware audio codecs) that stops the program by sending unwanted "int
3" breakpoints to the Delphi or C++Builder debugger. This problem occurs when
TVideoGrabber enumerates the codecs.
This has absolutely no consequences on the application, but is annoying debug the project from the IDE.
To avoid this problem, an option has been added to disable the codecs
enumeration when running the project from the IDE. To use this option, add an
initialization section at the bottom of your TVideoGrabber's form as following:
...
initialization
CodecsDisabledFromIDE := true;
finalization
end.
However, the codecs can't be used by TVideoGrabber
if this option is
enabled and Delphi or C++Builder is running. If you need to test your project with compression
filters, disable this
option and press "F9" at run time as many times as necessary, then
enable the option again when you have finished testing the codecs.
VIDEO CAPTURE DEVICES
Hauppauge PVR: problems with video and/or audio rendering during preview,
recording or playback
Verify that the Hauppauge Video Decoder 5 codecs are installed.
They can be downloaded from the Hauppauge support page here.
I am calling the VideoDevices list from the OnDeviceArrivalOrRemoval
event. When
I turn a video device on, the VideoDevices list is updated, but when I turn it
off it is not removed from the list.
This is normal, in order to prevent the complexity of having to manage the shifted indexes of the video captures whose indexes are above the index of the device currently removed (because VideoDevice selects the current video device in the
VideoDevices list).
When TVideoGrabber is running, the rules are the following:
1. when a device is turned on, the device is added at the bottom of the
VideoDevices list. The OnDeviceArrivalOrRemoval event occurs. Its IsDeviceArrival
parameter reports "true", and its DeviceIndex parameter reports the
index of the video device added in the list.
2. when a device is turned off, the device remains in the VideoDevices list.
The OnDeviceArrivalOrRemoval event occurs. Its IsDeviceArrival parameter reports
"false", and its DeviceIndex parameter reports the index of the video
device turned off.
3. if a device turned off (case 2 above) is turned on again, the VideoDevices
list does not change. The OnDeviceArrivalOrRemoval event occurs. Its IsDeviceArrival
parameter reports "true", and its DeviceIndex parameter reports the
index the video device had when it was turned off.
You can retrieve current the state of any video capture devices (connected or
not) by testing IsVideoDeviceConnected (DeviceIndex).
E.g. IsVideoDeviceConnected (3) will return
"true" if the device having the index 3 in the VideoDevices list is active and "false" if the device
has been turned off.
How to use TVideoGrabber with 4 cameras?
This depends on the video capture devices you plan to use.
1) you can use a PCI card with 4 inputs/ouputs, (4 TVideoGrabber components will
be used separately), e.g. like the IEI IVC200:
http://www.ieiworld.com/en/product_IPC.asp?model=IVC-200G
2) you can use several webcams (one webcam per TVideoGrabber component, this is
equivalent to the 1) solution above
3) you can use one PCI card with 4 inputs and one multiplexed output, e.g. like the
IEI IVC 100,
or the PICO 2000 DRV card
used with this generic driver.
For the 1) and 2) solutions, use several TVideoGrabber components as sources. You can record each component
separately, or you can mix the TVideoGrabber source components in a destination TVideoGrabber component as shown in
the "MixedVideoSources" demo project included in the package.
For the 3) solution:
- you can use a 4 inputs layout (you can test that by running MainDemo.exe, in the
"video sources tab", check "enable 4 inputs
layout")
- you can use the master/slaves method (one TVideoGrabber component as master, that distributes the 4 inputs to 4 TVideoGrabber slaves components. This solution is shown in the
"Multiplexed Inputs" demo projects included in the evaluation package.
Black video window with a Sony HDR-FX1
Search the menu of the camcorder for the I-link (firewire) mode, and
turn it on.
Logitech webcams: how can I disable the face
tracking feature?
1. update to the latest version of the Logitech driver that you can download
from:
2. invoke SetCameraControl (cc_tilt, false, false, 0) before invoking
StartPreview
Note: to re-enable the face tracking invoke SetCameraControl (cc_tilt, true,
false, 0).
Avermedia EZMaker USB 2.0: can't set the analog video standard and video
input
Unfortunately the driver of this device does not expose
the required interfaces.
Provideo PV326C / PV326CH
You need to install the V1.3.30425
SDK.
After installing the driver, be sure to run the "setup.exe" located in
the "Filter" folder of the SDK.
Hauppauge WinTV USB: no AVI audio
capture
The driver is not the same if you capture the WinTV audio directly through
USB or if you use an audio cable to connect the WinTV USB audio out to your
audio card input.
Upgrade to the right version of the Hauppauge WinTV USB driver here.
NVIDIA Video Capture driver: incorrect video windows
This is a bug of the driver. Go to the NVidia support drivers page and upgrade to the NVidia driver v41.07 or
higher.
Pinnacle systems MovieBox USB or MovieBox Deluxe USB
Use only the following video sizes:
352x288 in PAL
352x240 in NTSC
IDS Falcon: not all the video capture device features are
available programmatically.
Use this generic
WDM driver instead of the driver shipped with the card.
Typhoon WebShot USB 300K: black frame
capture or jerkey display
Enable the FixFlickerOrBlackCapture property.
SAMPLE CAPTURE
Is it possible to access the compressed video data buffer from
TVideoGrabber?
Yes, the video samples are returned by the OnRawVideoSample event.
In this event the data frame buffer is returned by the pSampleBuffer
pointer.
Note: the RawSampleCaptureLocation must be set to rl_AfterCompression before
invoking StartRecording.
|