web.dev icon indicating copy to clipboard operation
web.dev copied to clipboard

Add flags to the ffmpeg command for creating GIFs

Open blowery opened this issue 1 year ago • 3 comments

This adds flags to the ffmpeg command for creating an MP4 from a GIF that tag the output in the sYCC color space, which fixes the "washed out" colors and color shifts often reported when doing this conversion. Without the flags, browsers tend to interpret the colorspace incorrectly.

Note this currently does not affect Firefox, but does improve display in Chrome and Safari.

blowery avatar Aug 05 '22 21:08 blowery

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

google-cla[bot] avatar Aug 05 '22 21:08 google-cla[bot]

Hello! This is an automated review by our custom reviewbot. It updates automatically when code or GitHub comments in this pull request are created or updated.

Requested changes

If there are any common problems with the content files you created or modified, they will be listed here.

src/site/content/en/fast/replace-gifs-with-videos/index.md

  • This file passed all of our automated Markdown audits.

Hello! This is an automated review by our custom reviewbot. It updates automatically when code or GitHub comments in this pull request are created or updated.

Requested changes

If there are any common problems with the content files you created or modified, they will be listed here.

src/site/content/en/fast/replace-gifs-with-videos/index.md

  • This file passed all of our automated Markdown audits.

@matthiasrohmer After further testing, we (Tumblr) did find a problem with these flags: they don't appear to work for any browser on Windows, or Firefox on any platform. So, while I still think they're correct, I'm not sure if you want to take them for docs just yet?

Amazes me that it's 2022 and we're still dealing with colorspace issues, as an industry.

blowery avatar Aug 18 '22 11:08 blowery

Just verified this, the right one is a little more saturated in Chrome.

There's also a Digital Color Meter utility on macOS you can use to compare point values

blowery avatar Aug 18 '22 11:08 blowery

Oh, awesome! Thanks a lot for getting back on this, @blowery. Yes, then we better hold off from merging this and keep the universally working command for now. If you find a solution that works across browsers and platforms and has consistent colour representation we would really appreciate having this on web.dev. Until then, closing.

matthiasrohmer avatar Aug 18 '22 14:08 matthiasrohmer

If you find a solution that works across browsers and platforms and has consistent colour representation...

Sadly that's ... on the browsers, the OS and the video card folks. Maybe y'all can push on https://bugs.chromium.org/p/chromium/issues/detail?id=1229547&q=component%3AInternals%3EMedia%3EVideo%20color&can=2 a bit? :)

blowery avatar Aug 18 '22 18:08 blowery