tencent cloud

User Generated Short Video SDK

Android

Download
フォーカスモード
フォントサイズ
最終更新日: 2026-05-11 17:46:58

Feature Overview

Through the motion effect related APIs, you can add a dynamic transition effect segment to a short video. This document provides motion effect management features, including adding, updating, and deleting motion effects, and supports configuring scale modes and time parameters.

Related API Classes

API Class Name
Description
TAVEditor
SDK operation entry class.

API Method Summary

Method
Parameters
Description
addMotionEffect(String path, long startOffset, long duration)
path: motion effect path.
startOffset: start time (microseconds).
duration: duration (microseconds).
Adds a motion effect and returns its ID.
addMotionEffect(String path, long startOffset, long duration, int scaleMode)
path: motion effect path.
startOffset: start time (microseconds).
duration: duration (microseconds).
scaleMode: scale mode.
Adds a motion effect with a scale mode.
updateMotionEffectPlayRange(int motionId, long startOffset, long duration)
motionId: motion effect ID.
startOffset: new start time (microseconds).
duration: new duration (microseconds).
Updates the playback time range of a motion effect.
removeMotionEffect(int motionId)
motionId: motion effect ID.
Removes a motion effect.

Scale Mode Constants

Constant
Value
Description
SCALE_MODE_FIT
0
Fit mode.
SCALE_MODE_FILL
1
Fill mode.

Related Methods

Add Motion Effect

// Basic add method
int motionId = editor.addMotionEffect(path, startOffset, duration);

// Add method with scale mode
int motionId = editor.addMotionEffect(path, startOffset, duration, scaleMode);

Adjust Motion Effect Playback Time

/**
* Adjusts the playback time of a motion effect
*
* @param motionId motion effect ID
* @param startOffset start time (microseconds)
* @param duration duration (microseconds)
*/
editor.updateMotionEffectPlayRange(motionId, startOffset, duration);

Remove Motion Effect

/**
* Removes a motion effect
*
* @param motionId motion effect ID
*/
editor.removeMotionEffect(motionId);

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック