10

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.

Community
  • 1
  • 1
Narendra Singh
  • 3,990
  • 5
  • 37
  • 78
  • 1
    I am also searching about image to video conversion. I have reviewed and tried the sample which you have provided above. but it shows the video capture process from camera. But unable to convert list of images to video .. So can you please advice me to convert it . . – itsrajesh4uguys Nov 14 '12 at 08:46

1 Answers1

2

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);
        }
Varun Vishnoi
  • 980
  • 1
  • 9
  • 32