tencent cloud

Last updated:2025-04-01 17:14:09
iOS
Last updated: 2025-04-01 17:14:09

TXVideoEditer

Constructor API

API
Description
The default initialization method.

Video/Image setting APIs

API
Description
Specifies the video path.
Sets AVAsset.
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).

Preview APIs

API
Description
Renders the image at a specific time point of the video.
Plays a video for a specific time period.
Pauses playback.
Resumes playback.
Stops playback (releases the resources).

Generation APIs

​API
​Description
setCutFromTime
Set Video Clip Time Range
setVideoBitrate
Set video bitrate
setVideoFramerate
Set video frame rate
generateVideo
Generate video
quickGenerateVideo
Quickly generate video using system functions
generateVideoWithTwoPass
Generate video with Two-Pass Encoding ​**[not supported in UGSV Lite]**
pauseGenerate
Pause video generation (only applicable to generateVideo; invalid for quickGenerateVideo)
resumeGenerate
Resume video generation (only applicable to generateVideo; invalid for quickGenerateVideo)
cancelGenerate
Cancel video generation

Effect APIs

API
Description
Sets the beautification and brightening strength (0-9).
Sets the filter.
Sets two filters.
Sets the filter strength.
Plays a video backwards (not supported in UGSV Lite).
Loops video segments (not supported in UGSV Lite).
Sets the rendering rotation (not supported in UGSV Lite).
Sets the playback speed (not supported in UGSV Lite).
Starts an effect (not supported in UGSV Lite).
Stops 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).

Sticker APIs (not supported in UGSV Lite)

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

Background music APIs

API
Description
Sets the background music (not supported in UGSV Lite).
Sets the background music (not supported in UGSV Lite).
Sets the start and end time of 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 audio volume of the video (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).

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).

TXVideoPreviewListener

Preview callback APIs

API
Description
The current preview time of the video, in seconds.
The preview ended.

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.

TXVideoGenerateListener

Editing callback APIs

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

TXVideoJoinerListener

Video generation and splicing callback APIs

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

TXVideoEditerTypeDef

Definitions of editing key types

API
Description
The video information.
The preview parameters.
The editing result.
The video generation result.
The subtitle information.
The static sticker information.
The animated sticker information.
The speed changing information.
The looped segment.

Enumerated types

API
Description
Preview fill modes.
Speed change options.
Effect types.
Transition effects.
Error codes for video generation.
Error codes for video splicing.
Compression ratios.

Error Codes

Video generation

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

Video splicing

Message
Code
Description
JOINER_RESULT_OK
0
The splicing was successful.
JOINER_RESULT_FAILED
-1
The splicing failed.
JOINER_RESULT_LICENCE_VERIFICATION_FAILED
-5
License verification failed.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback