Last modified: 2014-09-18 18:25:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T57941, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55941 - Expose media metadata consistently to API through query=imageinfo and/or query=videoinfo
Expose media metadata consistently to API through query=imageinfo and/or quer...
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
TimedMediaHandler (Other open bugs)
unspecified
All All
: Low enhancement (vote)
: ---
Assigned To: Michael Dale
https://commons.wikimedia.org/w/api.p...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-20 16:04 UTC by Brion Vibber
Modified: 2014-09-18 18:25 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Brion Vibber 2013-10-20 16:04:20 UTC
Currently there doesn't seem to be any consistent way to get the duration of a timed media file (such as video or audio), either through core query=imageinfo or TimedMediaHandler's modified query=videoinfo.

It looks like I can get the duration out of the metadata fields, but these are different for each format...

WebM has metadata entry 'playtime_seconds':
https://commons.wikimedia.org/w/api.php?action=query&titles=File:Fjordsteam.webm&prop=imageinfo&iiprop=url|size|mediatype|metadata&format=json

But Ogg has metadata entry 'length':
https://commons.wikimedia.org/w/api.php?action=query&titles=File:Folgers.ogv&prop=imageinfo&iiprop=url|size|mediatype|metadata&format=json

For now I can hardcode these two checks, but I'd much prefer a standard property on imageinfo.
Comment 1 Gerrit Notification Bot 2014-08-31 19:58:38 UTC
Change 157586 had a related patch set uploaded by Brian Wolff:
Add duration field in query=imageinfo&iiprop=dimensions

https://gerrit.wikimedia.org/r/157586
Comment 2 Gerrit Notification Bot 2014-09-18 17:46:51 UTC
Change 157586 merged by jenkins-bot:
Add duration field in query=imageinfo&iiprop=dimensions

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links