How to create video through an image sequence?

2

I want to create a video using a set of images of the same type and size.

I searched some examples but did not succeed in performing the algorithm. Of the examples, this link was the most complete:

link

However, the answer does not mention all .jar packages used, I searched for the ones that were missing on the internet but did not find the correct version.

I'm looking for an alternate form or solution for this example link.

    
asked by anonymous 05.08.2016 / 15:39

1 answer

2

Speak Cristian,

You can use the Android Animation function, for example:

Create an animation.xml file

<animation-list xmlns:android="http://schemas.android.com/apk/res/android"
    android:oneshot="false">
    <item android:drawable="@drawable/imagem1" android:duration="100"/>
    <item android:drawable="@drawable/imagem2" android:duration="100"/>
    <item android:drawable="@drawable/imagem3" android:duration="100"/>
    <item android:drawable="@drawable/imagem4" android:duration="100"/>
</animation-list>

Then you create an ImageView in your layout, for example:

<LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">

    <ImageView
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:id="@+id/animacao"/>

</LinearLayout>

Then you just instantiate in Java and call the animation, example:

ImageView imageView = (ImageView) findViewById(R.id.animacao);
imageView.setBackgroundResource(R.drawable.animacao);

AnimationDrawable animation = (AnimationDrawable) imageView.getBackground();
animation.start();

Will it work as if it were a video, would it solve your case?

Hugs.

    
05.08.2016 / 15:49