VideoEdit Gold ActiveX Control

AddVideo Method

Description

Add the video/image to timeline. This method support video/image format include: MOV, MP4, 3GP, DIVX, AVI, WMV, MPEG1,Dat, MPEG2, VOB, FLV, F4V, AVCHD, bmp, jpg, gif, tga.

Syntax

Public Function AddVideo ( _
   ByVal strFile as string, _
   ByVal iVideoStart as double, _
   ByVal iVideoStop as double, _
   ByVal iStretchMode as integer
) As Boolean

 

Parameter

strFile
    the file path of video file

iVideoStart
    the start time of video time you want extract

iVideoStop
    the end time of video time you want extract

iStretchMode
    the stretch mode

Mode

Description

0

The image is stretched to fit the target frame size in both dimensions, without preserving the aspect ratio.
 

1

The image is not resized. If the image is smaller than the target frame, the surrounding area is black. If the image is larger than the target frame, the image is cropped.
 

2

The image is resized to fit the target frame along one dimension, while preserving the aspect ratio. If the ratio of width to height    in the image does not match the ratio in the target frame, it creates a letterbox.
 

3

The image is resized to fill the entire target frame while preserving the aspect ratio. Rather than create a letterbox, this mode   crops the image, either along the sides or across the top and bottom.

 

Return Value

Return true - successful
Return false - Failed

 

Example

Visual Basic Syntax
VideoEdit1.InitControl
VideoEdit1.AddVideo "c:\hello.mpg" , 0,10,0    'Add hello.mpg into timeline and extract video of the hello.mpg from 0 second to 10 second
VideoEdit1.AddVideo "c:\abc.wmv" , 4,8,0      'Add abc.wmv into timeline and extract video of the abc.wmv from 4 second to 8 second
VideoEdit1.AddVideo "c:\image.jpg" , 0,1,0      'Add image to timeline set the duration to 1 second