|
21 | 21 | # * Need to consider event sources to allow clicking through multiple figures |
22 | 22 | import itertools |
23 | 23 | from matplotlib.cbook import iterable |
| 24 | +from matplotlib import verbose |
24 | 25 |
|
25 | 26 | class Animation(object): |
26 | 27 | ''' |
@@ -120,13 +121,15 @@ def save(self, filename, fps=5, codec='mpeg4', clear_temp=True, |
120 | 121 | self._draw_next_frame(data, blit=False) |
121 | 122 | fname = '%s%04d.png' % (frame_prefix, idx) |
122 | 123 | fnames.append(fname) |
| 124 | + verbose.report('Animation.save: saved frame %d to fname=%s'%(idx, fname), level='debug') |
123 | 125 | self._fig.savefig(fname) |
124 | 126 |
|
125 | 127 | self._make_movie(filename, fps, codec, frame_prefix) |
126 | 128 |
|
127 | 129 | #Delete temporary files |
128 | 130 | if clear_temp: |
129 | 131 | import os |
| 132 | + verbose.report('Animation.save: clearing temporary fnames=%s'%str(fnames), level='debug') |
130 | 133 | for fname in fnames: |
131 | 134 | os.remove(fname) |
132 | 135 |
|
@@ -155,7 +158,9 @@ def _make_movie(self, fname, fps, codec, frame_prefix, cmd_gen=None): |
155 | 158 | from subprocess import Popen, PIPE |
156 | 159 | if cmd_gen is None: |
157 | 160 | cmd_gen = self.ffmpeg_cmd |
158 | | - proc = Popen(cmd_gen(fname, fps, codec, frame_prefix), shell=False, |
| 161 | + command = cmd_gen(fname, fps, codec, frame_prefix) |
| 162 | + verbose.report('Animation._make_movie running command: %s'%' '.join(command)) |
| 163 | + proc = Popen(command, shell=False, |
159 | 164 | stdout=PIPE, stderr=PIPE) |
160 | 165 | proc.wait() |
161 | 166 |
|
|
0 commit comments