Page MenuHomePhabricator

Add VideoObject JSON-LD to video File pages
Open, MediumPublic

Description

Similar to how is done for Images on File description pages, we want to add VideoObject JSON-LD descriptions to videos, in order to provide additional metadata information to Google, especially wrt content licensing.

While WikibaseMediaInfo is generating a VideoObject on video pages, in a link tag rather than a script tag. But it contains none of the three properties required by Google, namely name, thumbnailUrl and uploadDate. It also seems that Google doesn't actually detect JSON-LD via links, only via inline script tags.

CommonsMetadata currently implements the ImageObject generation for image File pages.

Google annotation criteria
https://developers.google.com/search/docs/appearance/video
https://developers.google.com/search/docs/appearance/structured-data/video#video-object
https://developers.google.com/search/docs/crawling-indexing/sitemaps/video-sitemaps
https://ogp.me/#type_video

Note: Google detects two videos on each page, because the file history thumbnail counts as a video. Some have non-canonical URLs, despite the rel=canonical tag being present in the crawled HTML. Some of them are not even videos, like this image of an S-Video socket.

Details