https://bugzilla.wikimedia.org/show_bug.cgi?id=55941

       Web browser: ---
            Bug ID: 55941
           Summary: Expose media metadata consistently through
                    query=imageinfo and/or query=videoinfo
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
               URL: https://commons.wikimedia.org/w/api.php?action=query&t
                    itles=File:Folgers.ogv&prop=imageinfo&iiprop=url|size|
                    mediatype|metadata&format=json
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: Unprioritized
         Component: TimedMediaHandler
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected]
    Classification: Unclassified
   Mobile Platform: ---

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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to