3
$\begingroup$

Here's my code:

movie = Animate[
  Plot[x + a, {x, 0, 1}, AxesOrigin -> {0, 0}], {a, 1, 5}, 
  AnimationDirection -> Forward, AnimationRepetitions -> 1, 
  AnimationRunning -> False]
Export["movie.avi", movie]

In the video in the Mathematica window, the sweep of the parameter 'a' goes from 1 to 5, and there's a single sweep. However, in the exported video, it appears a double sweep: from 1 to 5 and then is reversed, from 5 to 1. How to avoid this?? How to obtain a video with the exact animation shown in the Mathematica window??

Thank you!!! :-)

Daniel

$\endgroup$

1 Answer 1

2
$\begingroup$

I agree that this is unexpected. I was able to reproduce the problem in MMA 10.1 on Win7-64bit. This looks like a bug within Export to me, which I think you should report to WRI.

In the meantime, you can generate the frames yourself, then use ListAnimate to generate a movie for export with the same format (controls, panes) that you would get from Animate:

frames = Table[
               Plot[x + a, {x, 0, 1}, AxesOrigin -> {0, 0}, PlotRange -> {0, 7}], 
               {a, 1, 5, 0.1}
           ];
movielist = ListAnimate[frames, AnimationDirection -> Forward, AnimationRepetitions -> 1];
Export["movielist.avi", movielist]
$\endgroup$
2
  • $\begingroup$ Thank you MarcoB for your answer... Finally I did it like you suggested, and I saw in the forums that this is the best solution when exporting videos! $\endgroup$ Commented Jul 1, 2015 at 16:21
  • $\begingroup$ @cricricombowino If you think that my answer above is an acceptable solution to your problem, would you consider formally accepting it by clicking on the grey checkmark next to it? $\endgroup$
    – MarcoB
    Commented Jul 13, 2015 at 18:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.