Does CameraXViewfinder version 1.5.0-rc01 support OverlayEffect?

48 views
Skip to first unread message
Assigned to scot...@google.com by tah...@google.com

Tobias Tharaldsen

unread,
Aug 21, 2025, 8:56:13 AMAug 21
to Android CameraX Discussion Group
Hello. I've been trying to add an overlay to a video as well as showing it in the preview (CameraXViewfinder), but can't seem to figure out how to map all the values correctly. 

Can someone please confirm if it is implemented/supported in CameraX/viewfinder 1.5.0-rc01, and maybe also provide a code snippet/link of how to get started?

This helped me a lot to understand how to do it with PreviewView, but I can't find much about how to do it using the new (not yet fully stable) CameraXViewfinder.

Tahsin Masrur

unread,
Aug 24, 2025, 11:41:41 PM (11 days ago) Aug 24
to Android CameraX Discussion Group, tobb...@gmail.com
Hi,

Here's a quick sample app that uses both the CameraXViewfinder and an OverlayEffect (that applies green rectangle around QR codes on both preview and video). I have also attached a recording here to show a quick demo.

For a bit more details, the app is made based on this Medium blog post about CameraX with Compose and the OverlayEffect section of this CameraX 1.4 release blog post.

Feel free to let us know if you experience any issue or have some confusion with your specific use case.

CameraXViewfinder-OverlayEffect-Demo.mov

Tobias Tharaldsen

unread,
Aug 25, 2025, 4:51:50 AM (11 days ago) Aug 25
to Android CameraX Discussion Group, tah...@google.com, Tobias Tharaldsen
Thank you! I accidentally replied using "reply to author" option on my previously reply, so I'll add another public reply.

The sample app works very well and is a good source to look at, however my app uses a watermark that consists of text, which the sample app is not currently built for.

I think I'm on my way to find a solution which is very similar to this, and so far my testing seems to work well for getting correct rotation and coordinates.

Reply all
Reply to author
Forward
0 new messages