26

I am exporting an animation created using Manipulate in the .avi format. However the video runs very fast (I am putting it in Keynote). Its speed seems independent of how small I choose the step in Manipulate. Is there a way to control how fast the .avi will run or some other way to show the animation slower?

rm -rf
  • 88,781
  • 21
  • 293
  • 472
BeauGeste
  • 2,815
  • 2
  • 29
  • 32

4 Answers4

29

The trick is using a combination of "FrameRate", an option of Export, and AutorunSequencing, an option of Manipulate. The former determines the number of frames/second of the movie whereas the latter determines how long a sweep of the control takes. With one control, that will be the length of the movie.

Export["output.avi", 
 Manipulate[
   Plot[Sin[k  x], {x, 0, 2 \[Pi]}], 
   {k, 1, 5}, 
   AutorunSequencing -> {{1, 10}}
 ], "FrameRate" -> 2
]

enter image description here

Sjoerd C. de Vries
  • 65,815
  • 14
  • 188
  • 323
9

The option you need is "FrameRate". It's not even necessary to create a list of graphics objects first, as per Sjored's answer.

Ajasja
  • 13,634
  • 2
  • 46
  • 104
5

I've found that giving the option "AnimationDuration"-> (seconds) in the Export function gives better results generally.

RationalAsh
  • 71
  • 1
  • 4
1

You can use AnimationDuration to control this and a good FrameRate to make the transition smoother.

Export["output.avi", 
 Manipulate[Plot[Sin[k x], {x, 0, 2 \[Pi]}], {k, 1, 5}, 
  AutorunSequencing -> {{1, 10}}], "FrameRate" -> 25, 
 "AnimationDuration" -> 15]

Video in: Animation Video

Héc JR
  • 11
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. – Community Mar 15 '22 at 01:52