-1

When I try to use matplotlib's ``FFMpegWriter```.

import matplotlib.animation as animation
FFwriter = animation.FFMpegWriter(fps=10)
...
ani.save('./temp/animation.mp4', writer = FFwriter)

I get the following error

MovieWriter stderr:
[libopenh264 @ 0x55c2bfe39e40] Incorrect library version loaded
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
...
CalledProcessError: Command '['ffmpeg', '-f', 'rawvideo', '-vcodec', 'rawvideo', '-s', '640x480', '-pix_fmt', 'rgba', '-framerate', '20.0', '-loglevel', 'error', '-i', 'pipe:', '-vcodec', 'h264', '-pix_fmt', 'yuv420p', '-y', './temp/movie.mp4']' returned non-zero exit status 1

However, when I try to update ffmpeg with sudo apt-get install ffmpegI get the answer ffmpeg is already the newest version (7:5.1.2-3ubuntu1).

2
  • Check if ./temp folder exists. FFmpeg does not create directories for you. Commented Nov 5 at 16:36
  • [libopenh264 @ 0x55c2bfe39e40] Incorrect library version loaded -- at this point it's not a programming issue but a CLI issue because your code calls ffmpeg as a subprocess and that is having an issue with the DLL/SO of OpenH264 that it was given. contact the package maintainers of your distro. Commented Nov 5 at 22:47

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.