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).
./tempfolder exists. FFmpeg does not create directories for you.[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.