My First Convert (Delphi 6.0)

The ltmmConvertCtrl object allows the user to recompress multimedia files or convert from one multimedia format to another. Using the following steps:

1.

Start Delphi 6.

2.

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

On the Component pull-down menu, use the Import ActiveX Control… and select the LEAD Multi-Media Library (14), and Press install, and then compile and install the package dclusr.dpk.

3.

From the ActiveX controls tab; add the ltmmConvertCtrl to your form.

4.

Add button to your control, and name it as follows:

 

Name

Caption

 

btnStartConvert

Start Convert

5.

Handle the Form1 OnCreate event, and code FormCreate procedure as follows:

procedure TForm1.FormCreate(Sender: TObject); 
begin
   //Define the input file. 
 ltmmConvertCtrl1.SourceFile:= 'c:\source.avi'; 
   //Define the target or output file. 
   ltmmConvertCtrl1.TargetFile:= 'c:\Target.avi'; 
   //select the LEAD compressor
   ltmmConvertCtrl1.VideoCompressors.Selection:= ltmmConvertCtrl1.VideoCompressors.Find('@device:sw:{33D9A760-90C8-11D0-BD43-00A0C911CE86}\LEAD MCMP/MJPEG Codec A COmpressor Also known as an encoder, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder. combined with a DECompressor, or encoder Also known as compressor, this is a module or algorithm to compress data. Playing that data back requires a decompressor, or decoder. and a decoder Also known as a decompressor, this is a module or algorithm to decompress data., which allows you to both compress and decompress that same data. (2.0)'); 
end; 

6.

Handle the btnStartConvert OnClick event, and code btnStartConvertClick procedure as follows:

procedure TForm1.btnStartConvertClick(Sender: TObject); 
begin
 //start the conversion
 ltmmConvertCtrl1.StartConvert ( ); 
 ShowMessage ( 'Converting is done…' ); 
end;

7.

Run your program to test it.