Beauty AR
  • 产品概述
  • Web
    • 快速启动
    • 集成
      • 产品概述
      • 内置摄像头
      • 自定义流
      • 加载优化
      • 设置特效
      • 使用人像分割
      • 设置表情和虚拟形象
    • 接口文档
    • 发布说明
    • 最佳惯例
      • 结合 WebRTC 的推流
      • 结合 WebRTC 的推流(预初始化方案)
      • 结合 TRTC 推流
    • 常见问题
  • Android
    • 集成
      • 集成 SDK
      • 集成 TEBeautyKit
    • 接口文档
    • 发布说明
    • 最佳惯例
      • 缩减 SDK 大小
      • 特效参数
    • 高级功能
      • 手势识别
      • 人脸识别
      • 虚拟背景
    • 素材制作
      • 美颜 AR Studio 简介
    • 常见问题
  • IOS
    • 集成
      • 集成 SDK
      • 集成 TEBeautyKit
    • 接口文档
    • 发布说明
    • 最佳惯例
      • 缩减 SDK 大小
      • 特效参数
    • 高级功能
      • 手势识别
      • 人脸识别
      • 虚拟背景
    • 素材制作
      • 美颜 AR Studio 简介
    • 常见问题
  • Flutter
    • 集成
    • 接口文档
    • 素材制作
      • 美颜 AR Studio 简介
  • 产品概述
    • 产品概述
  • 开通服务
  • 价格中心
  • 体验版
    • Web
    • 移动端
Beauty AR
当前内容仅提供英语版本,中文版我们将尽快补充,感谢您的理解。

常见问题

When I built my Android application for release, an error occurred saying that some methods were not found. What should I do?

If you enable optimization (by setting minifyEnabled to true) when building your application, some code that is not called at the Java layer will be removed. However, such code may be called at the native layer, causing a no xxx method error.
To fix the issue, add the following keep rules to prevent the code from being removed:
-keep class com.tencent.xmagic.** { *;}
-keep class org.light.** { *;}
-keep class org.libpag.** { *;}
-keep class org.extra.** { *;}
-keep class com.gyailib.**{ *;}
-keep class com.tencent.cloud.iai.lib.** { *;}
-keep class com.tencent.beacon.** { *;}
-keep class com.tencent.qimei.** { *;}
-keep class androidx.exifinterface.** { *;}

What should I do if a GSON library conflict error occurs when I integrate the SDK into my host Android project?

Add the following code to the build.gradle file of the host project:
Android{
configurations {
all*.exclude group: 'com.google.code.gson'
}
}

What should I do if the SO libraries fail to be loaded when Android targetSdkVersion is 31 or larger?

When Android targetSdkVersion is 31 or larger, you need to open the AndroidManifest.xml file in app and add the following tag to application:
<uses-native-library
android:name="libOpenCL.so"
android:required="true" />
//`true` indicates that the library is a must for the application to run. The application cannot be installed on a system without the library.
//`false` indicates that the application can use the library if it is available, but can also run without it. It can be installed on a system without the library. If you set the parameter to `false`, you need to deal with the issues that may arise due to the absence of the library.
//Android website introduction: %!s(<nil>)
For more information, see <uses-native-library>.

If the texture passed when using beauty filters is a horizontal texture, how to solve it?

You can use the 'convert' method in the TextureConverter.java utility class in the demo to rotate the texture and convert it to portrait mode, and then pass it to the beauty SDK.
/**
* This method is used to rotate and mirror the RGBA texture. The process is to first rotate the texture Proceed in a clockwise direction. by 'rotation' degrees (which can take values of 0, 90, 180, 270), and then perform a horizontal flip (flipHorizontal) and a vertical flip (flipVertical)
* Use case: Some streaming SDKs return horizontal textures or the characters in the image are facing the wrong direction, while the SDK requires that the characters in the texture are facing forward. Therefore, this method can be used to convert the texture.
*
* @param srcID: The RGBA texture.
* @param width: The width of the texture.
* @param height: The height of the texture.
* @param rotation: The angle of rotation.
* @Returns: The rotated texture. Note: If rotated 90 or 270 degrees, the width needs to be swapped.
*/
public int convert(int srcID, int width, int height, @RotationDegreesValue int rotation, boolean flipVertical, boolean flipHorizontal)

If the texture passed when using beauty filters is an OES texture, how to solve it?

You can use the 'oes2Rgba' method in the TextureConverter.java utility class in the demo to convert the texture to an RGBA texture, and then pass it to the beauty SDK.
/**
* This method is used to convert an OES texture to an RGBA texture
*
* @param srcID: The OES texture.
* @param width: The width of the texture.
* @param height: The height of the texture.
* @Returns: The ID of the RGBA texture.
*/
public int oes2Rgba(int srcID, int width, int height)

What if I want to use another version of PAG? Supported by V3.5.0

When the client integrates the beauty filter SDK:
If integrated through Maven, sdk can be introduced via implement. If you does not wish to use this version of pag, it can be excluded through:
implementation ('com.tencent.mediacloud:TencentEffect_S1-04:version'){ exclude group: "com.tencent.tav", module: "libpag"
}
If manually integrated with the beautification SDK through download, the dependency on aar is without pag. you would still need to add a line in their app's build.gradle to implement pag for usage.
implementation 'com.tencent.tav:libpag:4.3.33-noffavc'
To dynamically download the .so libraries, you need to obtain them from the official download page and only integrate the .aar.
1.1 

What are the relationships between different effect properties?