Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android : Show quick preview (live) before exporting FFmpeg Video

Basically, I am developing a video editing app that lets the user choose some of their images and create a video slide show with music.

I am using FFMPEG to generate video slide show from images but the problem is I can only show the preview of the video after executing FFMPEG command.

Is googled so many blogs and all and I know there is a possible way available to display the preview of the output.

Check below image from reference app. I am developing something similar to this app. There is an option to replace the image in the video. This app displays instant preview once I change the image.

enter image description here

Here is the link of the reference app if anyone wants to check:

Clicking an EXPORT button this app lets you generate a video output. I can do that as I know FFMPEG and how to generate OUTPUT FILE using FFMPEG but what I don't know is how to display a quick preview of OUTPUT VIDEO before generating actual VIDEO FILE.

On my UBUNTU device, I can view the output of FFMPEG command using FFPLAY tool but how to do the same on android device.

Some useful link: http://androidwarzone.blogspot.com/2011/12/ffmpeg4android.html

like image 428
akash varlani Avatar asked Feb 06 '19 08:02

akash varlani


Video Answer


1 Answers

I installed the reference app, and it looks like they are not actually exporting video when showing preview.

After taking the image, they divide it into 16 parts and animating the image view and playing audio simultaneously

and when you click export then they are actually saving the video.

check this lib for image animation : https://github.com/flavioarfaria/KenBurnsView

or this one : https://github.com/florent37/ViewAnimator

like image 78
nkalra0123 Avatar answered Sep 28 '22 20:09

nkalra0123