Page MenuHomePhabricator

Allow way to choose thumbnail frame for video on its File: description page
Open, LowPublic


When uploading a video file (for example to Wikimedia Commons) a thumbnail for the media detail page is automatically generated, apparently somewhere around the middle of the movie. In some cases it would be very welcome if a possibility would exists to change the thumbnail, e.g.:

See a discussion about this subject here in the village pump on Commons:

One suggestion is to add a special keyword to the page to change the thumbnail moment, e.g.:


See Also:
T44632: Ability to specify default page of multi-paged media
T225593: Allow defining a specific frame for video file thumbnail, on demand (via the "thumbtime" parameter)

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:50 PM
bzimport set Reference to bz20647.
bzimport added a subscriber: Unknown Object (MLST).
Husky created this task.Sep 14 2009, 10:30 PM

Clarified summary.

Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 6:15 PM
Restricted Application added subscribers: Steinsplitter, Matanya, Aklapper. · View Herald TranscriptSep 4 2015, 6:15 PM
Restricted Application added a project: Commons. · View Herald TranscriptApr 20 2016, 10:52 AM
brion added a comment.Apr 25 2018, 6:35 PM

There's interest in this again due to T92457 -- PageImages sometimes selects a video that's listed prominently, and it'd be easy for everyone if the default thumbnail could be set nicely.

Note this needs to work across foreign repos for Commons and such.

Jdlrobson raised the priority of this task from Low to Medium.Apr 25 2018, 6:40 PM
Jdlrobson added a project: Readers-Web-Backlog.
Jdlrobson moved this task from Incoming to Needs Prioritization on the Readers-Web-Backlog board.
Jdlrobson added a subscriber: Tgr.Apr 25 2018, 6:42 PM
brion added a comment.Apr 25 2018, 6:45 PM

A parser function that sets a page prop with the target time should be fairly easy to create on the backend, with prettier UX for setting it via GUI something to consider as an alternative or future addition.

Cross-site considerations, however:

  • if just in the page prop, it won't be visible to a Handler on a foreign wiki (eg, enwiki vs file+file page on commons).
  • -> so could instead save into the file's metadata, which gets exported via both local foreign repos (WMF sites) and API repos (InstantCommons)
  • Probably should save into page props *and* reflect into the metadata? Or is that redundant...

Handler transforms then only need to pull the default time from the metadata, which they already receive...

Thumbs using the default -- in place of the -seek=60- or whatever in their filenames, however, will go to thumbor in production instead of to MediaWiki, and will not see the default. I think this is not a problem however -- we only need to apply the default at transform generation time, so we'll be producing a distinct URL with the exact time.

Another consideration is cache invalidation -- when changing the metadata we must invalidate cache usages of the file as well as the page.

Who maintains this extension or knows enough about how it works to help set this up?

brion added a comment.May 3 2018, 8:07 PM

For TimedMediaHandler that'd be me -- I'll do a spike on this tomorrow. :)

brion claimed this task.May 3 2018, 8:07 PM
gpaumier removed a subscriber: gpaumier.May 3 2018, 8:19 PM
brion added a comment.May 25 2018, 4:18 PM

Got sidetracked on a research project; continuing. :)

brion added a comment.May 25 2018, 4:54 PM

Unblocked, got a patch for that. :D Will poke further along today.

Is there a patch I can help review?

Change 436434 had a related patch set uploaded (by Brion VIBBER; owner: Brion VIBBER):
[mediawiki/extensions/TimedMediaHandler@master] DO NOT MERGE - WIP - Thumbtime parser function for TMH

@Jdlrobson I just uploaded my current version of it. I've got the parser function & page prop working, but trying to shove it into the extended file metadata may be a mistake. Currently it fails in concert with CommonsMetadata extension. I'll see if there's a saner way to do this tomorrow. :D Feel free to take a peek!

@brion just to note this is on my radar but annual reviews are taking up all my time right now :)

Aklapper lowered the priority of this task from Medium to Low.Jun 12 2019, 10:31 AM
Aklapper updated the task description. (Show Details)
Aklapper removed a subscriber: wikibugs-l-list.
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptJun 12 2019, 10:31 AM

What's the state of the associated patch @brion ?

Jdlrobson moved this task from Inbox to Tracking on the User-Jdlrobson board.Mar 2 2020, 10:48 PM
Ainali added a subscriber: Ainali.Jul 9 2020, 6:55 AM