Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 87f5b45

Browse filesBrowse files
committed
Merge pull request #5345 from dopplershift/h264-1.5.x
Improve compatibility for h264 ffmpeg-encoded videos. (Backport #5340)
2 parents 3c5d20d + 50b5db8 commit 87f5b45
Copy full SHA for 87f5b45

File tree

Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-0
lines changed

‎lib/matplotlib/animation.py

Copy file name to clipboardExpand all lines: lib/matplotlib/animation.py
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,12 @@ def output_args(self):
405405
# The %dk adds 'k' as a suffix so that ffmpeg treats our bitrate as in
406406
# kbps
407407
args = ['-vcodec', self.codec]
408+
# For h264, the default format is yuv444p, which is not compatible
409+
# with quicktime (and others). Specifying yuv420p fixes playback on
410+
# iOS,as well as HTML5 video in firefox and safari (on both Win and
411+
# OSX). Also fixes internet explorer. This is as of 2015/10/29.
412+
if self.codec == 'h264' and '-pix_fmt' not in self.extra_args:
413+
args.extend(['-pix_fmt', 'yuv420p'])
408414
if self.bitrate > 0:
409415
args.extend(['-b', '%dk' % self.bitrate])
410416
if self.extra_args:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.