Page MenuHomePhabricator

Expose file sizes of transcoded assets in API
Open, LowPublic

Description

API results for transcodestatus and videoinfo don't include the file size of the transcoded assets -- though this can be estimated from the content duration (see bug 55941 for difficulties getting this) combined with the per-transcode bandwidth:

https://commons.wikimedia.org/w/api.php?action=query&titles=File:Folgers.ogv&prop=transcodestatus&format=json

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

For managing downloads or progress bars, it would be nice to have the byte count.


Version: unspecified
Severity: enhancement
URL: https://commons.wikimedia.org/w/api.php?action=query&titles=File:Folgers.ogv&prop=transcodestatus&format=json

Details

Reference
bz55942

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:19 AM
bzimport added a project: TimedMediaHandler.
bzimport set Reference to bz55942.
brion created this task.Oct 20 2013, 4:09 PM

Hmm, final file size is not stored in db where all the other transcode info is pulled out of.

bitrate is calculated exactly from file size though:

$bitrate = round( intval( filesize( $this->getTargetEncodePath() ) / $file->getLength() ) * 8 );

Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 6:12 PM
Restricted Application added subscribers: Matanya, Aklapper. · View Herald TranscriptSep 4 2015, 6:12 PM
TheDJ moved this task from Backlog to Transcoding on the TimedMediaHandler board.Oct 25 2015, 2:15 PM

Change 286760 had a related patch set uploaded (by TheDJ):
[WIP] Log and report the file size of derivatives

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

Requires applying schema change to transcode table. Not an expensive one, but will still probably block deployment on manual work.

Change 286760 abandoned by TheDJ:
[WIP] Log and report the file size of derivatives

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

Aklapper removed Sandraramirez3888 as the assignee of this task.Dec 9 2017, 1:10 PM
Aklapper added a subscriber: Sandraramirez3888.
TheDJ added a subscriber: TheDJ.May 20 2019, 1:18 PM

We have another table update ticket now in T185997: Transcode logging should also log the server on which the transcode process ran. Might be smart to combine both. Both should be possible to roll out as optional fields, so the db change can be done whenever we want (which i think is a requirement these days anyways).

Change 286760 restored by TheDJ:
[WIP] Log and report the file size of derivatives

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