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

Description

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.:

http://commons.wikimedia.org/wiki/File:Wikilovesart_tropenmuseum_interview.ogv

See a discussion about this subject here in the village pump on Commons:
http://commons.wikimedia.org/wiki/Commons:Village_pump/Archive/2009Aug#Changing_thumbnails_for_videos

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

{{FILEDEFAULTS:thumbtime=50}}


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=42632

Details

Reference
bz20647
bzimport raised the priority of this task from to Low.
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 Normal.
Jdlrobson moved this task from To Triage to Needs Analysis on the Readers-Web-Backlog board.
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

https://gerrit.wikimedia.org/r/436434

@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! https://gerrit.wikimedia.org/r/436434

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