Page MenuHomePhabricator

prop=videoinfo API derivative data formatting inconsistent in JSON
Closed, ResolvedPublic

Description

Testing prop=videoinfo for fetching derivative data:

https://commons.wikimedia.org/w/api.php?action=query&titles=File:Folgers.ogv&prop=videoinfo&viprop=derivatives&format=jsonfm

"derivatives": [
    {
        "src": "https://upload.wikimedia.org/wikipedia/commons/9/94/Folgers.ogv",
        "type": "video/ogg; codecs=\"theora, vorbis\"",
        "title": "Original Ogg file, 352 \u00d7 264 (637 kbps)",
        "shorttitle": "Ogg source",
        "width": "352",
        "height": "264",
        "bandwidth": 636645,
        "framerate": 29.97002997003
    },
    {
        "src": "https://upload.wikimedia.org/wikipedia/commons/transcoded/9/94/Folgers.ogv/Folgers.ogv.360p.webm",
        "title": "Web streamable WebM (360P)",
        "type": "video/webm; codecs=\"vp8, vorbis\"",
        "shorttitle": "WebM 360P",
        "transcodekey": "360p.webm",
        "width": 352,
        "height": 264,
        "bandwidth": "574352",
        "framerate": 29.97002997003
    }

The 'width', 'height', and 'bandwidth' parameters variously appear as integers or strings... They should be consistently raw integers, so non-PHP clients don't have to explicitly coerce the type.


Version: unspecified
Severity: minor
URL: https://commons.wikimedia.org/w/api.php?action=query&titles=File:Folgers.ogv&prop=videoinfo&viprop=derivatives&format=jsonfm

Details

Reference
bz55742

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:36 AM
bzimport set Reference to bz55742.
brion created this task.Oct 15 2013, 3:43 PM

Change 89846 had a related patch set uploaded by Brion VIBBER:
bug 55742: fix types in JSON videoinfo output

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

Change 89846 had a related patch set uploaded by Brian Wolff:
Fix types in JSON videoinfo output

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

Change 89846 merged by jenkins-bot:
Fix types in JSON videoinfo output

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

Gilles raised the priority of this task from Medium to Unbreak Now!.Dec 4 2014, 10:11 AM
Gilles moved this task from Untriaged to Done on the Multimedia board.
Gilles lowered the priority of this task from Unbreak Now! to Medium.Dec 4 2014, 11:20 AM