Last modified: 2012-12-31 23:52:32 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 T43304, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 41304 - Please set X-Content-Duration on OGG Video files
Please set X-Content-Duration on OGG Video files
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
unspecified
All All
: High enhancement (vote)
: ---
Assigned To: Aaron Schulz
: performance
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-23 14:37 UTC by Faidon Liambotis
Modified: 2012-12-31 23:52 UTC (History)
8 users (show)

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


Attachments

Description Faidon Liambotis 2012-10-23 14:37:19 UTC
According to:
https://developer.mozilla.org/en-US/docs/Configuring_servers_for_Ogg_media

Firefox supports reading the X-Content-Duration header to get the length of an Ogg video. This avoids doing a (potentially expensive, esp. with our current infrastructure) Range request to the end of the file when start playing it. The Mozilla documentation page explains the header, its values and the circumstances around using it quite well, so I won't repeat it here.

Swift supports setting arbitrary headers, so we can set that on such videos. We should do so for both new files and existing ones using a batch job.

Note that it appears that this a) does not work in Chrome b) is not needed for WebM videos.
Comment 1 Rob Lanphier 2012-10-23 17:09:09 UTC
Jan, could you look into this, and either address it if it's an easy fix, or spell out what all needs to change if it's trickier?
Comment 2 Jan Gerber 2012-10-24 11:54:06 UTC
Looks like its possible to add this, 3 patches are required to get it to work, with those in place step 4 could be done to set X-Content-Duration to all existing Ogg Files.

1) Allow X-Content-Duration to be set in swift config
   https://gerrit.wikimedia.org/r/29768

2) Allow X-Content-Duration to be set in SwiftCloudFiles
   https://gerrit.wikimedia.org/r/#/c/29767/

3) Set X-Content-Duration when adding new Files
   https://gerrit.wikimedia.org/r/29769

4) To set it on old files the best might be to run some job looping over all ogg files and doing something like:
    for ($alloggfiles as $file) {
        $file->getRepo()->getBackend()->setLength ( $file->getPath(), $file->getLength() );
    }
Comment 3 Rob Lanphier 2012-11-02 22:17:05 UTC
Assigning to Aaron for review and comment.
Comment 4 Faidon Liambotis 2012-11-20 07:05:27 UTC
The Swift config part was deployed today. Aaron, you can start setting the header at your discretion.
Comment 5 Aaron Schulz 2012-11-21 00:06:19 UTC
Also https://gerrit.wikimedia.org/r/#/c/34249/
Comment 6 Rob Lanphier 2012-11-26 21:44:29 UTC
This went into 1.21wmf5.  All new files uploaded to wikis running 1.21wmf5 will have this header.  All pre-existing files will still need a cleanup script run over them (which hasn't been written yet).
Comment 7 Aaron Schulz 2012-11-27 00:09:22 UTC
Script in https://gerrit.wikimedia.org/r/35333
Comment 8 Faidon Liambotis 2012-12-17 20:01:55 UTC
I see the script has been merged. What's needed to actually run it?
Comment 9 p858snake 2012-12-17 20:07:01 UTC
file  a bug for it.
Comment 10 Aaron Schulz 2012-12-20 00:19:36 UTC
All wikis on wmf6 now. Script is running now.
Comment 11 Aaron Schulz 2012-12-31 23:52:32 UTC
Done.

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


Navigation
Links