I want to record video by camera in my Android device. I need to add overlay image over recorded movie. In iOS I would use GPUImage. In Android I found Android GPUImage. I tried to use it but I didn't found any way to add any filter while video recording. In provided example I could add filters only for taking photos. Is there any ways to record video with filters with Android GPUImage? Is there any other ways to add images overlay over recording video in realtime? If not, is there any ways to add images overlay over recorded video in postprocessing?
Asked
Active
Viewed 4,971 times
5
-
If you want to add images in recorded video, there is a library call ffmpeg4android (http://androidwarzone.blogspot.com/2011/12/ffmpeg4android.html), which may help you to do this. Following, you can find all command syntax here https://www.ffmpeg.org/ffmpeg-all.html. Hope it is not too late – Luong Truong Jun 14 '16 at 09:34
2 Answers
0
You can add an overlay image on video using a blend filter.
About video recording: android-gpuimage library does not support it but you can try using the android-gpuimage-videorecording library. It is a fork of the gpu-image for android that provides also the video recording functionality
android-gpuimage-videorecording
see the GPUImageMovieWriter class
It should point you in the right direction for developing your own video writer on top of GPUImage.
The idea is to:
- draw on current screen surface
- switch to encoder input surface and draw previous frame buffer again on it
- switch back to screen surface
other useful links: EGL surface helper, Media encoder

cristallo
- 1,951
- 2
- 25
- 42
0
This project (MagicCamera) has many multiple input filters. You can write your own fragment shader to overlay an image on camera texture (similar to MagicN1977Filter). It also includes video recording.

hoangdado
- 436
- 4
- 13