Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7622443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:27:20+00:00 2026-05-31T04:27:20+00:00

When trying to run a simple animation example code in python, I am getting

  • 0

When trying to run a simple animation example code in python, I am getting an error which I am not able to resolve.

Traceback (most recent call last):
File "D:/CG/dynamic_image2.py", line 29, in <module>
    ani.save('dynamic_images.mp4')
File "C:\Python27\lib\site-packages\matplotlib\animation.py", line 127, in save
    self._make_movie(filename, fps, codec, frame_prefix)
File "C:\Python27\lib\site-packages\matplotlib\animation.py", line 164, in _make_movie
    stdout=PIPE, stderr=PIPE)
File "C:\Python27\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 893, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

I found similar situations (link1 , link2 ) but still I don’t know how to resolve mine…

I am using:
Python 2.7.2 |EPD 7.2-2 (32-bit)| (default, Sep 14 2011, 11:02:05) [MSC v.1500 32 bit (Intel)] on win32

I hope somebody can help me!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T04:27:21+00:00Added an answer on May 31, 2026 at 4:27 am

    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.

    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()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to run a simple multiple processes application in Python. The main
I am using Python 2.6 and am trying to run a simple random number
I'm trying to run a very simple 2D animation when I fling an image
I am trying to run simple perl dbi example script to connect to mysql
I'm trying run a simple Java/MySQL web app tutorial in NetBeans. I am able
I am trying to run simple code from examples: require.paths.unshift('/etc/npm'); // path to modules
I'm trying to run a simple Hibernate application, but I get this error: org.hibernate.exception.SQLGrammarException:
I'm trying to run a simple watiN example: search google then verify the search
I have a really simple custom animation that I am trying to run, and
I am trying to run simple Hello World but it gives this error.. Failed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.