Write a simple video processing application with VideoLab using Delphi or C++ Builder


 

This is a step by step tutorial for writing a simple video processing application in Delphi or C++ Builder VCL by using VideoLab.

The steps are exactly identical in Delphi or C++ Builder versions 5 to 2007.

There is no code writing necessary to complete this application.

There is no need to know Delphi or C++ Builder in order to create this application.


 

The steps bellow are captured using Delphi 2007, however they are identical in C++ Builder and older versions of the products.

ProcessVideo

The tutorial covers the following steps, which should take less than two minutes:

1. Add an TVLAVIPlayer Component to Your Application's Form:

1.1. From the VideoLab tab of the component palette drop a VLAVIPlayer TVLAVIPlayer component.

2. Add a TVLFixedFilter Component to Your Application's Form:

2.1. From the VideoLab tab of the component palette drop a VLFixedFilter TVLFixedFilter component.

3. Add an TVLAVILogger Component to Your Application's Form:

3.1. From the VideoLab tab of the component palette drop a VLAVILogger TVLAVILogger component.

4. Add 2 TVLImageDisplay Controls to Your Application's Form:

4.1 From the VideoLab tab add 2 VLImageDisplay TVLImageDisplay controls to the form.

4.2 Arrange your form to look like this:

VCLSimpleVideoProcessingFim1

5. Select file to play in the VLAVIPlayer1 Component:

5.1. Double-click on the VLAVIPlayer1 component on the form:

SimpleProcessForm1VLAVIPlayer1

5.2. Select a file to play, and click “Open”:

VideoFileOpenDialog

6. Connect the VLAVIPlayer1.OutputPin to VLImageDisplay1.InputPin and VLFixedFilter1.InputPin:

6.1. In the VLAVIPlayer1 Properties select OutputPin and click on the DottedButton button:

AVIPlayerPropertiesOutputPin

6.2. In the connection editor check the InputPin of the VLFixedFilet1 and InputPin of the VLImageDisplay1, then click OK:

SimpleVideoProcessingVLAVIPlayer1OutputPinEdit

7. Select filter type for the VLFixedFilter1:

7.1. Double-click on the VLFixedFilter1 component on the form:

SimpleProcessForm1VLFixedFilter1

7.2. In the filter editor specify ftLaplace as filter type and fms5x5 as MaskSize:

FixedFilterLaplace

8. Connect the VLFixedFilter1.OutputPin to VLImageDisplay2.InputPin and VLAVILogger1.InputPin:

8.1. In the VLFixedFilter1 Properties select OutputPin and click on the DottedButton button:

SimpleVideoProcessingFixedFilter1PropertiesOutputPin

8.2. In the connection editor check the InputPin of the VLAVILogger1 and InputPin of the VLImageDisplay2, then click OK:

SimpleVideoProcessingVLFixedFilter1OutputPinEdit

9. Select file to record in the VLAVILogger1 Component:

9.1. Double-click on the VLAVILogger1 component on the form:

SimpleProcessForm1VLAVILogger1

9.2. In the VLAVILogger1 Properties select the FileName property and enter the path and the name of the file where you want to record the processed video:

SimpleVideoProcessingVLAVILogger1PropertiesFileName

10. Run the Application:

10.1 Press (F9) to run the application. You should see the video being processed:

SimpleVideoProcessRunning

Here is a diagram of the OpenWire connections in this application:

SimpleVideoProcessDiagram