Skip to main content
SDK 2.0.0. Auth details: Auth & License.

Return values

Most setters return int: BeautyEffectEngine::Create() returns std::shared_ptr; failure is nullptr. ProcessImage may return nullptr on failure.

Engine events

Register on_engine_event after Create. Codes: The message string has extra detail on failures.

Common failures

1. Create returns nullptr

Typical causes:
  • resource_path is a directory, missing, or not the resource.fbd file
  • Invalid / inactive app_id + app_key, or bad license_token
  • facebetter.dll missing or mismatched with facebetter.lib
  • Online auth cannot reach /facebetter/v2/auth
Enable logs before Create:

2. facebetter.dll not found

Windows shows a dialog if the DLL is not on the loader path.
Or rebuild so CMake copies it next to the executable.

3. ProcessImage returns nullptr

Check the input frame, engine pointer, and logs (-7 process / -8 OOM on setters).

4. Effects look unchanged

2.0 does not use SetBeautyTypeEnabled. Effects are off at intensity 0. Reshape / makeup also need a detected face.

5. OpenGL / display

GLFW or gladLoadGLLoader can fail on outdated drivers, VMs, or Remote Desktop without GPU.
If your app already owns the GL context, set EngineConfig::external_context = true and call ProcessImage on that thread.

Debug logs

The file is written relative to the current working directory unless you pass an absolute file_name.