4

I am struggling with recording and editing videos. For editing, I found a useful library in Android named ffmpeg4Android. However, I am still get stuck in recording video. Here is what I want:

1/ Add text or images in video while recording
2/ Add filter while recording video

I found there is a library GPUImage for Android but it has only some examples related to taking a photo, not to recording video)

Please let me know if you have any ways or any suggested libraries which can do it.

Thank you in advance!

Links which I read when researching:
Add overlay while record video on Android
How to Record video with GPUImage?
FFMpeg add text to actual video file after recording in Android

Community
  • 1
  • 1
Luong Truong
  • 1,953
  • 2
  • 27
  • 46
  • Possible duplicate of [how to add text to the video in android?](https://stackoverflow.com/questions/32641280/how-to-add-text-to-the-video-in-android) – Fattie Sep 22 '17 at 14:10
  • 2
    @Fattie: My question is not duplicate. I want to "add text to video WHILE recording". Your link is "add text AFTER recording". Thank you for helping me Fattie :) . – Luong Truong Oct 12 '17 at 14:10

1 Answers1

0

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

You cannot add text directly but you can add the text to the image writing on a canvas.

android-gpuimage library does not natively support video recording 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