Page MenuHomePhabricator

Convert animated images (animated GIF, APNG) to HTML5 video
Open, LowPublic

Description

Feature summary
Converting animated images to videos came up in a number of discussions (e.g. T85838, T85840, T101644) so let's have a dedicated place for discussion.

As a reader of Wikipedia (and other Wikimedia projects) I want to be able to quickly load an article that contains a .GIF animation. These animations can be relatively large. Sometimes making up more than 50% of the page load.

For example, the English Wikipedia article on the Internal combustion engine is 6.23MB when fully loaded in a web browser. 3.78MB of that size (more than half!) is this single embedded GIF. Converting that GIF to a webm file results in an animation of the same quality at 182KB.

Given that webm is supported in many browsers, but not all, there would potentially need to be some fallback to GIF files.

Additionally, this would allow the user to have browser-native media controls to manage playback (such as pausing the animation).

Use case(s)
Any wiki page that has an embedded GIF or APNG animation.

Benefits

  • Readers of Wikimedia projects use less data to read articles that contain gif animations. HTML5 videos tend to be much smaller (Gfycat shows original and converted sizes for popular animated gifs, typically there is an 5x-20x size reduction)
  • ability to control playback of animation: pause (T85838) / start in a paused state (T85840)
  • streaming
  • there are a number of low-level optimizations that probably won't happen for images (streaming, hardware acceleration)

The disadvantage is of course the lack of browser support (although still better than APNG - WebM support, APNG support).

ffmpeg can do the conversion.

Event Timeline

Tgr raised the priority of this task from to Needs Triage.
Tgr updated the task description. (Show Details)
Tgr subscribed.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Are current support for video gives a rather poor user experiance imo. I think we should fix that first.

Ckoerner renamed this task from Convert animated images (animGIF, APNG) to HTML5 video to Convert animated images (animated GIF, APNG) to HTML5 video.Jun 3 2022, 5:02 PM
Ckoerner updated the task description. (Show Details)

I updated the task description to follow the "feature request" format. I ended up here after coming across another Wikipedia article where a well-meaning editor added a single "small" GIF file to help illustrate a point. The size of the article was doubled by a single 421 × 237 GIF.