Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

image to video conversion with transition effect

I am successfully able to convert a sequence of images into a video referring the link https://github.com/guardianproject/SSCVideoProto.

But now my requirement is to put some transition effects like fade in / fade out to be shown in video with the change of every image.

Is it possible to do using FFMPEG or should I use something else for that?

Refer ffmpeg convert a series of images to video - with crossfade or any other transition between every two frames

for more details.

Please direct me.

like image 465
Narendra Singh Avatar asked Nov 10 '12 07:11

Narendra Singh


1 Answers

Make a anim folder in res folder. Generate 2 xml files there named fadein and fadeout with following content.

fadein.xml

<?xml version="1.0" encoding="utf-8"?>
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
    android:interpolator="@android:anim/accelerate_interpolator"
    android:fromAlpha="0.0"
    android:toAlpha="1.0"
    android:duration="1000" />

fadeout.xml

<?xml version="1.0" encoding="utf-8"?>
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
    android:interpolator="@android:anim/decelerate_interpolator"
    android:zAdjustment="top"
    android:fromAlpha="1.0"
    android:toAlpha="0.0"
    android:duration="1000" />

then open your java files in which you want to use animation fadein and fadeout and put the following code in run method

public void run() {
                /* Create an intent that will start the main activity. */
                        Intent mainIntent = new Intent(javafile.this,
                        etcetc.class);
                        javafile.this.startActivity(mainIntent);


                /* Apply our splash exit (fade out) and main
                   entry (fade in) animation transitions. */
                overridePendingTransition(R.anim.fadein,
                        R.anim.fadeout);
        }
like image 73
Varun Vishnoi Avatar answered Nov 07 '22 19:11

Varun Vishnoi