MeiCam SDK For Android
3.14.0
|
video track,the collection of video clips. More...
Public Member Functions | |
NvsVideoClip | appendClip (String filePath) |
Appends a video clip to the end of the video track. More... | |
NvsVideoClip | appendClip (String filePath, long trimIn, long trimOut) |
Appends a video clip of the specified length to the end of the video track. More... | |
NvsVideoClip | insertClip (String filePath, int clipIndex) |
Inserts a video clip at the specified clip index on the video track. More... | |
NvsVideoClip | insertClip (String filePath, long trimIn, long trimOut, int clipIndex) |
Inserts a video clip of the specified length at the specified clip index on the video track. More... | |
NvsVideoClip | addClip (String filePath, long inPoint) |
add clip. More... | |
NvsVideoClip | addClip (String filePath, long inPoint, long trimIn, long trimOut) |
Adds a clip of the specified length. More... | |
NvsVideoClip | appendTimelineClip (NvsTimeline timeline) |
Appends a timeline clip to the end of the video track. More... | |
NvsVideoClip | appendTimelineClip (NvsTimeline timeline, long trimIn, long trimOut) |
Appends a timeline clip of the specified length to the end of the video track. More... | |
NvsVideoClip | insertTimelineClip (NvsTimeline timeline, int clipIndex) |
Inserts a timeline clip at the specified clip index on the video track. More... | |
NvsVideoClip | insertTimelineClip (NvsTimeline timeline, long trimIn, long trimOut, int clipIndex) |
Inserts a timeline clip of the specified length at the specified clip index on the video track. More... | |
NvsVideoClip | addTimelineClip (NvsTimeline timeline, long inPoint) |
Adds timeline clip. More... | |
NvsVideoClip | addTimelineClip (NvsTimeline timeline, long inPoint, long trimIn, long trimOut) |
Adds a timeline clip of the specified length. More... | |
NvsVideoClip | getClipByIndex (int clipIndex) |
Gets video clip by index. More... | |
NvsVideoClip | getClipByTimelinePosition (long timelinePos) |
Gets video clip by time. More... | |
NvsVideoTransition | setBuiltinTransition (int srcClipIndex, String transitionName) |
Sets built-in transitions. More... | |
NvsVideoTransition | setPackagedTransition (int srcClipIndex, String packageId) |
Sets resource package transition. More... | |
NvsVideoTransition | setCustomVideoTransition (int srcClipIndex, NvsCustomVideoTransition.Renderer customVideoTransitionRender) |
Sets custom video transition. More... | |
NvsVideoTransition | getTransitionBySourceClipIndex (int srcClipIndex) |
Get the transition through the source video clip index. More... | |
void | setEnableOriginalRender (boolean enable) |
Turn on special effect rendering based on the original scale of the video track. More... | |
boolean | isOriginalRender () |
Gets whether the original scale rendering mode is turned on. More... | |
void | setProxyScale (NvsRational proxyScale) |
Disable the current track from rendering at the proxy scale. More... | |
NvsRational | getProxyScale () |
Gets whether the current track is disabled from rendering at the proxy scale. More... | |
NvsTrackCaption | getFirstCaption () |
Get the first caption on the track. More... | |
NvsTrackCaption | getLastCaption () |
Get the last caption on the track. More... | |
NvsTrackCaption | getPrevCaption (NvsTrackCaption caption) |
Get the previous caption of the current caption on the track. More... | |
NvsTrackCaption | getNextCaption (NvsTrackCaption caption) |
Get the next caption of the current caption on the track. More... | |
List< NvsTrackCaption > | getCaptionsByTimelinePosition (long timelinePos) |
Get a list of captions based on the position on the track. More... | |
NvsTrackCaption | addCaption (String captionText, long inPoint, long duration, String captionStylePackageId) |
Add a caption on the track. More... | |
NvsTrackCaption | addPanoramicCaption (String captionText, long inPoint, long duration, String captionStylePackageId) |
Add a panorama caption on the track. More... | |
NvsTrackCaption | addModularCaption (String captionText, long inPoint, long duration) |
Add a modular caption on the track. More... | |
NvsTrackCaption | removeCaption (NvsTrackCaption caption) |
Remove the caption on the track. More... | |
NvsTrackCompoundCaption | getFirstCompoundCaption () |
Get the first compound caption on the track. More... | |
NvsTrackCompoundCaption | getLastCompoundCaption () |
Get the last compound caption on the track. More... | |
NvsTrackCompoundCaption | getPrevCaption (NvsTrackCompoundCaption caption) |
Get the previous compound caption of the current compound caption on the track. More... | |
NvsTrackCompoundCaption | getNextCaption (NvsTrackCompoundCaption caption) |
Get the next compound caption of the current compound caption on the track. More... | |
List< NvsTrackCompoundCaption > | getCompoundCaptionsByTimelinePosition (long timelinePos) |
Get a list of compound captions based on the position on the track. More... | |
NvsTrackCompoundCaption | addCompoundCaption (long inPoint, long duration, String compoundCaptionPackageId) |
Add a caption on the track. More... | |
NvsTrackCompoundCaption | removeCompoundCaption (NvsTrackCompoundCaption caption) |
Remove compound caption from the track. More... | |
NvsTrackAnimatedSticker | getFirstAnimatedSticker () |
Get the first animated sticker on the track. More... | |
NvsTrackAnimatedSticker | getLastAnimatedSticker () |
Get the last animated sticker on the track. More... | |
NvsTrackAnimatedSticker | getPrevAnimatedSticker (NvsTrackAnimatedSticker animatedSticker) |
Get the previous animated sticker of the current animated sticker of the track. More... | |
NvsTrackAnimatedSticker | getNextAnimatedSticker (NvsTrackAnimatedSticker animatedSticker) |
Get the next animated sticker of the current animated sticker of the track. More... | |
List< NvsTrackAnimatedSticker > | getAnimatedStickersByTimelinePosition (long timelinePos) |
Get an animated sticker list based on the position on the track. More... | |
NvsTrackAnimatedSticker | addAnimatedSticker (long inPoint, long duration, String animatedStickerPackageId) |
Add a animated sticker on the track. More... | |
NvsTrackAnimatedSticker | addPanoramicAnimatedSticker (long inPoint, long duration, String animatedStickerPackageId) |
Add a panorama animation sticker on the track. More... | |
NvsTrackAnimatedSticker | addCustomAnimatedSticker (long inPoint, long duration, String animatedStickerPackageId, String customImagePath) |
Add a custom animated sticker on the track. More... | |
NvsTrackAnimatedSticker | addCustomPanoramicAnimatedSticker (long inPoint, long duration, String animatedStickerPackageId, String customImagePath) |
Add a a custom panorama animated sticker on the track. More... | |
NvsTrackAnimatedSticker | removeAnimatedSticker (NvsTrackAnimatedSticker animatedSticker) |
Remove an animated sticker on the track. More... | |
NvsTrackVideoFx | getFirstTrackVideoFx () |
Get the first track video effect on the track. More... | |
NvsTrackVideoFx | getLastTrackVideoFx () |
Get the last track video effect on the track. More... | |
NvsTrackVideoFx | getPrevTrackVideoFx (NvsTrackVideoFx videoFx) |
Get the previous track video effect of a track video effect on the track. More... | |
NvsTrackVideoFx | getNextTrackVideoFx (NvsTrackVideoFx videoFx) |
Get the next track video effect of a track video effect on the track. More... | |
List< NvsTrackVideoFx > | getTrackVideoFxByPosition (long pos) |
Get a list of track video effects based on position on the track. More... | |
void | updateAudioForTrackVideoFx () |
Update the audio information in the current track effect. More... | |
NvsTrackVideoFx | addBuiltinTrackVideoFx (long inPoint, long duration, String videoFxName) |
Add a built-in track video effect on the track. More... | |
NvsTrackVideoFx | addBuiltinTrackVideoFx (long inPoint, long duration, String videoFxName, int flags) |
Add a built-in track video effect on the track. More... | |
NvsTrackVideoFx | addPackagedTrackVideoFx (long inPoint, long duration, String videoFxPackageId) |
Add a track video effect in the form of a resource package on the track. More... | |
NvsTrackVideoFx | addPackagedTrackVideoFx (long inPoint, long duration, String videoFxPackageId, int flags) |
Add a track video effect in the form of a resource package on the track. More... | |
NvsTrackVideoFx | addCustomTrackVideoFx (long inPoint, long duration, NvsCustomVideoFx.Renderer customVideoFxRender) |
Add a custom track video effect on the track. More... | |
NvsTrackVideoFx | removeTrackVideoFx (NvsTrackVideoFx videoFx) |
Remove a track video effect from the track. More... | |
![]() | |
int | getType () |
Get track type. More... | |
int | getIndex () |
Gets track index. More... | |
long | getDuration () |
Gets track length. More... | |
int | getClipCount () |
Gets the number of clips on the track. More... | |
long | changeInPoint (int clipIndex, long newInPoint) |
Modifies the clip's in-point on timeline.If clip does not have this function authorization to return the current InPoint. If newInPoint is less than the outPoint of the previous clip, return the outPoint of the previous clip directly. If the current clip is the 0th clip, newInPoint is at least 0. This function internally calculates a new trimIn based on newInPoint and modifies the trimIn of the clip. If the new trimIn is less than 0, the corresponding Inpoint value when the trimIn is 0 will be returned; if the newInPoint is greater than trimOut, the corresponding Inpoint value of trimOut-1 will be returned. More... | |
long | changeOutPoint (int clipIndex, long newOutPoint) |
Modifies the clip's out-point on timeline.If clip does not have this function authorization to return the current outPoint.If newOutpoint is less than the outPoint of the clip, then newOutpoint will not be less than inpoint+1; if the clip is followed by nextclip, then newOutpoint will not be greater than the inpoint of nextclip. If the current clip is the last clip, the final outPoint is the duration of the timeline. If newOutpoint is greater than the outPoint of the clip, then the end of the video will be FreezeFrame. This function internally calculates a new trimOut based on newOutPoint, and removes the intermediate transition if the inPoint of the clip is not equal to the outPoint of the next clip. More... | |
boolean | splitClip (int clipIndex, long splitPoint) |
Splits the specified clip. More... | |
boolean | removeClip (int clipIndex, boolean keepSpace) |
Removes the specified clip.You are not allowed to remove the opening and ending of a theme. More... | |
boolean | removeRange (long startTimelinePos, long endTimelinePos, boolean keepSpace) |
Removes all clips within the specified interval, and adjust the timeline in-point or out-point if the clip only partially overlaps the interval., and adjust the timeline in or out point if the clip only partially overlaps the interval.Failed to remove the fragment if it contains the opening and ending sections of the theme.StartTimeLinepos < 0 or endTimeLinepos <= startTimeLinepos will also remove failure. More... | |
boolean | moveClip (int clipIndex, int destClipIndex) |
Moving the specified clip, swapping the two positions of the input, affects the arrangement of the clip on the timeline.,clipIndex and destClipIndex cannot be equal to clipCount. More... | |
boolean | moveClip (int clipIndex, long targetTimelinePos, boolean isInsertTarget, boolean keepSpace) |
Moves the specified clip to the input position.. clipIndex greater than or equal to clipCount will fail to remove, targetTimeLinePos equal to 0 will be moved to the 0 position, the theme title title will not be moved. More... | |
boolean | removeAllClips () |
Removes all the clips. More... | |
void | setVolumeGain (float leftVolumeGain, float rightVolumeGain) |
Sets the volume. The final volume value is the track volume Multiplied by the clip volume. More... | |
NvsVolume | getVolumeGain () |
Get the volume information. The final volume value is the track volume Multiplied by the clip volume. More... | |
![]() | |
void | setAttachment (String key, Object value) |
Adds additional data to the NvsObject object to identify the NvsObject object or for other purpose. More... | |
void | setTemplateAttachment (String key, String value) |
Adds additional template data to the NvsObject object to identify the NvsObject template object. More... | |
Object | getAttachment (String key) |
Gets an attachment to NvsObject. More... | |
String | getTemplateAttachment (String key) |
Gets an template attachment to NvsObject. More... | |
Static Public Attributes | |
Track type | |
static final int | TRACK_ADD_VIDEO_FX_FLAGS_RENDER_AT_CLIP_RAW_FILTER = 1 |
![]() | |
static final int | TRACK_TYPE_VIDEO = 0 |
Video track. More... | |
static final int | TRACK_TYPE_AUDIO = 1 |
Audio track. More... | |
![]() | |
static final String | TEMPLATE_KEY_REPLACE_ID = "MSTemplate-ReplaceId" |
static final String | TEMPLATE_KEY_FOOTAGE_CAN_REPLACE = "MSTemplate-FootageCanReplace" |
static final String | TEMPLATE_KEY_FOOTAGE_ID = "MSTemplate-FootageId" |
static final String | TEMPLATE_KEY_FOOTAGE_NAME = "MSTemplate-FootageName" |
static final String | TEMPLATE_KEY_FOOTAGE_M3U8_NAME = "MSTemplate-FootageM3U8Name" |
static final String | TEMPLATE_KEY_FOOTAGE_TAGS = "MSTemplate-FootageTags" |
static final String | TEMPLATE_KEY_FOOTAGE_TYPE = "MSTemplate-FootageType" |
static final String | TEMPLATE_KEY_FOOTAGE_NEED_REVERSE = "MSTemplate-FootageNeedReverse" |
static final String | TEMPLATE_KEY_CLIP_RAW_WIDTH = "MSTemplate-ClipRawWidth" |
static final String | TEMPLATE_KEY_CLIP_RAW_HEIGHT = "MSTemplate-ClipRawHeight" |
static final String | TEMPLATE_KEY_VOLUME_TYPE = "MSTemplate-VolumeType" |
static final String | TEMPLATE_KEY_FX_GROUP = "MSTemplate-FxGroup" |
static final String | TEMPLATE_KEY_BEST_SEEK_TIME = "MSTemplate-BestSeekTime" |
static final String | TEMPLATE_KEY_MASK_TYPE = "MSTemplate-MaskType" |
static final String | TEMPLATE_VALUE_MASK_TYPE_LINE = "MSTemplate-MaskType-Line" |
static final String | TEMPLATE_VALUE_MASK_TYPE_MIRROR = "MSTemplate-MaskType-Mirror" |
static final String | TEMPLATE_VALUE_MASK_TYPE_CIRCLE = "MSTemplate-MaskType-Circle" |
static final String | TEMPLATE_VALUE_MASK_TYPE_RECT = "MSTemplate-MaskType-Rect" |
static final String | TEMPLATE_VALUE_MASK_TYPE_HEART = "MSTemplate-MaskType-Heart" |
static final String | TEMPLATE_VALUE_MASK_TYPE_STAR = "MSTemplate-MaskType-Star" |
static final String | TEMPLATE_KEY_TRANS_TYPE_CUT = "MSTemplate-TransType-Cut" |
static final String | TEMPLATE_KEY_CURVE_SPEED_TYPE = "MSTemplate-CurveSpeedType" |
static final String | TEMPLATE_VALUE_CURVE_SPEED_TYPE_CUSTOM = "MSTemplate-CurveSpeedType-Custom" |
static final String | TEMPLATE_VALUE_CURVE_SPEED_TYPE_MONTAGE = "MSTemplate-CurveSpeedType-Montage" |
static final String | TEMPLATE_VALUE_CURVE_SPEED_TYPE_HERO = "MSTemplate-CurveSpeedType-Hero" |
static final String | TEMPLATE_VALUE_CURVE_SPEED_TYPE_BULLET = "MSTemplate-CurveSpeedType-bullet" |
static final String | TEMPLATE_VALUE_CURVE_SPEED_TYPE_PLUS = "MSTemplate-CurveSpeedType-Plus" |
static final String | TEMPLATE_VALUE_CURVE_SPEED_TYPE_IN = "MSTemplate-CurveSpeedType-In" |
static final String | TEMPLATE_VALUE_CURVE_SPEED_TYPE_OUT = "MSTemplate-CurveSpeedType-Out" |
Additional Inherited Members | |
![]() | |
void | setInternalObject (long internalObject) |
long | getInternalObject () |
![]() | |
long | m_internalObject = 0 |
video track,the collection of video clips.
A video track is an entity that holds video clips, and users can add, insert, and delete multiple video clips. The video track continues to expand as the clip increases, and video transitions can be inserted between clips. When adding a package transition, users need to install it and get the packageID returned as the handle of the transition. For built-in transition, their names are regarded as handle. Note: The index of the video clip starts from 0.
|
inline |
Add a animated sticker on the track.
inPoint | The in point of the animated sticker on the track (in microseconds) |
duration | The duration of the animation sticker which displayed (in microseconds) |
animatedStickerPackageId | Animated sticker package Id |
|
inline |
Add a built-in track video effect on the track.
inPoint | The in point of the track video effect on the track (in microseconds) |
duration | Duration of the track video effect which displayed (in microseconds) |
videoFxName | The video effect name |
|
inline |
Add a built-in track video effect on the track.
inPoint | The in point of the track video effect on the track (in microseconds) |
duration | Duration of the track video effect which displayed (in microseconds) |
videoFxName | The video effect name |
flags | The flags when add a build-in track video effect |
|
inline |
Add a caption on the track.
captionText | Text of caption |
inPoint | The in point of the caption on the track (in microseconds) |
duration | Caption display duration (in microseconds) |
captionStylePackageId | Caption style package Id.If it does not exist, you can pass an empty string or null. |
|
inline |
add clip.
filePath | Clip file path. For the clip's path in Android, there are two ways: |
a. Creates an assets folder in the local program path, usually in the same directory as the res folder. The corresponding audio and video resources can be placed inside, the path form: "assets: /video20170406101714.mp4".
b. Imports the audio and video resources in the mobile phone through the absolute path, the path form: "/storage/Media/DCIM/IMG_0646.MP4".
inPoint | The in point of the clip on the timeline (in microseconds) For more information of the in and out points of a clip on the timeline, please refer to the section trimIn and trimOut. |
|
inline |
Adds a clip of the specified length.
filePath | Clip path. For clip path types, please refer to the parameter filePath of addClip(). |
inPoint | The in point of the clip on the timeline (in microseconds). |
trimIn | clip trim in point (in microseconds). |
trimOut | clip trim out point (in microseconds). |
As shown above, there are three video clips C1, C2, C3 on the track, and a clip C4 is to be added. The arrow on the C4 clip points to the trim in amd out points of the clip. The arrow on the track refers to the in-point of the clip on the timeline. After clipping, the corresponding clip is added to the track. The code is implemented as follows: NvsVideoTrack videoTrack; //videoTrack Omits creation here. videoTrack.addClip(filepath,inPoint,trimIn,trimOut);//Filepath is the path of the clip C4, and inPoint is the value of the position indicated by the arrow on the track in the figure, and trimIn and trimOut are the values at the position indicated by the arrow on the C4 clip of the above figure.
When added, the results are as follows:
|
inline |
Add a caption on the track.
captionText | Text of caption |
inPoint | The in point of the caption on the track (in microseconds) |
duration | Caption display duration (in microseconds) |
captionStylePackageId | Caption style package Id.If it does not exist, you can pass an empty string or null. |
|
inline |
Add a custom animated sticker on the track.
inPoint | The in point of custom animated sticker on the track (in microseconds) |
duration | The duration of custom animation sticker which displayed (in microseconds) |
animatedStickerPackageId | Animated sticker package Id |
customImagePath | Path of custom animated sticker image(It can be a jpg, png image, or a dynamic caf format image supported by Meishe sdk) |
|
inline |
Add a a custom panorama animated sticker on the track.
inPoint | The in point of custom animated sticker on the track (in microseconds) |
duration | The duration of custom animation sticker which displayed (in microseconds) |
animatedStickerPackageId | Animated sticker package Id |
customImagePath | Path of custom animated sticker image |
|
inline |
Add a custom track video effect on the track.
inPoint | The in point of the track video effect on the track (in microseconds) |
duration | Duration of the track video effect which displayed (in microseconds) |
customVideoFxRender | User-implemented custom video effects renderer interface |
|
inline |
Add a modular caption on the track.
captionText | Text of caption |
inPoint | The in point of the caption on the track (in microseconds) |
duration | Caption display duration (in microseconds) |
|
inline |
Add a track video effect in the form of a resource package on the track.
inPoint | The in point of the track video effect on the track (in microseconds) |
duration | Duration of the track video effect which displayed (in microseconds) |
videoFxPackageId | The Id of resource package |
|
inline |
Add a track video effect in the form of a resource package on the track.
inPoint | The in point of the track video effect on the track (in microseconds) |
duration | Duration of the track video effect which displayed (in microseconds) |
videoFxPackageId | The Id of resource package |
flags | The flags when add a package track video effect |
|
inline |
Add a panorama animation sticker on the track.
inPoint | The in point of the animated sticker on the track (in microseconds) |
duration | The duration of the animation sticker which displayed (in microseconds) |
animatedStickerPackageId | Animated sticker package Id |
|
inline |
Add a panorama caption on the track.
captionText | Text of caption |
inPoint | The in point of the caption on the track (in microseconds) |
duration | Caption display duration (in microseconds) |
captionStylePackageId | Caption style package Id.If it does not exist, you can pass an empty string or null. |
|
inline |
Adds timeline clip.
timeline | The timeline object to be added. |
inPoint | The in point of the clip on the timeline (in microseconds) |
|
inline |
Adds a timeline clip of the specified length.
timeline | The timeline object to be added. |
inPoint | The in point of the clip on the timeline (in microseconds). |
trimIn | clip trim in point (in microseconds). |
trimOut | clip trim out point (in microseconds). |
|
inline |
Appends a video clip to the end of the video track.
filePath | Video clip path. For clip path types, please refer to the parameter filePath of addClip(). |
In the above picture, there are three clips on the video track, namely C1, C2, C3, and a new clip C4 is added to the end of the video track. NvsVideoTrack m_videoTrack;//m_videoTrack omitted creation NvsVideoClip m_videoClip; m_videoClip = m_videoTrack.appendClip(filepath) //Filepath is the path of clip C4. After appending, it becomes::
|
inline |
Appends a video clip of the specified length to the end of the video track.
filePath | Video clip path. For clip path types, please refer to the parameter filePath of addClip(). |
trimIn | Trim in point of video clips (in microseconds). |
trimOut | Trim out point of video clips (in microseconds). |
|
inline |
Appends a timeline clip to the end of the video track.
timeline | The timeline object to be appended. |
|
inline |
Appends a timeline clip of the specified length to the end of the video track.
timeline | The timeline to be appended. |
trimIn | Trim in point of video clips (in microseconds). |
trimOut | Trim out point of video clips (in microseconds). |
|
inline |
Get an animated sticker list based on the position on the track.
trackPos | Position on the track (in microseconds) |
|
inline |
Get a list of captions based on the position on the track.
trackPos | The position on the track(in micro-second) |
|
inline |
Gets video clip by index.
clipIndex | Video clip index. Clip index value range: NvsVideoTrack m_videoTrack;//m_videoTrack omitted creation int clipCount = m_videoTrack.getClipCount(); The value of clipIndex is [0, clipCount-1] |
|
inline |
Gets video clip by time.
timelinePos | Position on the timeline (in microseconds). |
|
inline |
Get a list of compound captions based on the position on the track.
trackPos | The position on the track(in micro-second) |
|
inline |
Get the first animated sticker on the track.
|
inline |
Get the first caption on the track.
|
inline |
Get the first compound caption on the track.
|
inline |
Get the first track video effect on the track.
|
inline |
Get the last animated sticker on the track.
|
inline |
Get the last caption on the track.
|
inline |
Get the last compound caption on the track.
|
inline |
Get the last track video effect on the track.
|
inline |
Get the next animated sticker of the current animated sticker of the track.
animatedSticker | the current NvsTrackAnimatedSticker obejct |
|
inline |
Get the next caption of the current caption on the track.
caption | The current caption on the track |
|
inline |
Get the next compound caption of the current compound caption on the track.
caption | The current compound caption on the track |
|
inline |
Get the next track video effect of a track video effect on the track.
videoFx | The NvsTrackVideoFx object |
|
inline |
Get the previous animated sticker of the current animated sticker of the track.
animatedSticker | the current NvsTrackAnimatedSticker obejct |
|
inline |
Get the previous caption of the current caption on the track.
caption | The current caption on the track |
|
inline |
Get the previous compound caption of the current compound caption on the track.
caption | The current compound caption on the track |
|
inline |
Get the previous track video effect of a track video effect on the track.
videoFx | The NvsTrackVideoFx object |
|
inline |
Gets whether the current track is disabled from rendering at the proxy scale.
|
inline |
Get a list of track video effects based on position on the track.
Pos | The position on the track (in microseconds) |
|
inline |
Get the transition through the source video clip index.
srcClipIndex | Source video clip index. |
|
inline |
Inserts a video clip at the specified clip index on the video track.
filePath | Video clip path. For clip path type, please refer to the parameter filePath of addClip(). |
clipIndex | Index of the inserted clip. |
There are three video clips C1, C2, and C3 on the track in the above figure, and the clip to be inserted is recorded as C4. If the clip is inserted before C1, the clipIndex value is 0 and same rule can be used in other cases. The corresponding code is implemented as follows: NvsVideoTrack m_videoTrack;//m_videoTrack omitted creation int clipCount = m_videoTrack.getClipCount(); NvsVideoClip m_videoClip; m_videoClip = m_videoTrack.insertClip(filepath,0); //Filepath is the path of clip C4, and the value of clipIndex is [0, clipCount-1] After insertion, it becomes:
|
inline |
Inserts a video clip of the specified length at the specified clip index on the video track.
filePath | Video clip path. For the clip path method, please refer to the parameter filePath of addClip(). |
clipIndex | Index of the inserted clip. |
trimIn | Trim in point of video clips (in microseconds) |
trimOut | Trim out point of video clips (in microseconds)) |
There are three video clips C1, C2, C3 on the track in the above figure, and the clip C4 is to be inserted. The point indicated by the arrow on the C4 clip is the clip's trim in and out points, C4 is inserted after trim. Note: The trim in and out values must be within the duration of this clip, and the trim in point value must be less than the trim out point value. The implementation code is as follows: NvsVideoTrack m_videoTrack;//m_videoTrack Omits creation int clipCount = m_videoTrack.getClipCount(); NvsVideoClip m_videoClip; m_videoClip = m_videoTrack.insertClip(filepath,trimIn,trimOut,0);//Filepath is the path of clip C4, trim in and trim out are the values at the position indicated by the arrow on the C4 clip of the above figure, and the value of clipIndex is [0, clipCount-1]. After insertion, it becomes:
|
inline |
Inserts a timeline clip at the specified clip index on the video track.
timeline | The timeline object to be inserted. |
clipIndex | Index of the inserted clip. |
|
inline |
Inserts a timeline clip of the specified length at the specified clip index on the video track.
timeline | The timeline object to be inserted. |
clipIndex | Index of the inserted clip. |
trimIn | Trim in point of video clips (in microseconds) |
trimOut | Trim out point of video clips (in microseconds)) |
|
inline |
Gets whether the original scale rendering mode is turned on.
|
inline |
Remove an animated sticker on the track.
animatedSticker | The NvsTrackAnimatedSticker object which will be removed |
|
inline |
Remove the caption on the track.
caption | track caption object which removed |
|
inline |
Remove compound caption from the track.
caption | track compound caption object which to be removed |
|
inline |
Remove a track video effect from the track.
videoFx | The NvsTrackVideoFx object which will be removed |
|
inline |
Sets built-in transitions.
srcClipIndex | Source video clip index. |
transitionName | The name of the transition. To get the video transition name, please refer to getAllBuiltinVideoTransitionNames() or built-in effect name list. Note: If the transition name is set to a null string, the original transition will be deleted. |
For instance: There are four video clips on the track in the below figure, which are C1, C2, C3, and C4, respectively, where clip C1, C2, and C3 are adjacent, and there is a gap between clip C3 and C4. If a transition is set between C1 and C2, it becomes:
NvsVideoTrack m_videoTrack;//m_videoTrack omitted creation int clipCount = m_videoTrack.getClipCount(); NvsVideoTransition m_videoTransition; m_videoTransition = m_videoTrack.setBuiltinTransition(0,transitionName) //srcClipIndex takes the range of (1, clipCount-1), and transitionName is the name of the transition to be set.
If a transition is added between C2 and C3, the index is 1. The transition can only be set between two adjacent clips. Since there is a gap between the C3 and C4 clip in the above figure, it is not possible to add a transition between the two clips.
|
inline |
Sets custom video transition.
srcClipIndex | Source video clip index. |
customVideoTransitionRender | User-implemented custom video effects renderer interface; |
|
inline |
Turn on special effect rendering based on the original scale of the video track.
Enable | Turn on or not. |
|
inline |
Sets resource package transition.
srcClipIndex | Source video clip index. |
packageId | Transition resource package ID. If the package Id is null, the transition at the video clip is deleted; if the package Id is set to "theme", the transition at the video clip is set to the one of the current theme. If there is no theme, the transition at the video clip should be deleted. |
|
inline |
Disable the current track from rendering at the proxy scale.
disable | Disable or not. |
|
inline |
Update the audio information in the current track effect.
|
static |
Render this effect when rendering the raw filter on video clip