tencent cloud

All product documents
User Generated Short Video SDK
Last updated: 2025-04-01 17:14:09
Android
Last updated: 2025-04-01 17:14:09

TXVideoEditer

Basic editing APIs

API
Description
The TXVideoEditer constructor.
Specifies the video path. This API works in v18 or later on Android.
Sets the custom image processing callback.
Releases the resources after a video is processed or processing is canceled.

Effect APIs

API
Description
Sets the filter strength (not supported in UGSV Lite).
Sets the filter (not supported in UGSV Lite).
Sets multiple filters (not supported in UGSV Lite).
Sets the beautification and brightening strength (not supported in UGSV Lite).
Sets the start time for an effect (not supported in UGSV Lite).
Sets the end time for an effect (not supported in UGSV Lite).
Removes the last effect applied (not supported in UGSV Lite).
Removes all effects (not supported in UGSV Lite).

Video generation APIs

API
Description
Sets the start and end time for video clipping.
Sets the output video bitrate.
setVideoFrameRate
Set the output video frame rate
setProfile
Set video encoding profile
Sets the output audio bitrate.
Registers a listener for video generation.
Generates a video according to the action list.
Cancels generating the video.

Image transition APIs

API
Description
Specifies the images that are to be converted to a video (not supported in UGSV Lite).
Sets the transition effects (not supported in UGSV Lite).

Time effect APIs

API
Description
Sets the playback speed for multiple video segments (not supported in UGSV Lite).
Loops multiple video segments (not supported in UGSV Lite).
Plays a video backwards (not supported in UGSV Lite).

Transition Effect

API
​Description
setTransitionEffect
Set the start time of the transition effect (not supported in UGSV Lite). The default duration is 1 second.
setTransitionEffect
Set the start time and duration of the transition effect (not supported in UGSV Lite).
deleteLastTransitionEffect
Delete the last added transition effect (not supported in UGSV Lite).

Preview APIs

API
Description
Registers a listener for video preview.
Initializes the view for video preview.
Plays a video for a specific time period.
Pauses playback.
Resumes playback.
Stops playback (releases the resources).
Previews a frame.
Refreshes a frame to show the image without ghosting. This is used for the subtitle editing view.
Sets the rendering rotation (not supported in UGSV Lite).

Preprocessing APIs

API
Description
Sets the preprocessing callback.
Preprocesses a video.

Background music APIs

API
Description
Sets the background music (not supported in UGSV Lite).
Sets whether to loop the background music (not supported in UGSV Lite).
Sets the time point of the video to start playing music (not supported in UGSV Lite).
Sets the start and end time of the background music (not supported in UGSV Lite).
Sets the volume of the background music (not supported in UGSV Lite).
Sets fade-in and fade-out effects for the background music (not supported in UGSV Lite).
Sets the audio volume of the video (not supported in UGSV Lite).

Sticker APIs (not supported in UGSV Lite)

API
Description
Sets static stickers (not supported in UGSV Lite).
Sets animated stickers (not supported in UGSV Lite).
Sets speech bubbles (not supported in UGSV Lite).

Watermark APIs

API
Description
Sets a global watermark (not supported in UGSV Lite).
Adds a watermark to the closing segment (not supported in UGSV Lite).

Thumbnail APIs

API
Description
Gets the thumbnail list.
Gets the thumbnail list.
Sets the thumbnail output by preprocessing.
Sets the callback for thumbnail generation by preprocessing.
Gets the number of thumbnails.

TXVideoGenerateListener

Editing callback APIs

API
Description
The video generation progress.
A video was generated.

TXVideoPreviewListener

Preview callback APIs

API
Description
The current preview time, in microseconds.
The preview ended.

TXVideoPreviewListenerEx

Preview callback APIs

API
Description
An error occurred during video generation.
The preview progress, in microseconds.
The preview ended.

TXVideoProcessListener

Preprocessing callback APIs

API
Description
The preprocessing progress.
The preprocessing was completed.

TXVideoCustomProcessListener

Custom processing callback APIs

API
Description
The texture callback. You can process the video by yourself in this callback.
The texture releasing callback. You can release the OpenGL resources in this callback.

TXThumbnailListener

Thumbnail callback APIs

API
Description
The thumbnail callback.

TXVideoEditConstants

Definitions of editing key types

API
Description
The video information.
The preview parameters.
The editing result.
Preview errors.
The generation result.
The subtitle information.
The static sticker information.
The animated sticker information.
The speed changing information.
The area to which the watermark is applied.
The thumbnail information.
The looped segment.
The position and dimensions of each video.

Error Codes

Editing result

Message
Code
Description
GENERATE_RESULT_OK
0
The video was generated successfully.
GENERATE_RESULT_FAILED
-1
Failed to generate the video.
GENERATE_RESULT_LICENCE_VERIFICATION_FAILED
-5
Failed to generate the video due to a license verification error.

Preview

Message
Code
Description
PREVIEW_ERROR_VIDEO_DECODE_FAIL
-1
Failed to preview the video due to a decoding error.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon