Page MenuHomePhabricator

Expose file sizes of transcoded assets in API
Open, LowPublic


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:

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

Version: unspecified
Severity: enhancement


Related Gerrit Patches:
mediawiki/extensions/TimedMediaHandler : masterLog and report the file size of derivatives

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:19 AM
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 To sort 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

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

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