VideoEdit Gold ActiveX Control

AddVideoWithSlowMotion Method

Description

Add the video to timeline and then add slow motion effect. You  may add this effect on preview or save to another video formats.

 

Syntax

Public Function AddVideoWithFastMotion ( _
   ByVal strFile as string, _
   ByVal iVideoStart as double, _
   ByVal iVideoStop as double, _
   ByVal iStretchMode as integer, _
   ByVal iSlowMotionRate as double
) 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.

iSlowMotionRate
    the value of slow motion rate, the rangle from (0.1 to 8.0).
0.1 - about add slow motion rate 10%
1.0 - about add slow motion rate 100%

Return Value

Return true - successful
Return false - Failed

 

Example

Visual Basic Syntax

VideoEdit1.VideoSampleSize = 24
VideoEdit1.InitControl
VideoEdit1.AddVideoWithFastMotion "c:\video1.mpg", 0, 10, 0, 0, 2, 2.0
VideoEdit1.AddAudioWithFastMotion "c:\video1.mpg", 0, 10, 2, 2.0
VideoEdit1.Preview