Video recording with GPUImage Android - android

I want to use GPUImage Android to process video in real time. I see example that creating pictures with different filters but I didnt find any example of recording video with filters. Is this possible with GPUImage Android?

android-gpuimage library does not 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

GPUVideo-android
I know GPUVideo-android. This library apply video filter on generate an Mp4 and on ExoPlayer video and Video Recording with Camera2.
Android MediaCodec API is used this library.
Let's try camera record , video preview and video generate.

Related

Is there a way of playing a video with a alpha channel on android?

I have a set of video animations with an alpha channel. I would like the user of the android app to record a video and play the animation that overlay the camera view at the same time. I have searched the Internet but didn't find any solution to achieve this. Have you any ideas of how that can be achieved?
For Preview:
You could try using opencv to read the video frame by frame and then overlay it with the camera frame and display it on a textureview.
[EDIT]: This doesn't work since opencv on android doesn't have the ability to extract frames from a video, as there is no native ffmpeg support.
For Recording:
You cannot record video this way and your best bet is to use ffmpeg to overlay the animation video on the recorded video.
Opencv4android: http://docs.opencv.org/2.4/doc/tutorials/introduction/android_binary_package/dev_with_OCV_on_Android.html
Read Video frame by frame: (http://answers.opencv.org/question/5768/how-can-i-get-one-single-frame-from-a-video-file/)
Blending frames on opencv: (http://docs.opencv.org/2.4/doc/tutorials/core/adding_images/adding_images.html)
FFFMPEG on Android: https://android-arsenal.com/details/1/931

Android - Add text or image while recording video?

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
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

How to Record video with GPUImage?

i used https://github.com/CyberAgent/android-gpuimage but its just save images.
how to record video using GLSurfaceview?
android-gpuimage library does not 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

Add overlay while record video on Android

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?
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
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.

Video processing with GPUImage Android

I want to use GPUImage Android to process video in real time. I see example that creating pictures with different filters but I didnt find any example of recording video with filters. Is this possible with GPUImage Android?
android-gpuimage library does not 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
GPUVideo-android
This library apply video filter on generate an Mp4 and on ExoPlayer video and Video Recording with Camera2.
Android MediaCodec API is used this library.
This library has many types of filters.
Filters link

Categories

Resources