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
If you want to use third-party beauty libraries to add video effects during recording and editing, you can implement this in the ​preprocessing callbacks for both recording and editing.

Shoot Preprocessing Callback

public interface VideoCustomProcessListener {
/**
* Call back in the OpenGL thread. You can further process the captured video image in the callback
* @param textureId Texture ID
* @param width Texture width
* @param height Texture height
* @return Texture ID returned to SDK. If no processing is required, simply return the texture ID passed in.
* Note: the texture type called back by the SDK is `GLES20.GL_TEXTURE_2D`, which must also be the texture type returned to the SDK by the API
*/
int onTextureCustomProcess(int textureId, int width, int height);


/**
* Call back in the OpenGL thread. You can release the created OpenGL resources in the callback
*/
void onTextureDestroyed();
}

Editing Preprocessing Callback

public interface TXVideoCustomProcessListener {
/**
* Call back in the OpenGL thread. You can further process the captured video image in the callback
*
* @param textureId Texture ID
* @param width Texture width
* @param height Texture height
* @return Texture ID returned to SDK. If no processing is required, simply return the texture ID passed in.
* <p>
* Note: the texture type called back by the SDK is `GLES20.GL_TEXTURE_2D`, which must also be the texture type returned to the SDK by the API
*/
int onTextureCustomProcess(int textureId, int width, int height, long timestamp);

/**
* Call back in the OpenGL thread. You can release the created OpenGL resources in the callback
*/
void onTextureDestroyed();
}


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

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