0

In CameraX version 1.3-beta01 there is the posibility of adding effects in video recording. Does anyone know how to add effects (using openGL I guess) using the 'CameraEffect' class?

I've trying to find tutorials or examples but I couldn't find any yet

Cheers!

Buntupana
  • 984
  • 1
  • 15
  • 33
  • 1
    Adding an effect with OpenGL might be hard. It also depends on the complexity of the effect itself. However, the CameraX team wants to at least make the simple things simple. I have a prototype that draws overlay into video using the Canvas API. We might turn this into a feature later but currently there is no ETA: https://android-review.googlesource.com/c/platform/frameworks/support/+/2650821 – Xi 张熹 Jul 17 '23 at 17:20
  • @Xi张熹 OpenGl or Vulkan is the recommended way according to documentation 'It's recommended to use graphics API such as OpenGL or Vulkan to access the Surface' – Buntupana Jul 24 '23 at 13:43
  • 1
    The CameraX is using OpenGL internally. But you are welcome to use Vulkan too. I understand OpenGL might be hard too. So we are working on a non-OpenGL solution. – Xi 张熹 Jul 24 '23 at 17:15
  • @Xi张熹 so there is no a relatively easy way to applie filter for videos in CameraX so far – Buntupana Jul 25 '23 at 13:58
  • Currently, no. We are working on a feature that allows you to draw the overlay with the Canvas API. But please be noted that this method is not performant. There is a trade-off between efficiency and simplicity. To edit a video stream efficiently, you need to do it with GPU which means OpenGL or Vulkan. None of them is simple. – Xi 张熹 Jul 25 '23 at 15:07

0 Answers0