简体   繁体   English

如何将ObjectAnimator动画制作成mp4视频?

[英]how to Ceate ObjectAnimator animation to mp4 Video?

I am trying to Create ObjectAnimator animation to m4 video . 我正在尝试为m4视频创建ObjectAnimator动画。
Anybody give me solution ? 有人给我解决办法吗?

ObjectAnimator animation CODE : ObjectAnimator动画代码:

 public void animation(){

    ObjectAnimator fadeOut = ObjectAnimator.ofFloat(aniView, "alpha", 0f);
    fadeOut.setDuration(1000);

    ObjectAnimator mover = ObjectAnimator.ofFloat(aniView, "translationY", -700f, 0f);
    mover.setDuration(1000);

    ObjectAnimator fadeIn = ObjectAnimator.ofFloat(aniView, "alpha", 0.8f, 1f);
    fadeIn.setDuration(1000);
    AnimatorSet animatorSet = new AnimatorSet();

    // animatorSet.play(mover).with(fadeIn).after(fadeOut);
    animatorSet.play(fadeOut).after(mover).with(fadeIn);
    animatorSet.start();
}

You can not create ObjectAnimator to video. 您不能为视频创建ObjectAnimator。 You can only animate View that will used to show the video. 您只能为将用于显示视频的View设置动画。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM