Message Boards Message Boards

Slow down this animation, while exporting into a .mov file?

Posted 7 years ago

Hi, could you please help me out, i want to slow down this animation when i export it into a *.mov file. Regards

v = Manipulate[
  bas = Graphics3D[{Opacity[.1], Cylinder[{{0, 0, -1}, {0, 0, 1}}, 1],
      Opacity[.3], Cone[{{0, 0, -1}, {0, 0, 0}}], 
     EdgeForm[{Thick, Red}], Red, Cone[{{0, 0, 1}, {0, 0, 0}}]}, 
    ViewPoint -> {Pi, Pi/2, 2}, Boxed -> False, 
    AspectRatio -> Automatic, ImageSize -> 200];
  bas1 = Graphics3D[{Opacity[.1], 
     Cylinder[{{0, 0, -1}, {0, 0, 1}}, 1]}, 
    ViewPoint -> {Pi, Pi/2, 2}, Boxed -> False, 
    AspectRatio -> Automatic, ImageSize -> 200];
  b = Graphics3D[{Blue, 
     Table[Cylinder[{{0, 0, x}, {0, 0, x + 0.1}}, x], {x, 0, r, 
       0.1}]}, AspectRatio -> Automatic, ImageSize -> 200];
  a = Graphics3D[{Green, 
     Table[Cylinder[{{0, 0, x}, {0, 0, x + 0.1}}, Sqrt[1 - x^2]], {x, 
       0, r, 0.1}]}, ViewPoint -> {Pi, Pi/2, 2}, Boxed -> False, 
    AspectRatio -> Automatic, ImageSize -> 200];
  d = Table[
    Graphics[{Red, Disk[{0, 0}, {1, 1}], Blue, Disk[{0, 0}, {x, x}]}, 
     AspectRatio -> Automatic, ImageSize -> 130], {x, 0, r, 0.1}];
  c = Table[
    Graphics[{Green, Disk[{0, 0}, Sqrt[1 - x^2]]}, 
     AspectRatio -> Automatic, ImageSize -> 130, 
     PlotRange -> 1], {x, {r}}];
  Row[{Show[bas, b], Show[d], Show[c], Show[bas1, a]}], {r, 0, 0.9}]


Export["movie.mov", v]
Attachments:
POSTED BY: Muhammad Afzal
5 Replies

I reported this as a bug. Wolfram responded quickly said that the animation runs in the front end and not the kernel so Export does not have those frames -- it always generates a 4 second movie and exports that.

They said they filed a fix for this as a suggestion to the development team. He also suggested a workaround:

Generate the frames manually and export them as a movie:

In[62]:= time = 10; fps = 24; da = 0.1; a0 = da;
In[63]:= frames = Table[Plot[Sin[a x], {x, -Pi, Pi}, PlotRange -> {-Pi, Pi}], {a, a0, 0.1*time*fps, da}];
In[64]:= Export["test.mov", frames, "FrameRate" -> fps]

For your case, I would change back to Manipulate and do the following (using a much simpler Manipulate expression than yours):

maxManipulateValue = 30.0;
time = 10.0; fps = 24; da = maxManipulateValue/time/fps; a0 = da;
manipulateExpr[aa_ ] := Manipulate[u, {{u, aa}, 0, 30}] 
frames = Table[
   With[{aa = a}, manipulateExpr[aa] ], {a, a0, da*time*fps, da}];
Export["test.mov", frames, "FrameRate" -> fps, 
 "VideoEncoding" -> "Apple ProRes 422"]

With this structure you can specify your manipulation range, frames per second, and duration and get exactly that in your movie.

Regards

POSTED BY: Neil Singer

I never have used Export for this -- I use a screen capture program to export video either as a .mov or an animated gif (if I am posting it to this site)

The documentation for Exporting video is here. I tried changing the FrameRate and that did not work. Changing the VideoEncoding to something better (like Apple ProRes 422) makes a better video. However, I was not able to change the speed. You can experiment with the options or try GIF or one of the other video formats mentioned in the documentation.

Maybe someone else has done this before and can answer this...

Regards

POSTED BY: Neil Singer

Change your Manipulate to Animate and add AnimationRate -> 0.1 at the end

Regards

POSTED BY: Neil Singer
Posted 7 years ago

Thank you very much Neil :)

POSTED BY: Muhammad Afzal
Posted 7 years ago

Hi Neil, I've converted manipulate into animate and set the animation rate to 0.1. now it's working perfectly fine in mathematica, but when i export that animation into a .MOV file it is still very fast. Could you please help me out with this? I'm attaching the mov file and nb file.

Attachments:
POSTED BY: Muhammad Afzal
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract