Docs / How video calls work

How video calls work

Facevity processes the outgoing camera track, so the local preview and every remote participant receive the beautified video. The same model applies to every platform and RTC SDK.

Where Facevity sits

Facevity goes between the camera capturer and the encoder of the local track. Everything downstream, the local preview and what remote participants receive, is the processed frame. None of the hooks in these guides process only the local preview.

camera ─► capturer ─► [ Facevity ] ─► video source / encoder ─► network ─► remote participants
                           │
                           └─► local preview (mirrored by the renderer for the front camera)

Hooks per platform

Agora ZEGOCLOUD LiveKit WebRTC
Android IVideoFrameObserver, I420, post-capturer custom video processing, GL_TEXTURE_2D camera track VideoProcessor VideoProcessor, OES texture or I420
iOS AgoraVideoFrameDelegate, CVPixelBuffer, post-capture custom video processing, CVPixelBuffer VideoProcessor on the camera track RTCVideoCapturerDelegate wrapper
Web createCustomVideoTrack custom video source FacevityTrackProcessor replaceWithProcessedTrack
Flutter fv.rtc.agora (native frame observer) fv.rtc.zego fv.rtc.livekit fv.rtc.webrtc (flutter_webrtc)
React Native fv.rtc.agora (native frame observer) fv.rtc.zego fv.rtc.livekit fv.rtc.webrtc (react-native-webrtc)

On Flutter and React Native the RTC SDKs capture and encode natively, so Facevity attaches natively too. Dart or JavaScript makes one attach call; no frame crosses the platform channel or the bridge.

Rules for every SDK

Topic Rule
Timestamps Pass the capture timestamp through unchanged. The engine never re-times frames.
Rotation Pass the frame’s rotation (degrees clockwise to upright). The output keeps the input orientation, and the RTC SDK applies its rotation metadata as before.
Mirroring Never mirror the published frame; mirror only the local preview renderer.
Formats Android: OES or 2D texture in, 2D texture out; or NV21, NV12, I420 buffers in place. iOS: CVPixelBuffer (BGRA, NV12) in place, Metal textures, or NV21, NV12, I420 bytes. Web: MediaStreamTrack or VideoFrame.
Backpressure A frame is never queued. If the GPU is busy or the frame budget is missed, the frame goes out as it is (Android buffer path: the last retouched frame is repeated for up to 250 ms, so the effect does not flicker). The camera is never blocked.
Threads Android texture frames: on the SDK’s GL thread. Buffer and pixel-buffer frames: any thread.
Cost when off isActive is false when beauty is off or every level is zero. Skip conversions entirely.
One camera owner During a call show the RTC SDK’s own local view. On Flutter and React Native do not open FacevityPreview or <FacevityCameraView> at the same time: most devices give the camera to one client only.

Licence features for calls

Texture and pixel-buffer hooks need only the beauty features. The YUV buffer hooks (Android Agora I420, the Agora hooks of the Flutter plugin and the React Native module, flutter_webrtc non-camera frames) also need buffer.path. Trial licences include it. See Licensing.

Other SDKs

Any SDK that lets you modify captured frames before encoding works the same way: find the post-capture hook, pass the frame’s texture or buffer to Facevity with its rotation and timestamp, and hand the result back. If you’re unsure where the hook is in your stack, ask us.

Need help with an integration? Contact the Facevity team. We answer integration questions during trials.