Page MenuHomePhabricator

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

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}}


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

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.

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?

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

Got sidetracked on a research project; continuing. :)

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

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.

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

Removing task assignee due to inactivity, as this open task has been assigned to the same person for more than two years (see the emails sent to the task assignee on Oct27 and Nov23). Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome.
(See https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator.)

At [[commons:Commons:Deletion requests/File:Why Can't You Download Videos on YouTube How a 20-Year-Old Law Stops youtube-dl Users AND Farmers.webm‎]], we have a case where the auto-selected image is a nonfree frame. It's likely de minimis within the video, but it's not appropriate as the default thumb. And if we blur/blank it out for stricter license compliance, then we have blurred or blank image as the default thumb.