My First Convert (Visual Basic)
The ltmmConvertCtrl object allows the user to recompress multimedia files or convert from one multimedia format to another. Using the following steps:
1. |
Start Visual Basic. |
|
2. |
Add the LEAD Multimedia controls to your project. On the Project pull-down menu, use the Components option, and select the LEAD Multimedia Library (14). |
|
3. |
Select the ltmmConvertCtrl Control, and add it to your form. |
|
4. |
Add a button to your control, and name it as follows: |
|
|
Name |
Caption |
|
btnStartConvert |
Start Convert |
5. |
Handle the Form’s Load event, and code Form_Load sub as follows: |
Private Sub Form_Load()
'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 Sub
6. |
Handle the btnStartConvert Click event, and code btnStartConvert_Click procedure as follows: |
Private Sub btnStartConvert_Click()
'start the conversion
ltmmConvertCtrl1.StartConvert
MsgBox ("Converting is done…")
End Sub
7. |
Run your program to test it. |