Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1f25dcc

Browse files
committed
Fix invocation of mencoder.
This works on Ubuntu 12.04. If this keeps changing on a regular basis, we may need to further abstract the options. Let's hope it doesn't come to that.
1 parent badc008 commit 1f25dcc

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/matplotlib/animation.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,13 +403,16 @@ def _remap_metadata(self):
403403
@property
404404
def output_args(self):
405405
self._remap_metadata()
406-
args = ['-o', self.outfile, '-ovc', 'lavc', 'vcodec=%s' % self.codec]
406+
args = ['-o', self.outfile, '-ovc', 'lavc', '-lavcopts',
407+
'vcodec=%s' % self.codec]
407408
if self.bitrate > 0:
408409
args.append('vbitrate=%d' % self.bitrate)
409410
if self.extra_args:
410411
args.extend(self.extra_args)
411-
args.extend(['-info', ':'.join('%s=%s' % (k,v)
412-
for k,v in self.metadata.items() if k in self.allowed_metadata)])
412+
if self.metadata:
413+
args.extend(['-info', ':'.join('%s=%s' % (k,v)
414+
for k,v in self.metadata.items()
415+
if k in self.allowed_metadata)])
413416
return args
414417

415418

0 commit comments

Comments
 (0)