New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve compatibility for h264 ffmpeg-encoded videos. #5340
Conversation
We probably should also test Chrome and Linux (in combinations with what you already tested). Can you link to a file produced by this and/or a script to easily recreate one? |
To be clear, Chrome was already working (at least on OSX and Win); it just turned out that none of the others worked. Here's an HTML page with a video embedded, as well as the same animation as an m4v. test.m4v | uploaded via ZenHub test.html | uploaded via ZenHub I just modded |
# as well as HTML5 video in firefox and safari (on both Win and OSX). | ||
# Also fixes internet explorer. This is as of 2015/10/29. | ||
if self.codec == 'h264': | ||
args.extend(['-pix_fmt', 'yuv420p']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably check that this isn't already in self.extra_args
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch.
fa12034
to
e4d149b
Compare
@@ -405,6 +405,12 @@ def output_args(self): | |||
# The %dk adds 'k' as a suffix so that ffmpeg treats our bitrate as in | |||
# kbps | |||
args = ['-vcodec', self.codec] | |||
# For h264, the default format is yuv444, which is not compatible with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, super picky, the default format is 'yuv444p'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Easy enough to update.
Default pixel format of yuv444p is, apparently, not widely supported. Changing to yuv420p fixes playback with Quicktime, on iOS, and with a wide array of browsers (for HTML5 video).
e4d149b
to
5999a27
Compare
MNT: Improve compatibility for h264 ffmpeg-encoded videos.
I am 50/50 on back-porting this for 1.5. |
It's low risk, and I'd consider the fact that the HTML5 videos generated in 1.5 currently only work on Chrome a bug. |
Improve compatibility for h264 ffmpeg-encoded videos. (Backport #5340)
Default pixel format of yuv444 is, apparently, not widely supported.
Changing to yuv420p fixes playback with Quicktime, on iOS, and with a
wide array of browsers (for HTML5 video).