I am attempting to save matplotlib animations to a movie via ffmpeg
on Ubuntu 12.04 LTS (32-bit Desktop). Following the matplotlib example, it fails to load the animation writer: AttributeError: 'module' object has no attribute 'writers'
(line 15 of the example):
import numpy as np
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import matplotlib.animation as animation
def update_line(num, data, line):
line.set_data(data[...,:num])
return line,
# Set up formatting for the movie files
Writer = animation.writers['ffmpeg']
Via apt-get
, I've tried installing ffmpeg, every codec imaginable, and even tried to compile ffmpeg from source. Nothing works.
How do I get matplotlib
to talk to ffmpeg on Ubuntu?