I am using ubuntu 14.04, and have anaconda python installed. I used conda install opencv and conda install cv2 to install opencv. However I am unable to use the VideoCapture
I found another way to get the video writer to work. I actually installed ImageMagik on my computer, and then I set the animation path to where I installed ImageMagik. I wonder if the same could be done for ffmpeg?
plt.rcParams["animation.convert_path"] = "C:\ProgramFiles\ImageMagick\magick.exe"
#Here I am loading a matplotlib.plot as the animation, so it could be different than for you, but the point is that by specifying the path to imagemagik I was able to write a video to a file.
anim = animation.FuncAnimation(fig, animate, frames=len(mylist), init_func=init, interval=300, blit=True)
anim.save('output.gif', dpi=80, writer='imagemagik')