Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a huge simulation and tried to export it as a video file (or .gif). However regardlessly what I specify under the Framerate option the video its just running for 4 seconds (too fast). When I set the framerate to one the video just consists of one picture and if I set it to 100 the video is fluid but still only 4 seconds long. Do I have to set another flag in the animation? While trying to present you some working example I came up with the following short lines:

data = Import["", {"Data", All, {2, 3}}];
      ImageSize -> {500, 200}, PlotRange -> {{0, 100}, {-5, 5}}, 
       Axes -> True], {t, Range[1, 1000]}, AnimationRate -> 1, 
       AnimationRunning -> False]

Export["", %, "FrameRate" -> 25]

So I thought that with setting the animation rate to 1 and the framerate to 25 I would get a 1000/25=40 seconds long video. Why is that not happening? Do I have to specify my frames somehow?

share|improve this question
I wouldn't export animate, but just the list of frames. In other words, just replace Animate with Table, and remove the animate options. You can then export the list of frames as you do above – lalmei Jun 10 '14 at 13:03
up vote 4 down vote accepted

Might as well write my comment as an answer.

Exporting a list of frames as a movie usually gives you much more control on the smoothness of the animation you are making.
since you have 1000 frames, if we export 1000 frames as a 25 fps, we get a 40 second movie.

   data = Import[
       "", {"Data", All, {2, 3}}];
   mymov = Table[
        Graphics[Circle[data[[t]]], ImageSize -> {500, 200}, 
        PlotRange -> {{0, 100}, {-5, 5}}, Axes -> True], {t, 
         Range[1, 1000]}];
   Export["", mymov, "FrameRate" -> 25]

enter image description here

share|improve this answer
Yes this is exactly what I was aiming for. Thank you! – user3683367 Jun 10 '14 at 13:21
Also I tend to use ListAnimate instead of Animate in the same way, it allows me to render the images first, in cases there is a mistake or error so I don't get stuck in an animate loop. – lalmei Jun 11 '14 at 15:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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