Documentation
ExpressVideoSDK Video Call
Documentation
Demo APP
SDK Center
API Center
FAQ
Code Market
Console
Sign Up
Log In
中文站 English
  • Documentation
  • Video Call
  • Upgrade using advanced features
  • Advanced features
  • Configure the video
  • Improve your appearance in the video

Basic face beautification features

Last updated:2023-11-28 17:02

Introduction

ZEGO provides basic face beautification features such as skin tone enhancement, skin smoothing, cheek blusher, and image sharpening, which are commonly used in video calls and live streaming scenarios, making you look the way you want.

You can enable the basic face beautification features based on your needs and set the intensity as wanted.

The following table lists the browsers that support the face beautification feature:

Browser Supported version
Chrome 65 or later
Firefox 70 or later
Safari 12 ~ 14 and 15.2 or later
Edge 80 or later
Mobile browser Not supported

Prerequisites

Before you begin, make sure:

  • A project has been created in ZEGOCLOUD Console and applied for a valid AppID and AppSign. For details, please refer to Console - How to view project information .
  • ZEGO Express SDK has been integrated into the project to implement basic real-time audio and video functions. For details, please refer to Integrate the SDK and Implement a basic video call.

Implementation steps

  1. Call the createZegoStream method to create and obtain the media streams.
  2. Call the setEffectsBeauty method to enable the face beautification.
  3. Specify the parameters of the ZegoEffectsBeautyParam class to set the intensity as needed.
  • smoothIntensity: Skin smoothing. Smooth the skin while preserving details of the face, such as moles.
  • whitenIntensity: Skin tone enhancement. Turn up the overall brightness to whiten your face.
  • rosyIntensity: Cheek blusher. Carry on the warm color processing to the whole picture.
  • sharpenIntensity: Image sharpening. You can sharpen it slightly to make it clearer when the picture is a little blurry.

The value range for the four features is [0, 100], and the default value is 50. As this value gets larger, the intensity gets stronger.

  • To enable face beautification before the stream publishing, call the startPublishingStream method after the face beautification feature is enabled.
  • The face beautification effects are bound with the MediaStream, and the effects won't be affected when you call the useVideoDevice and replaceTrack methods.
  • The face beautification feature occupies and consumes resources, you will need to call the zg.setEffectsBeauty(localStream,false) method to disable it when you are done using it.
  • The SDK destroys the streams and disable the face beautification only when you call the destroyStream method. To just disable the face beautification, call the zg.setEffectsBeauty(localStream,false) method.
// After calling the createZegoStream method, you need to wait for the ZEGO server to return the local stream object before any further operation.
const localStream = await this.zg.createZegoStream();
const enable = true;
// Enable the face beautification.
await zg.setEffectsBeauty(
    localStream,
    enable,
    {
        sharpenIntensity: 50, 
        whitenIntensity: 50, 
        rosyIntensity: 50,
        smoothIntensity: 50
    }
)

// Start the stream publishing.
zg.startPublishingStream("stream1", localStream);

// Disable the face beautification. 
await zg.setEffectsBeauty(localStream, false);
Page Directory
  • Free trial
  • 提交工单
    咨询集成、功能及报价等问题
    电话咨询
    400 1006 604
    Get Consulting
    Scan Wechat QR code