VideoEdit Gold ActiveX Control

AddVideoWithTran Method

Description

Add the video/image to timeline and then add transitions.

 

Syntax

Public Function AddVideoWithTran ( _
   ByVal strFile as string, _
   ByVal iVideoStart as double, _
   ByVal iVideoStop as double, _
   ByVal iStretchMode as integer, _
   ByVal iInsertTranID as integer, _
   ByVal iTranDuration 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.

iInsertTranID
the iInsertTranID start from 0. You may call Transitions object to find normal transition id. The advanced Transitions ID start from 1000.

Advanced TranID

Transition name

1000

Wide Down

1001

Wide Normal Down

1002

Wide Narrow Down

1003

Wide Right

1004

Wide Normal Right

1005

Wide Narrow Right

1006

Reveal Right

1007

Reveal Down

1008

Inset Down Right

1009

Inset Down Left

1010

Inset Up Left

1011

Inset Up Right

1012

Split Vertical

1013

Split Horizontal

1014

Diagonal Down Right

1015

Bow Tie Vertical

1016

Bow Tie Horizontal

1017

Diagonal Cross Out

1018

Diagonal Box Out

1019

Filled V Down

1020

Filled V Left

1021

Filled V Up

1022

Filled V Right

1023

Zig Zag Vertical

1024

Zig Zag Horizontal

1025

Rectangle Out

1026

Diamond Out

1027

Circle

1028

Circles

1029

Star 5 Points

1030

Stars

1031

Heart

1032

Key Hole

1033

Sweep Diagonale

1034

Sweep Horizontal

1035

Fan In Vertical

1036

Eye

1037

Swinging Door Bottom

1038

Windshield Up

1039

Windshield Vertical

1040

Wheel

1041

Slide Up

1042

Slide Down

1043

Slide Left

1044

Slide Right

1045

Slide up Center

1046

Slide down Center

1047

Slide left Center

48

Slide right Center

1049

Roll Right

1050

Roll Left

1051

Roll Up

1052

3D Rotate Left

1053

3D Rotate Right

1054

Spin out Left

1055

Spin out Right

1056

Page Curl lower left

1057

Page Curl lower right

1058

Page Curl upper left

1059

Page Curl upper right

1060

Shatter Right

1061

Shatter Left

1062

Shatter up Right

1063

Shatter up Left

1064

Shatter Down Right

1065

Shatter Down Left

1066

Shatter In

1067

Whirlwind Fade

1068

Shrink vertical then horizontal

1069

Flip



Return Value

Return true - successful
Return false - Failed

 

Example

Visual Basic Syntax

VideoEdit1.VideoSampleSize = 24
VideoEdit1.InitControl
VideoEdit1.AddVideoWithTran "c:\video1.mpg", 0, 10, 0, 0, 2
VideoEdit1.AddAudioWithTran "c:\video1.mpg", 0, 10, 2
VideoEdit1.AddVideoWithTran "c:\video2.mpg", 0, 10, 0, 1000, 2
VideoEdit1.AddAudioWithTran "c:\video2.mpg", 0, 10, 2
VideoEdit1.AddVideoWithTran "c:\video3.mpg", 0, 10, 0, -1, 2
VideoEdit1.AddAudioWithTran "c:\video3.mpg, 0, 10, 0
VideoEdit1.Preview