Add overlay when recording video on Android

I want to record video from a camera on my Android device. I need to add an overlay image for the recorded video. In iOS, I would use GPUImage . In Android, I found Android GPUImage . I tried using it, but I did not find a way to add any filter during the video recording. In the above example, I could add filters only for photos. Are there any ways to record video with filters with Android GPUImage ? Are there other ways to add overlay images over real-time video? If not, are there any ways to add overlay images on top of the recorded video in post-processing?

+3
source share
2 answers

You can add an overlay image to the video using a blend filter.

About video recording: the android-gpuimage library does not support it, but you can try using the android-gpuimage video library. This is the gpu image fork for android, which also provides video recording function

android-gpuimage-videorecording

see class GPUImageMovieWriter

It should point you in the right direction to develop your own videos on top of GPUImage.

The idea is as follows:

  • draw the current surface of the screen.
  • switch to the input surface of the encoder and draw the buffer of the previous frame again
  • return to the screen surface.

Other useful links: EGL Surface Assistant , Media Encoder

0

(MagicCamera) . , ( MagicN1977Filter). .

0

All Articles