VideoEdit Gold ActiveX Control

MultiTrackAddNextVideo

Description

Add next video file to specific track.Use this function, you may create video mixing and picture in picture effect.

Syntax

Public Function MultiTrackAddNextVideo ( _
   ByVal iVideoTrack as Integer, _
   ByVal strFile as String, _
   ByVal iVideoStart as double, _
   ByVal iVideoStop as double, _
   ByVal iStretchMode as Integer, _
   ByVal iAlphaValue as Integer
) As Boolean

 

Parameter

iVideoTrack
    the index of video track. The first video track is 0.

strFile
    the path of media file. It support video/image file.

iVideoStart
    the start time of media file.

iVideoStop
    the stop time of media file.


iStretchMode
 the value of 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.

iAlphaValue
 the value of alpha value, from 0-255. 255 = fully visible. This value only valid when you call AddVideoMixingEffect()



Return Value

Return true - successful
Return false - Failed

 

Example

Visual Basic Syntax

VideoEdit1.OutputFileWidth = 720
VideoEdit1.OutputFileHeight = 480

VideoEdit1.VideoSampleSize = 24
VideoEdit1.InitControl

VideoEdit1.MultiTrackAddFirstVideo 0, "c:\test1.mpg", 0, 60, 0, 255
VideoEdit1.MultiTrackAddFirstAudio 0, "c:\test1.mpg", 0, 60
VideoEdit1.MultiTrackAddNextVideo 0, "c:\test2.mpg", 0, 60, 0, 255
VideoEdit1.MultiTrackAddNextAudio 0, "c:\test2.mpg", 0, 60

VideoEdit1.MultiTrackAddFirstVideo 1, "c:\test3.mpg", 0, 60, 0, 255
VideoEdit1.MultiTrackAddFirstAudio 1, "c:\test3.mpg", 0, 60
VideoEdit1.MultiTrackAddNextVideo 1, "c:\test4.mpg", 0, 60, 0, 255
VideoEdit1.MultiTrackAddNextAudio 1, "c:\test4.mpg", 0, 60
VideoEdit1.AddPicInPicEffect 1, 0, 9999, 0, 0, 360, 240

VideoEdit1.Preview