Integrating DeepAR with LiveKit Android SDK: Custom Video Capturer issue (Camera track not publishing / showing)

Hi everyone,
I am currently working on an Android live streaming application using Jetpack Compose, LiveKit Android SDK, and DeepAR.

I’m trying to implement a custom video capturer to apply DeepAR beauty filters/masks to the camera stream before publishing it to the LiveKit room, but the video track is either failing to render or not showing up for remote/local participants.

Here is a brief overview of my current implementation:

  1. Custom Video Capturer: I created a DeepARVideoCapturer implementing LiveKit’s VideoCapturer interface, where DeepAR renders frames into the WebRTC surface texture helper.

  2. Initialization: DeepAR is initialized successfully (deepAR.initialize), and the filter effect is loaded using deepAR.switchEffect("mask", effectPath).

  3. Publishing: I create a local video track using the custom capturer and publish it via room.localParticipant.publishVideoTrack(localVideoTrack).

The Problem: Despite the room successfully connecting and permissions (canPublish: true) being granted, the video track fails to show up or throws publishing issues when bound in Jetpack Compose (RoomScope with video = true).

Has anyone successfully integrated DeepAR as a custom video source/capturer with the LiveKit Android SDK? Could anyone share a working approach or point out what might be missing in handling the SurfaceTexture / VideoCapturer pipeline between DeepAR and LiveKit?

Any code snippets or guidance would be greatly appreciated. Thank you!