Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I had the same situation, but the sollution is simple if you just want to look at the animation. Your proglem is related to ani.save('dynamic_images.mp4'), which isn't needed for the animation itself. Just comment it out. Your code crashes due to lack of installed codec (most likely). animation.py contains the code below. If the argument codec to _make_movie is None, ffmpeg (google it) is used, then you need to have this one installed and available in your path. Otherwise you can use mencoder which also needs to be installed and in path.</p> <pre><code>def ffmpeg_cmd(self, fname, fps, codec, frame_prefix): # Returns the command line parameters for subprocess to use # ffmpeg to create a movie return ['ffmpeg', '-y', '-r', str(fps), '-b', '1800k', '-i', '%s%%04d.png' % frame_prefix, fname] def mencoder_cmd(self, fname, fps, codec, frame_prefix): # Returns the command line parameters for subprocess to use # mencoder to create a movie return ['mencoder', 'mf://%s*.png' % frame_prefix, '-mf', 'type=png:fps=%d' % fps, '-ovc', 'lavc', '-lavcopts', 'vcodec=%s' % codec, '-oac', 'copy', '-o', fname] def _make_movie(self, fname, fps, codec, frame_prefix, cmd_gen=None): # Uses subprocess to call the program for assembling frames into a # movie file. *cmd_gen* is a callable that generates the sequence # of command line arguments from a few configuration options. from subprocess import Popen, PIPE if cmd_gen is None: cmd_gen = self.ffmpeg_cmd command = cmd_gen(fname, fps, codec, frame_prefix) verbose.report('Animation._make_movie running command: %s'%' '.join(command)) proc = Popen(command, shell=False, stdout=PIPE, stderr=PIPE) proc.wait() </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload