Split a Large AVI Into Smaller Files (Visual FoxPro 6.0)

The following steps will split a large AVI into 2 smaller files.

1.

Start Visual FoxPro 6.

2.

If you didn’t install LEAD Multi-Media controls before, install them.

On the Tools pull-down menu, choose Options… and go to the Controls tab. Click the ActiveX controls radio button. Mark the ltmmConvertCtrl Class and click the Set As Default button, then click OK.

3.

Create a new blank form. On the Form controls toolbar, press the View Classes button and select ActiveX controls. Add the ltmmConvertCtrl to your form and change its name to ltmmConvertCtrl1.

4.

Add 2 button controls to your form, and name them as follows:

 

Name

Caption

 

btnConvert1

Convert First Half

 

btnConvert2

Convert Second Half

5.

Code the Form Init procedure as follows:

&& Set The Source File. 
ThisForm.ltmmConvertCtrl1.SourceFile = "c:\source.avi"

6.

Code the btnConvert1 Click procedure as follows.

&& Set the Target or Output file.
ThisForm.ltmmConvertCtrl1.TargetFile = "c:\Avi1.avi"
&& Set the end position of the first part.
ThisForm.ltmmConvertCtrl1.SelectionEnd = ThisForm.ltmmConvertCtrl1.Duration / 2
&& Convert it Now.
ThisForm.ltmmConvertCtrl1.StartConvert

7.

Code the btnConvert2 Click procedure as follows.

&& Set the Target or Output file. 
ThisForm.ltmmConvertCtrl1.TargetFile = "c:\Avi2.avi"
&& Set the Start position of the second part. 
ThisForm.ltmmConvertCtrl1.SelectionStart = ThisForm.ltmmConvertCtrl1.Duration / 2
&& Set the End position of the second part. 
ThisForm.ltmmConvertCtrl1.SelectionEnd = ThisForm.ltmmConvertCtrl1.Duration
&& Convert it Now. 
ThisForm.ltmmConvertCtrl1.StartConvert

8.

Run your program to test it.