11

リンクhttps://github.com/guardianproject/SSCVideoProtoを参照して、一連の画像をビデオに変換することに成功しました。

しかし今、私の要件は、フェードイン/フェードアウトなどのトランジション効果を、すべての画像の変化とともにビデオに表示することです。

FFMPEGを使用することは可能ですか、それとも何か他のものを使用する必要がありますか?

ffmpegを参照 して、一連の画像をビデオに変換します-クロスフェードまたは2フレームごとのその他のトランジションを使用

詳細については。

私に指示してください。

4

1 に答える 1

2

resフォルダにanimフォルダを作ります。次の内容で、fadein と fadeout という名前の 2 つの xml ファイルを生成します。

フェードイン.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" />

フェードアウト.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" />

次に、アニメーションのフェードインとフェードアウトを使用する Java ファイルを開き、run メソッドに次のコードを追加します。

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);
        }
于 2012-11-10T07:22:29.617 に答える