Last modified: 2014-08-31 20:12:17 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 T57942, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55942 - Expose file sizes of transcoded assets in API
Expose file sizes of transcoded assets in API
Status: NEW
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:09 UTC by Brion Vibber
Modified: 2014-08-31 20:12 UTC (History)
4 users (show)

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


Attachments

Description Brion Vibber 2013-10-20 16:09:21 UTC
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.
Comment 1 Bawolff (Brian Wolff) 2014-08-31 20:12:17 UTC
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 );

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


Navigation
Links