[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Double $wgTranscodeBackgroundTimeLimit to compensate for thr...
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/333035 ) Change subject: Double $wgTranscodeBackgroundTimeLimit to compensate for threading .. Double $wgTranscodeBackgroundTimeLimit to compensate for threading Video transcodes of very long files at very high resolutions were often getting a SIGKILL (exit code 137) but much earlier than expected based on the time and memory limits. Default time limit of 8 hours was being reached in 4-6 hours due to threading in ffmpeg, which hit them around 175-185% CPU instead of a 'mere' 100%. Math is hard! Doubling the limit will bring it into line with expectations, and should avoid wasting the CPU time of the first encoding by forcing a manual second/third/etc re-encode. This means the final timeout will hit around 8-12 hours, which should cover all legit expected cases while still killing infinite-broken processes. Bug: T155750 Change-Id: I21aa914d2ea64cf345b1ae5ec1fbc3be8e7d4902 --- M wmf-config/CommonSettings.php 1 file changed, 7 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/35/333035/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 15de867..c5d7aa6 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -849,6 +849,13 @@ //for avconv / ffmpeg2theora $wgTranscodeBackgroundMemoryLimit = 4 * 1024 * 1024; // 4GB $wgFFmpegThreads = 2; + + // ffmpeg tends to use about 175% CPU when threaded, so hits + // the default 8-hour ulimit in 4-6 hours. This tends to cut + // off very large files at very high resolution just before + // they finish, wasting a lot of time. + // Pad it back out so we don't waste that CPU time with a fail! + $wgTranscodeBackgroundTimeLimit *= $wgFFmpegThreads; // Minimum size for an embed video player $wgMinimumVideoPlayerSize = $wmgMinimumVideoPlayerSize; -- To view, visit https://gerrit.wikimedia.org/r/333035 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I21aa914d2ea64cf345b1ae5ec1fbc3be8e7d4902 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Clear transcode cache state on cleanupTranscodes()
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/310593 Change subject: Clear transcode cache state on cleanupTranscodes() .. Clear transcode cache state on cleanupTranscodes() Change-Id: Ibfd57d38d6c208731ad43e6011edca0af471a2e4 --- M WebVideoTranscode/WebVideoTranscode.php 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/93/310593/1 diff --git a/WebVideoTranscode/WebVideoTranscode.php b/WebVideoTranscode/WebVideoTranscode.php index dcf5a72..2e041b9 100644 --- a/WebVideoTranscode/WebVideoTranscode.php +++ b/WebVideoTranscode/WebVideoTranscode.php @@ -1106,6 +1106,9 @@ ); } } + + // Remove from local WebVideoTranscode cache: + self::clearTranscodeCache( $fileName ); } /** -- To view, visit https://gerrit.wikimedia.org/r/310593 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibfd57d38d6c208731ad43e6011edca0af471a2e4 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: New requeueTranscodes.php maint script for TMH
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/310594 Change subject: New requeueTranscodes.php maint script for TMH .. New requeueTranscodes.php maint script for TMH Maint script to clear old transcodes and batch-queue the new ones. Supplements/replaces old resetTranscodes.php and retryTranscodes.php... Can be used to batch-queue all files of a given format/resolution key, or all resolutions for a given filename, or just those that were errored out or stalled. Uses the image table as a source of files to list, so can reach *all* video files, even those that have not been properly recorded in the transcode table, and can reach transcodes that have not been listed. Limitations: * potentially slow when dealing with all files! * very verbose output Todo: * support audio transcodes * add a queue-state throttle option for major bulk updates Examples: ``` mwscript \ extensions/TimedMediaHandler/maintenance/requeueTranscodes.php \ --key=1080p.ogv mwscript \ extensions/TimedMediaHandler/maintenance/requeueTranscodes.php \ --key=1080p.ogv \ --error mwscript \ extensions/TimedMediaHandler/maintenance/requeueTranscodes.php \ --file=Folgers.ogv mwscript \ extensions/TimedMediaHandler/maintenance/requeueTranscodes.php \ --stalled ``` Bug: T102096 Change-Id: I0dbd701f86dfd42db8016df1883705ea209a85c4 --- A maintenance/requeueTranscodes.php 1 file changed, 104 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/94/310594/1 diff --git a/maintenance/requeueTranscodes.php b/maintenance/requeueTranscodes.php new file mode 100644 index 000..601bb35 --- /dev/null +++ b/maintenance/requeueTranscodes.php @@ -0,0 +1,104 @@ +addOption( "file", "re-queue selected formats only for the given file", false, true ); + $this->addOption( "key", "re-queue for given format key", false, true ); + $this->addOption( "error", "re-queue formats that previously failed", false, false ); + $this->addOption( "stalled", "re-queue formats that were started but not finished", false, false ); + $this->addOption( "all", "re-queue all output formats", false, false ); + $this->mDescription = "re-queue existing and missing media transcodes."; + } + + public function execute() { + $this->output( "Cleanup transcodes:\n" ); + $dbr = wfGetDB( DB_SLAVE ); + $where = [ 'img_media_type' => 'VIDEO' ]; + if ( $this->hasOption( 'file' ) ) { + $title = Title::newFromText( $this->getOption( 'file' ), NS_FILE ); + if ( !$title ) { + $this->output( "Invalid --file option provided" ); + return; + } + $where['img_name'] = $title->getDBkey(); + } + $res = $dbr->select( 'image', ['img_name'], $where, __METHOD__ ); + foreach ( $res as $row ) { + $title = Title::newFromText( $row->img_name, NS_FILE ); + $file = wfLocalFile( $title ); + $handler = $file ? $file->getHandler() : null; + if ( $file && $handler && $handler instanceof TimedMediaHandler ) { + $this->output( $file->getName() . "\n" ); + $this->processFile( $file ); + } + } + $this->output( "Finished!\n" ); + } + + public function processFile( File $file ) { + global $wgEnabledTranscodeSet, $wgEnabledAudioTranscodeSet; + $transcodeSet = array_merge( $wgEnabledTranscodeSet, $wgEnabledAudioTranscodeSet ); + $dbw = wfGetDB( DB_MASTER ); + + if ( $this->hasOption( "all" ) ) { + $toAdd = $toRemove = $transcodeSet; + } elseif ( $this->hasOption( "key" ) ) { + $toAdd = $toRemove = [ $this->getOption( 'key' ) ]; + } else { + $toAdd = $transcodeSet; + $toRemove = []; + $state = WebVideoTranscode::getTranscodeState( $file, $dbw ); + foreach ( $state as $key => $item ) { + if ( $this->hasOption( 'error' ) && ( $item['time_error'] || !$item['time_addjob'] ) ) { + $toRemove[] = $key; + continue; + } + if ( $this->hasOption( 'stalled' ) && ( $item['time_addjob'] && !$item['time_success'] && !$item['time_error'] ) ) { + $toRemove[] = $key; +
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Fix PHP warning in TMH + Score output
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/310923 Change subject: Fix PHP warning in TMH + Score output .. Fix PHP warning in TMH + Score output Change-Id: I6d6832608a47d954ddaac667f134e5f89505146d Task: T145818 --- M TimedMediaTransformOutput.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/23/310923/1 diff --git a/TimedMediaTransformOutput.php b/TimedMediaTransformOutput.php index 73b5476..f1ae1fc 100644 --- a/TimedMediaTransformOutput.php +++ b/TimedMediaTransformOutput.php @@ -332,7 +332,7 @@ } } } - $mediaTracks = $this->file ? $this->getTextHandler()->getTracks() : null; + $mediaTracks = $this->file ? $this->getTextHandler()->getTracks() : []; foreach ( $mediaTracks as &$track ) { foreach ( $track as $attr => $val ) { if ( $attr === 'title' || $attr === 'provider' ) { -- To view, visit https://gerrit.wikimedia.org/r/310923 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6d6832608a47d954ddaac667f134e5f89505146d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Use preload="none" in video.js mode
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/312713 Change subject: Use preload="none" in video.js mode .. Use preload="none" in video.js mode Prevents aggressive preloading of video and audio files that might not get used. Especially with ogv.js backend this can fire off a lot of extra requests and threads. Change-Id: Ib71fd0397df92e245b9deda41acf57b137eb --- M resources/ext.tmh.player.js 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/13/312713/1 diff --git a/resources/ext.tmh.player.js b/resources/ext.tmh.player.js index c90a262..6c0fce1 100755 --- a/resources/ext.tmh.player.js +++ b/resources/ext.tmh.player.js @@ -54,8 +54,8 @@ playerConfig = $.extend( true, {}, playerConfig, audioConfig ); } $( videoplayer ).attr( { - /* Don't preload on pages with many videos, like Category pages */ - preload: ( index < 10 ) ? 'auto' : 'metadata' + /* Don't preload, it's expensive if the file isn't run especially with ogv.js */ + preload: 'none' } ).find( 'source' ).each( function () { // FIXME would be better if we can configure the plugin to make use of our preferred attributes $source = $( this ); -- To view, visit https://gerrit.wikimedia.org/r/312713 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib71fd0397df92e245b9deda41acf57b137eb Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[wmf/1.28.0-wmf.21]: Revert "Rewrite discovery of TimedText tracks"
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/314433 Change subject: Revert "Rewrite discovery of TimedText tracks" .. Revert "Rewrite discovery of TimedText tracks" This reverts commit 1383299c828c479f537c6dfc060dce79c639e8c5. This reverts commit 518a6a9c3394a28245e956ada8c05d73ee17f374. Too flaky, had several errors in production. Needs more testing on the LB local remote case. Change-Id: Id801ff4ff2298121cc210ad8b59ec914b15f549b --- M TimedMediaHandler.php M handlers/TextHandler/TextHandler.php 2 files changed, 140 insertions(+), 164 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/33/314433/1 diff --git a/TimedMediaHandler.php b/TimedMediaHandler.php index ada8f33..1d4faf1 100644 --- a/TimedMediaHandler.php +++ b/TimedMediaHandler.php @@ -290,6 +290,8 @@ $wgAutoloadClasses['WAVHandler'] = "$timedMediaDir/handlers/WAVHandler/WAVHandler.php"; // Text handler +$wgAutoloadClasses['ForeignApiQueryAllPages'] = + "$timedMediaDir/handlers/TextHandler/TextHandler.php"; $wgAutoloadClasses['TextHandler'] = "$timedMediaDir/handlers/TextHandler/TextHandler.php"; $wgAutoloadClasses['TimedTextPage'] = "$timedMediaDir/TimedTextPage.php"; diff --git a/handlers/TextHandler/TextHandler.php b/handlers/TextHandler/TextHandler.php index 3eb284e..605fbe2 100644 --- a/handlers/TextHandler/TextHandler.php +++ b/handlers/TextHandler/TextHandler.php @@ -8,10 +8,61 @@ * TODO On "new" timedtext language save purge all pages where file exists */ +/** + * Subclass ApiMain but query other db + */ +class ForeignApiQueryAllPages extends ApiQueryAllPages { + public function __construct( $mDb, $query, $moduleName ) { + global $wgTimedTextForeignNamespaces; + + $this->foreignDb = $mDb; + + $wikiID = $this->foreignDb->getWikiID(); + if ( isset( $wgTimedTextForeignNamespaces[ $wikiID ] ) ) { + $this->foreignNs = $wgTimedTextForeignNamespaces[ $wikiID ]; + } else { + $this->foreignNs = NS_TIMEDTEXT; + } + parent::__construct( $query, $moduleName, 'ap' ); + } + + protected function getDB() { + return $this->foreignDb; + } + + protected function parseMultiValue( $valueName, $value, $allowMultiple, $allowedValues ) { + // foreignnNs might not be defined localy, + // catch the undefined error here + if ( $valueName == 'apnamespace' + && $value == $this->foreignNs + && $allowMultiple == false + ) { + return $this->foreignNs; + } + return parent::parseMultiValue( $valueName, $value, $allowMultiple, $allowedValues ); + } + + /** +* An alternative to titleToKey() that doesn't trim trailing spaces +* +* +* @FIXME: I'M A BIG HACK +* +* @param string $titlePart Title part with spaces +* @return string Title part with underscores +*/ + public function titlePartToKey( $titlePart, $defaultNamespace = NS_MAIN ) { + $t = Title::newFromText( $titlePart . 'x' ); + if ( !$t ) { + $this->dieUsageMsg( [ 'invalidtitle', $titlePart ] ); + } + return substr( $t->getPrefixedDBkey(), 0, -1 ); + } +} + class TextHandler { // lazy init remote Namespace number public $remoteNs = null; - public $remoteNsName = null; /** * @var File @@ -69,11 +120,8 @@ if ( isset( $data['query'] ) && isset( $data['query']['namespaces'] ) ) { // get the ~last~ timed text namespace defined foreach ( $data['query']['namespaces'] as $ns ) { - if ( isset( $ns['canonical'] ) && $ns['canonical'] === 'TimedText' ) { + if ( $ns['*'] == 'TimedText' ) { $this->remoteNs = $ns['id']; - $this->remoteNsName = $ns['*']; - wfDebug( "Discovered remoteNs: $this->remoteNs and name: $this->remoteNsName \n" ); - break; } } } @@ -83,59 +131,25 @@ } /** -* Retrieve a list of TimedText pages in the database that start with -* the name of the file associated with this handler. -* -* If the file is on a foreign repo, will query the ForeignDb -* -* @return ResultWrapper|bool
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Regression fix: don't load TMH JS modules when not needed
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/314528 Change subject: Regression fix: don't load TMH JS modules when not needed .. Regression fix: don't load TMH JS modules when not needed When adding the videojs experimental mode we accidentally lost a conditional check in the page output hook, causing TMH modules to be loaded on every page. Restored the conditional check, which should avoid loading unneeded modules on pages without audio/video on them. Change-Id: Ie2b4aaada2c8f274a3273207ff4590fdccc54e53 --- M TimedMediaHandler.hooks.php 1 file changed, 12 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/28/314528/1 diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php index 431510c..7ebd6b4 100644 --- a/TimedMediaHandler.hooks.php +++ b/TimedMediaHandler.hooks.php @@ -674,17 +674,19 @@ } } - if ( self::activePlayerMode() === 'mwembed' ) { - $out->addModuleStyles( 'ext.tmh.thumbnail.styles' ); - $out->addModules( [ - 'mw.MediaWikiPlayer.loader', - 'mw.PopUpMediaTransform', - ] ); - } + if ( $addModules ) { + if ( self::activePlayerMode() === 'mwembed' ) { + $out->addModuleStyles( 'ext.tmh.thumbnail.styles' ); + $out->addModules( [ + 'mw.MediaWikiPlayer.loader', + 'mw.PopUpMediaTransform', + ] ); + } - if ( self::activePlayerMode() === 'videojs' ) { - $out->addModuleStyles( 'ext.tmh.player.styles' ); - $out->addModules( 'ext.tmh.player' ); + if ( self::activePlayerMode() === 'videojs' ) { + $out->addModuleStyles( 'ext.tmh.player.styles' ); + $out->addModules( 'ext.tmh.player' ); + } } return true; -- To view, visit https://gerrit.wikimedia.org/r/314528 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie2b4aaada2c8f274a3273207ff4590fdccc54e53 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Fix FOUC and no-js on iframe embed for video
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/314052 Change subject: Fix FOUC and no-js on iframe embed for video .. Fix FOUC and no-js on iframe embed for video Remove the 'bgimage' and just use the or with poster image; all relevant browsers will support this, and it avoids weird flashes, funkiness, and breakage on JS disabled (when suitable native transcode is available). Also fixes default resolution selection for embed mode in videojs. Change-Id: Ide8912edf0ef5fd19e723e3272f3fff2194d879c --- M TimedMediaIframeOutput.php M TimedMediaTransformOutput.php M resources/embedPlayerIframe.css M resources/ext.tmh.player.js 4 files changed, 3 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/52/314052/1 diff --git a/TimedMediaIframeOutput.php b/TimedMediaIframeOutput.php index e3ba8e1..b5ea4f2 100644 --- a/TimedMediaIframeOutput.php +++ b/TimedMediaIframeOutput.php @@ -96,7 +96,6 @@ echo implode( "\n", $pieces ); ?> - toHtml(); ?> diff --git a/TimedMediaTransformOutput.php b/TimedMediaTransformOutput.php index e039542..36ce32a 100644 --- a/TimedMediaTransformOutput.php +++ b/TimedMediaTransformOutput.php @@ -442,15 +442,13 @@ if ( $wgTmhWebPlayer === 'videojs' ) { // Note: do not add 'video-js' class before the runtime transform! $mediaAttr['class'] = $wgVideoPlayerSkin; - $mediaAttr['width'] = intval( $width ); + $mediaAttr['width'] = $this->fillwindow ? '100%' : intval( $width ); if ( $this->isVideo ) { - $mediaAttr['height'] = intval( $height ); + $mediaAttr['height'] = $this->fillwindow ? '100%' : intval( $height ); } else { unset( $mediaAttr['height'] ); } if ( $this->fillwindow ) { - unset( $mediaAttr['width'] ); - unset( $mediaAttr['height'] ); $mediaAttr[ 'class' ] .= ' vjs-fluid'; $mediaAttr[ 'data-player' ] = 'fillwindow'; } diff --git a/resources/embedPlayerIframe.css b/resources/embedPlayerIframe.css index 4027208..5dd8c32 100644 --- a/resources/embedPlayerIframe.css +++ b/resources/embedPlayerIframe.css @@ -12,14 +12,7 @@ padding: 0; } img#bgimage { - position:fixed; - top:0; - left:0; - width:100%; - height:100%; -} -#videoContainer { - visibility: hidden; + display: none; } #videoContainer .videoHolder { position: static; diff --git a/resources/ext.tmh.player.js b/resources/ext.tmh.player.js index 6a69b80..eba83f2 100755 --- a/resources/ext.tmh.player.js +++ b/resources/ext.tmh.player.js @@ -139,7 +139,6 @@ } ); $( function () { // The iframe mode - $( '#bgimage' ).remove(); $( '#videoContainer video,#videoContainer audio' ).loadVideoPlayer(); } ); -- To view, visit https://gerrit.wikimedia.org/r/314052 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ide8912edf0ef5fd19e723e3272f3fff2194d879c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Select default resolution in videojs playback
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/313977 Change subject: Select default resolution in videojs playback .. Select default resolution in videojs playback The videojs resolution switcher was overriding our default res selection with the lowest resolution. Overriding it back by picking the first resolution that matches or surpasses the available picture area. This'll show 240p video for most small thumbnails, which plays adequately at small size even in ogv.js (except on iPhone 4S or equivalent where it's a bit flaky) Larger players as on File: pages should show larger sizes. Note it does *NOT* yet switch on fullscreen/exit. Also de-cluttered the resolution switcher by showing just the res and letting the backing format be picked automatically (ogg/webm/etc) for transcodes. Bug: T135026 Change-Id: I17d77d98e3655ed7549e49c1c2e1375b1dc1bcbf --- M TimedMediaHandler.hooks.php M TimedMediaTransformOutput.php M WebVideoTranscode/WebVideoTranscode.php M i18n/en.json M i18n/qqq.json M resources/ext.tmh.player.js 6 files changed, 87 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/77/313977/1 diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php index ff28845..beeffa7 100644 --- a/TimedMediaHandler.hooks.php +++ b/TimedMediaHandler.hooks.php @@ -173,6 +173,16 @@ 'ext.tmh.videojs-replay', 'ext.tmh.mw-info-button', ], + 'messages' => [ + 'timedmedia-resolution-160', + 'timedmedia-resolution-240', + 'timedmedia-resolution-360', + 'timedmedia-resolution-480', + 'timedmedia-resolution-720', + 'timedmedia-resolution-1080', + 'timedmedia-resolution-1440', + 'timedmedia-resolution-2160', + ], ], 'ext.tmh.player.styles' => $baseExtensionResource + [ 'styles' => 'resources/ext.tmh.player.styles.less', diff --git a/TimedMediaTransformOutput.php b/TimedMediaTransformOutput.php index f1ae1fc..5290098 100644 --- a/TimedMediaTransformOutput.php +++ b/TimedMediaTransformOutput.php @@ -323,6 +323,8 @@ 'framerate', 'disablecontrols', 'transcodekey', + 'label', + 'res', ]; foreach ( $mediaSources as &$source ) { foreach ( $source as $attr => $val ) { diff --git a/WebVideoTranscode/WebVideoTranscode.php b/WebVideoTranscode/WebVideoTranscode.php index 2e041b9..fdaaa97 100644 --- a/WebVideoTranscode/WebVideoTranscode.php +++ b/WebVideoTranscode/WebVideoTranscode.php @@ -1011,11 +1011,14 @@ $src = self::getTranscodedUrlForFile( $file, $transcodeKey ); if ( $file->getHandler()->isAudio( $file ) ) { - $width = $height = 0; + $width = $height = $res = 0; + $resLabel = wfMessage( 'timedmedia-resolution-audio' )->text(); } else { + $res = self::$derivativeSettings[$transcodeKey]['maxSize']; + $resLabel = wfMessage( 'timedmedia-resolution-' . $res )->text(); list( $width, $height ) = WebVideoTranscode::getMaxSizeTransform( $file, - self::$derivativeSettings[$transcodeKey]['maxSize'] + $res ); } @@ -1035,6 +1038,10 @@ // eventually we will define a manifest xml entry point. "width" => intval( $width ), "height" => intval( $height ), + + // For videojs-resolution-switcher + 'res' => intval( $res ), + 'label' => $resLabel, ]; // a "ready" transcode should have a bitrate: diff --git a/i18n/en.json b/i18n/en.json index 652416b..cf05b2c 100644 --- a/i18n/en.json +++ b/i18n/en.json @@ -134,6 +134,14 @@
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: WIP: optional integration of TMH video.js into MMV
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/314313 Change subject: WIP: optional integration of TMH video.js into MMV .. WIP: optional integration of TMH video.js into MMV Similar to the mwembed popup transform, but not quite. :) Currently using iframe embed Todo: * show play cursor on the placeholders * autoplay * use inline hidden player instead of iframe * fix for aspect ratio * fix on resize * make loading not suck Change-Id: I2343d913936d5b077a56fa9caff1f534dcaf7b75 --- M TimedMediaHandler.hooks.php M TimedMediaHandler.php M TimedMediaTransformOutput.php A resources/mmv.tmh.js 4 files changed, 85 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/13/314313/1 diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php index beeffa7..f2735d8 100644 --- a/TimedMediaHandler.hooks.php +++ b/TimedMediaHandler.hooks.php @@ -32,7 +32,7 @@ // But for now we register them dynamically, because they are config dependent, // while we have two players public static function resourceLoaderRegisterModules( &$resourceLoader ) { - global $wgTmhWebPlayer; + global $wgTmhWebPlayer, $wgTmhUseMultimediaViewer; $baseExtensionResource = [ 'localBasePath' => __DIR__, @@ -189,6 +189,16 @@ 'targets' => [ 'mobile', 'desktop' ], ], ]; + + if ( $wgTmhUseMultimediaViewer ) { + $resourceModules['mmv.tmh'] = $baseExtensionResource + [ + 'scripts' => 'resources/mmv.tmh.js', + 'targets' => [ 'desktop' ], + 'dependencies' => [ + 'mmv' + ], + ]; + } } $resourceLoader->register( $resourceModules ); @@ -201,7 +211,8 @@ $wgResourceModules, $wgExcludeFromThumbnailPurge, $wgFileExtensions, $wgTmhEnableMp4Uploads, $wgExtensionAssetsPath, $wgMwEmbedModuleConfig, $wgEnableLocalTimedText, $wgTmhFileExtensions, - $wgTmhTheoraTwoPassEncoding, $wgTmhWebPlayer, $wgWikimediaJenkinsCI; + $wgTmhTheoraTwoPassEncoding, $wgTmhWebPlayer, $wgWikimediaJenkinsCI, + $wgTmhUseMultimediaViewer; // set config for parser tests if ( isset( $wgWikimediaJenkinsCI ) && $wgWikimediaJenkinsCI === true ) { @@ -227,6 +238,14 @@ } } + if ( $wgTmhUseMultimediaViewer ) { + global $wgMediaViewerExtensions; + $formats = [ 'ogg', 'oga', 'ogv', 'ogm', 'opus', 'webm', 'mp4' ]; + foreach ( $formats as $ext ) { + $wgMediaViewerExtensions[$ext] = 'mmv.tmh'; + } + } + if ( $wgTmhWebPlayer === 'mwembed' ) { if ( !class_exists( 'MwEmbedResourceManager' ) ) { echo "TimedMediaHandler requires the MwEmbedSupport extension.\n"; diff --git a/TimedMediaHandler.php b/TimedMediaHandler.php index ada8f33..59bae64 100644 --- a/TimedMediaHandler.php +++ b/TimedMediaHandler.php @@ -20,6 +20,9 @@ // Configure the webplayer. Allowed values: mwembed, videojs $wgTmhWebPlayer = 'mwembed'; +// Integrate with MultimediaViewer extension +$wgTmhUseMultimediaViewer = false; + /*** MwEmbed module configuration: */ // Show a warning to the user if they are not using an html5 browser with high quality ogg support diff --git a/TimedMediaTransformOutput.php b/TimedMediaTransformOutput.php index 36ce32a..cea2977 100644 --- a/TimedMediaTransformOutput.php +++ b/TimedMediaTransformOutput.php @@ -1,6 +1,6 @@ width = $options['override-width']; } - if ( $this->useImagePopUp() && $wgTmhWebPlayer === 'mwembed' ) { + if ( $wgTmhWebPlayer === 'mwembed' && $this->useImagePopUp() ) { $res = $this->getImagePopUp(); + } else if ( $wgTmhWebPlayer === 'videojs' && $this->useImagePlaceholder() ) { + $res = $this->getImagePlaceholder(); } else { $res = $this->getHtmlMediaTagOutput(); } + $this->width = $oldWidth; $this->height = $oldHeight; return $res; @@ -164,6 +167,11 @@ && $this->getPlayerWidth() < $wgMinimumVideoPlayerSize
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Work around failure on fetching remote timedtext when no local
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/314426 Change subject: Work around failure on fetching remote timedtext when no local .. Work around failure on fetching remote timedtext when no local Was trying to use NS_TIMEDTEXT constant when there was no local timedtext ns. Instead, use the default. Change-Id: I25bf256f0cbcbf16ac533a9ba1b527530c109bd2 --- M handlers/TextHandler/TextHandler.php 1 file changed, 12 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/26/314426/1 diff --git a/handlers/TextHandler/TextHandler.php b/handlers/TextHandler/TextHandler.php index 3eb284e..9edeeda 100644 --- a/handlers/TextHandler/TextHandler.php +++ b/handlers/TextHandler/TextHandler.php @@ -54,7 +54,11 @@ return $wgTimedTextForeignNamespaces[ $wikiID ]; } // failed to get namespace via ForeignDBViaLBRepo, return NS_TIMEDTEXT - return NS_TIMEDTEXT; + if ( $wgEnableLocalTimedText ) { + return NS_TIMEDTEXT; + } else { + return false; + } } else { if ( $this->remoteNs !== null ) { return $this->remoteNs; @@ -289,11 +293,17 @@ } function getForeignNamespaceName() { + global $wgEnableLocalTimedText; if ( $this->remoteNs !== null ) { return $this->remoteNsName; } /* Else, we use the canonical namespace, since we can't look up the actual one */ - return strtr( MWNamespace::getCanonicalName( NS_TIMEDTEXT ), ' ', '_' ); + if ( $wgEnableLocalTimedText ) { + return strtr( MWNamespace::getCanonicalName( NS_TIMEDTEXT ), ' ', '_' ); + } else { + // Assume default. + return 'TimedText'; + } } /** -- To view, visit https://gerrit.wikimedia.org/r/314426 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I25bf256f0cbcbf16ac533a9ba1b527530c109bd2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Revert "Fix empty property references"
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/314429 Change subject: Revert "Fix empty property references" .. Revert "Fix empty property references" This reverts commit 1383299c828c479f537c6dfc060dce79c639e8c5. First step of reverting a commit that needs more fixes. Change-Id: Id801ff4ff2298121cc210ad8b59ec914b15f549b --- M handlers/TextHandler/TextHandler.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/29/314429/1 diff --git a/handlers/TextHandler/TextHandler.php b/handlers/TextHandler/TextHandler.php index 3eb284e..4442dbd 100644 --- a/handlers/TextHandler/TextHandler.php +++ b/handlers/TextHandler/TextHandler.php @@ -289,8 +289,8 @@ } function getForeignNamespaceName() { - if ( $this->remoteNs !== null ) { - return $this->remoteNsName; + if ( $this->$remoteNs !== null ) { + return $this->$remoteNsName; } /* Else, we use the canonical namespace, since we can't look up the actual one */ return strtr( MWNamespace::getCanonicalName( NS_TIMEDTEXT ), ' ', '_' ); -- To view, visit https://gerrit.wikimedia.org/r/314429 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id801ff4ff2298121cc210ad8b59ec914b15f549b Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: WIP: Rewrite discovery of TimedText tracks
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/314862 Change subject: WIP: Rewrite discovery of TimedText tracks .. WIP: Rewrite discovery of TimedText tracks (Resurrecting I69c4af20 after revert, needs fixes) * Remove broken ForeignApIRequest * Directly query the database for Local and ForeignDb situations * Use the new timedtext api query for remote sources (T134642) * Fixes a bug, where the namespace for timed text on Commons was missing from track src's (T122737 and T71453) Bug: T61780 Bug: T134642 Bug: T122737 Bug: T71453 Change-Id: I6e4915540a2ddef2c8cc78a920ef3950ddae46b1 --- M TimedMediaHandler.php M handlers/TextHandler/TextHandler.php 2 files changed, 166 insertions(+), 142 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/62/314862/1 diff --git a/TimedMediaHandler.php b/TimedMediaHandler.php index 108e02e..66e42da 100644 --- a/TimedMediaHandler.php +++ b/TimedMediaHandler.php @@ -294,8 +294,6 @@ $wgAutoloadClasses['WAVHandler'] = "$timedMediaDir/handlers/WAVHandler/WAVHandler.php"; // Text handler -$wgAutoloadClasses['ForeignApiQueryAllPages'] = - "$timedMediaDir/handlers/TextHandler/TextHandler.php"; $wgAutoloadClasses['TextHandler'] = "$timedMediaDir/handlers/TextHandler/TextHandler.php"; $wgAutoloadClasses['TimedTextPage'] = "$timedMediaDir/TimedTextPage.php"; diff --git a/handlers/TextHandler/TextHandler.php b/handlers/TextHandler/TextHandler.php index 605fbe2..4442dbd 100644 --- a/handlers/TextHandler/TextHandler.php +++ b/handlers/TextHandler/TextHandler.php @@ -8,61 +8,10 @@ * TODO On "new" timedtext language save purge all pages where file exists */ -/** - * Subclass ApiMain but query other db - */ -class ForeignApiQueryAllPages extends ApiQueryAllPages { - public function __construct( $mDb, $query, $moduleName ) { - global $wgTimedTextForeignNamespaces; - - $this->foreignDb = $mDb; - - $wikiID = $this->foreignDb->getWikiID(); - if ( isset( $wgTimedTextForeignNamespaces[ $wikiID ] ) ) { - $this->foreignNs = $wgTimedTextForeignNamespaces[ $wikiID ]; - } else { - $this->foreignNs = NS_TIMEDTEXT; - } - parent::__construct( $query, $moduleName, 'ap' ); - } - - protected function getDB() { - return $this->foreignDb; - } - - protected function parseMultiValue( $valueName, $value, $allowMultiple, $allowedValues ) { - // foreignnNs might not be defined localy, - // catch the undefined error here - if ( $valueName == 'apnamespace' - && $value == $this->foreignNs - && $allowMultiple == false - ) { - return $this->foreignNs; - } - return parent::parseMultiValue( $valueName, $value, $allowMultiple, $allowedValues ); - } - - /** -* An alternative to titleToKey() that doesn't trim trailing spaces -* -* -* @FIXME: I'M A BIG HACK -* -* @param string $titlePart Title part with spaces -* @return string Title part with underscores -*/ - public function titlePartToKey( $titlePart, $defaultNamespace = NS_MAIN ) { - $t = Title::newFromText( $titlePart . 'x' ); - if ( !$t ) { - $this->dieUsageMsg( [ 'invalidtitle', $titlePart ] ); - } - return substr( $t->getPrefixedDBkey(), 0, -1 ); - } -} - class TextHandler { // lazy init remote Namespace number public $remoteNs = null; + public $remoteNsName = null; /** * @var File @@ -120,8 +69,11 @@ if ( isset( $data['query'] ) && isset( $data['query']['namespaces'] ) ) { // get the ~last~ timed text namespace defined foreach ( $data['query']['namespaces'] as $ns ) { - if ( $ns['*'] == 'TimedText' ) { + if ( isset( $ns['canonical'] ) && $ns['canonical'] === 'TimedText' ) { $this->remoteNs = $ns['id']; + $this->remoteNsName = $ns['*']; + wfDebug( "Discovered remoteNs: $this->remoteNs and name: $this->remoteNsName \n" ); + break; } } } @@ -131,25 +83,59 @@ } /** -* @return array|bool +* Retrieve a list of TimedText pages in the database that start with +*
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Update ogv.js to 1.2.0
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/311430 Change subject: Update ogv.js to 1.2.0 .. Update ogv.js to 1.2.0 Includes fix for non-indexed ogg seeking. Bug: T145983 Change-Id: I74e4e78df0267dd93561c5540ae4f7bab7d21e0c --- M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-theora.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-vp8.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-demuxer-webm.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-support.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-version.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-worker-audio.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-worker-video.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/readme.md 9 files changed, 856 insertions(+), 584 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/30/311430/1 -- To view, visit https://gerrit.wikimedia.org/r/311430 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I74e4e78df0267dd93561c5540ae4f7bab7d21e0c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: static.php should use deployed branch for invalid hashes
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/312254 Change subject: static.php should use deployed branch for invalid hashes .. static.php should use deployed branch for invalid hashes Files loaded via static.php with a non-standard query string were being pulled from the most recent available branch instead of the deployment branch. This caused mismatched file versions between ResourceLoader and wgExtensionAssetsPath HTTP fetches for TimedMediaHandler's ogv.js library, since the library applies its own cache hashes in the query string which are in a different format. In this case, should be fixed by using deployed version as default both when there's no query string *and* when there's a query string that's not a 5-character md5 hash prefix. (This should continue to provide the forward consistency protections of a classic cache-buster query string for those files, but they won't get the benefits of the forward/backward protection on rollback that static.php's hash checking would provide.) Bug: T146363 Change-Id: I95639d5e45b18f6459c2889dc2633faadedfad9b --- M w/static.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/54/312254/1 diff --git a/w/static.php b/w/static.php index 3694675..984deff 100644 --- a/w/static.php +++ b/w/static.php @@ -128,8 +128,8 @@ return version_compare( $b, $a ); } ); - // If request has no verification hash, prefer the current wikiversion - if ( !$urlHash ) { + // If request has no or invalid verification hash, prefer the current wikiversion + if ( !$urlHash || strlen( $urlHash ) !== 5 ) { array_unshift( $branchDirs, $IP ); } -- To view, visit https://gerrit.wikimedia.org/r/312254 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I95639d5e45b18f6459c2889dc2633faadedfad9b Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[wmf/1.28.0-wmf.19]: Update ogv.js to 1.2.0
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/312264 Change subject: Update ogv.js to 1.2.0 .. Update ogv.js to 1.2.0 Includes fix for non-indexed ogg seeking. Bug: T145983 Change-Id: I74e4e78df0267dd93561c5540ae4f7bab7d21e0c --- M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-theora.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-vp8.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-demuxer-webm.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-support.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-version.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-worker-audio.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-worker-video.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/readme.md 9 files changed, 856 insertions(+), 584 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/64/312264/1 -- To view, visit https://gerrit.wikimedia.org/r/312264 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I74e4e78df0267dd93561c5540ae4f7bab7d21e0c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: wmf/1.28.0-wmf.19 Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[wmf/1.28.0-wmf.18]: Update ogv.js to 1.2.0
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/312263 Change subject: Update ogv.js to 1.2.0 .. Update ogv.js to 1.2.0 Includes fix for non-indexed ogg seeking. Bug: T145983 Change-Id: I74e4e78df0267dd93561c5540ae4f7bab7d21e0c --- M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-theora.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-vp8.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-demuxer-webm.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-support.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-version.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-worker-audio.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-worker-video.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/readme.md 9 files changed, 856 insertions(+), 584 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/63/312263/1 -- To view, visit https://gerrit.wikimedia.org/r/312263 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I74e4e78df0267dd93561c5540ae4f7bab7d21e0c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: wmf/1.28.0-wmf.18 Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[wmf/1.28.0-wmf.18]: Fix regression that embedded video player didn't work
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/311857 Change subject: Fix regression that embedded video player didn't work .. Fix regression that embedded video player didn't work A small update to the markup didn't match the JS, causing the player to be hidden in the embedded mode sometimes. Go back to using an explicit id wrapper. Also, now not loading the mwembed specific JS in videojs mode. Bug: T146124 Change-Id: Iac3b97c86aedb96b2c0e5b4eed2cb30c606fe23a --- M TimedMediaIframeOutput.php M resources/embedPlayerIframe.css 2 files changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/57/311857/1 diff --git a/TimedMediaIframeOutput.php b/TimedMediaIframeOutput.php index 1db1326..e3ba8e1 100644 --- a/TimedMediaIframeOutput.php +++ b/TimedMediaIframeOutput.php @@ -70,11 +70,11 @@ if ( $wgTmhWebPlayer == 'mwembed' ) { $wgOut->addModules( [ 'mw.MediaWikiPlayer.loader', 'ext.tmh.embedPlayerIframe' ] ); + $wgOut->addModuleStyles( 'embedPlayerIframeStyle' ); } elseif ( $wgTmhWebPlayer === 'videojs' ) { $wgOut->addModules( 'ext.tmh.player' ); $wgOut->addModuleStyles( 'ext.tmh.player.styles' ); } - $wgOut->addModuleStyles( 'embedPlayerIframeStyle' ); $wgOut->sendCacheControl(); $rlClient = $wgOut->getRlClient(); @@ -97,7 +97,9 @@ ?> - toHtml(); ?> + + toHtml(); ?> + getBottomScripts(); ?> diff --git a/resources/embedPlayerIframe.css b/resources/embedPlayerIframe.css index 3fb3f32..4027208 100644 --- a/resources/embedPlayerIframe.css +++ b/resources/embedPlayerIframe.css @@ -18,9 +18,9 @@ width:100%; height:100%; } -.mediaContainer { +#videoContainer { visibility: hidden; } -.mediaContainer .videoHolder { +#videoContainer .videoHolder { position: static; } -- To view, visit https://gerrit.wikimedia.org/r/311857 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iac3b97c86aedb96b2c0e5b4eed2cb30c606fe23a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: wmf/1.28.0-wmf.18 Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[wmf/1.28.0-wmf.19]: Fix regression that embedded video player didn't work
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/311858 Change subject: Fix regression that embedded video player didn't work .. Fix regression that embedded video player didn't work A small update to the markup didn't match the JS, causing the player to be hidden in the embedded mode sometimes. Go back to using an explicit id wrapper. Also, now not loading the mwembed specific JS in videojs mode. Bug: T146124 Change-Id: Iac3b97c86aedb96b2c0e5b4eed2cb30c606fe23a --- M TimedMediaIframeOutput.php M resources/embedPlayerIframe.css 2 files changed, 6 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/58/311858/1 diff --git a/TimedMediaIframeOutput.php b/TimedMediaIframeOutput.php index 1db1326..e3ba8e1 100644 --- a/TimedMediaIframeOutput.php +++ b/TimedMediaIframeOutput.php @@ -70,11 +70,11 @@ if ( $wgTmhWebPlayer == 'mwembed' ) { $wgOut->addModules( [ 'mw.MediaWikiPlayer.loader', 'ext.tmh.embedPlayerIframe' ] ); + $wgOut->addModuleStyles( 'embedPlayerIframeStyle' ); } elseif ( $wgTmhWebPlayer === 'videojs' ) { $wgOut->addModules( 'ext.tmh.player' ); $wgOut->addModuleStyles( 'ext.tmh.player.styles' ); } - $wgOut->addModuleStyles( 'embedPlayerIframeStyle' ); $wgOut->sendCacheControl(); $rlClient = $wgOut->getRlClient(); @@ -97,7 +97,9 @@ ?> - toHtml(); ?> + + toHtml(); ?> + getBottomScripts(); ?> diff --git a/resources/embedPlayerIframe.css b/resources/embedPlayerIframe.css index 3fb3f32..4027208 100644 --- a/resources/embedPlayerIframe.css +++ b/resources/embedPlayerIframe.css @@ -18,9 +18,9 @@ width:100%; height:100%; } -.mediaContainer { +#videoContainer { visibility: hidden; } -.mediaContainer .videoHolder { +#videoContainer .videoHolder { position: static; } -- To view, visit https://gerrit.wikimedia.org/r/311858 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iac3b97c86aedb96b2c0e5b4eed2cb30c606fe23a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: wmf/1.28.0-wmf.19 Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Fix regression that embedded video player didn't work
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/311852 Change subject: Fix regression that embedded video player didn't work .. Fix regression that embedded video player didn't work A small update to the markup didn't match the JS, causing the player to be hidden in the embedded mode sometimes. Go back to using an explicit id wrapper, seems to work. Bug: T146124 Change-Id: Iac3b97c86aedb96b2c0e5b4eed2cb30c606fe23a --- M TimedMediaIframeOutput.php M resources/embedPlayerIframe.css 2 files changed, 5 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/52/311852/1 diff --git a/TimedMediaIframeOutput.php b/TimedMediaIframeOutput.php index 1db1326..e851658 100644 --- a/TimedMediaIframeOutput.php +++ b/TimedMediaIframeOutput.php @@ -97,7 +97,9 @@ ?> - toHtml(); ?> + + toHtml(); ?> + getBottomScripts(); ?> diff --git a/resources/embedPlayerIframe.css b/resources/embedPlayerIframe.css index 3fb3f32..4027208 100644 --- a/resources/embedPlayerIframe.css +++ b/resources/embedPlayerIframe.css @@ -18,9 +18,9 @@ width:100%; height:100%; } -.mediaContainer { +#videoContainer { visibility: hidden; } -.mediaContainer .videoHolder { +#videoContainer .videoHolder { position: static; } -- To view, visit https://gerrit.wikimedia.org/r/311852 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iac3b97c86aedb96b2c0e5b4eed2cb30c606fe23a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Add check to File_Ogg for cut-off page headers
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/316000 Change subject: Add check to File_Ogg for cut-off page headers .. Add check to File_Ogg for cut-off page headers Should prevent logspam warning about unpack() failing on short input. If a file was cut off in the middle of an Ogg page header, it might try to parse the header and didn't have error checking inside. Now checks that the header is the expected length, and reports back as a parse failure which should throw an OggException which will either get caught sanely or throw a backtrace that's more findable in logs. Bug: T144483 Change-Id: I96c47a8b2fe9f27868a28d9ed9e0450b662c35c2 --- M handlers/OggHandler/File_Ogg/File/Ogg.php 1 file changed, 9 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/00/316000/1 diff --git a/handlers/OggHandler/File_Ogg/File/Ogg.php b/handlers/OggHandler/File_Ogg/File/Ogg.php index ca281e2..a5d358f 100644 --- a/handlers/OggHandler/File_Ogg/File/Ogg.php +++ b/handlers/OggHandler/File_Ogg/File/Ogg.php @@ -357,6 +357,10 @@ */ function _decodePageHeader($pageData, $pageOffset, $groupId) { +// Don't blindly substr() and unpack() if data is cut off +if (strlen($pageData) < 27) +return (false); + // Extract the various bits and pieces found in each packet header. if (substr($pageData, 0, 4) != OGG_CAPTURE_PATTERN) return (false); @@ -379,6 +383,11 @@ $page_sequence = unpack("Vdata", substr($pageData, 18, 4)); $checksum= unpack("Vdata", substr($pageData, 22, 4)); $page_segments = unpack("Cdata", substr($pageData, 26, 1)); + +// Header is extended with segment lengths; make sure we have data. +if (strlen($pageData) < 27 + $page_segments['data']) +return (false); + $segments_total = 0; for ($i = 0; $i < $page_segments['data']; ++$i) { $segment_length = unpack("Cdata", substr($pageData, 26 + ($i + 1), 1)); -- To view, visit https://gerrit.wikimedia.org/r/316000 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I96c47a8b2fe9f27868a28d9ed9e0450b662c35c2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add 'noflip' option on RL modules to disable CSSJanus
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/316611 Change subject: Add 'noflip' option on RL modules to disable CSSJanus .. Add 'noflip' option on RL modules to disable CSSJanus Should be useful for cases where we pull in an external library that already manages RTL flipping in its styles, and CSSJanus does the wrong thing without extra markup. Example: 'ext.tmh.video-js' => $baseExtensionResource + [ 'scripts' => 'resources/videojs/video.js', 'styles' => 'resources/videojs/video-js.css', 'noflip' => true, ... ], Bug: T148572 Bug: T148565 Change-Id: Icbad20d8a6e9a0d354ad159f5816f4fb67cc2775 --- M includes/resourceloader/ResourceLoaderFileModule.php 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/11/316611/1 diff --git a/includes/resourceloader/ResourceLoaderFileModule.php b/includes/resourceloader/ResourceLoaderFileModule.php index 2dcc841..d7d85f8 100644 --- a/includes/resourceloader/ResourceLoaderFileModule.php +++ b/includes/resourceloader/ResourceLoaderFileModule.php @@ -128,6 +128,8 @@ protected $targets = [ 'desktop' ]; + protected $noflip = false; + /** * @var bool Whether getStyleURLsForDebug should return raw file paths, * or return load.php urls @@ -277,6 +279,7 @@ // Single booleans case 'debugRaw': case 'raw': + case 'noflip': $this->{$member} = (bool)$option; break; } @@ -913,7 +916,7 @@ * @return bool */ public function getFlip( $context ) { - return $context->getDirection() === 'rtl'; + return $context->getDirection() === 'rtl' && !$this->noflip; } /** -- To view, visit https://gerrit.wikimedia.org/r/316611 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Icbad20d8a6e9a0d354ad159f5816f4fb67cc2775 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Fix videojs mode control bar in RTL
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/316612 Change subject: Fix videojs mode control bar in RTL .. Fix videojs mode control bar in RTL Apply a global 'noflip' to video.js's CSS which is already using correct values for RTL (which is to say, make most of it look LTR as actually correct for media controls!) Bug: T148565 Change-Id: Ide171ef03a2628865932093eb54384c14195446c Depends-On: Icbad20d8a6e9a0d354ad159f5816f4fb67cc2775 --- M TimedMediaHandler.hooks.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/12/316612/1 diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php index a6699a7..5123520 100644 --- a/TimedMediaHandler.hooks.php +++ b/TimedMediaHandler.hooks.php @@ -82,6 +82,7 @@ 'ext.tmh.video-js' => $baseExtensionResource + [ 'scripts' => 'resources/videojs/video.js', 'styles' => 'resources/videojs/video-js.css', + 'noflip' => true, 'targets' => [ 'mobile', 'desktop' ], 'languageScripts' => [ 'ar' => 'resources/videojs/lang/ar.js', -- To view, visit https://gerrit.wikimedia.org/r/316612 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ide171ef03a2628865932093eb54384c14195446c Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TitleKey[master]: Switch TitleKey to use TitleMoveCompleting hook
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/317220 Change subject: Switch TitleKey to use TitleMoveCompleting hook .. Switch TitleKey to use TitleMoveCompleting hook This keeps the titlekey update inside the main transaction so it doesn't get lost in post-edit updates. Should improve consistency in case of unexpected failures, and may also help in places where the deferred updates are run in odd ways. Bug: T148860 Change-Id: Iff51e928456d04889232f8a18dd1fdfb2a9d541e --- M extension.json 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TitleKey refs/changes/20/317220/1 diff --git a/extension.json b/extension.json index c650a27..51c76ff 100644 --- a/extension.json +++ b/extension.json @@ -34,7 +34,7 @@ "ArticleUndelete": [ "TitleKey::updateUndelete" ], - "TitleMoveComplete": [ + "TitleMoveCompleting": [ "TitleKey::updateMove" ], "ParserTestTables": [ -- To view, visit https://gerrit.wikimedia.org/r/317220 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iff51e928456d04889232f8a18dd1fdfb2a9d541e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TitleKey Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[wmf/1.28.0-wmf.22]: Repair text track attributes
Brion VIBBER has uploaded a new change for review. https://gerrit.wikimedia.org/r/316069 Change subject: Repair text track attributes .. Repair text track attributes This was broken in I4227b88ae94e3cfcfd62fb7fe221190d7fe33f71 Fixes regression in subtitles loading from Commons on the other sites. Bug: T122737 Change-Id: I6498c32929892454700e852d412056a5acc2453a (cherry picked from commit 3a4d3b54745a93def80a6b06b6d803f3663483f2) --- M TimedMediaTransformOutput.php 1 file changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/69/316069/1 diff --git a/TimedMediaTransformOutput.php b/TimedMediaTransformOutput.php index b15ed68..215754d 100644 --- a/TimedMediaTransformOutput.php +++ b/TimedMediaTransformOutput.php @@ -334,11 +334,11 @@ foreach ( $mediaTracks as &$track ) { foreach ( $track as $attr => $val ) { if ( $attr === 'title' || $attr === 'provider' ) { - $source[ 'data-mw' . $attr ] = $val; - unset( $source[ $attr ] ); + $track[ 'data-mw' . $attr ] = $val; + unset( $track[ $attr ] ); } elseif ( $attr === 'dir' ) { - $source[ 'data-' . $attr ] = $val; - unset( $source[ $attr ] ); + $track[ 'data-' . $attr ] = $val; + unset( $track[ $attr ] ); } } } -- To view, visit https://gerrit.wikimedia.org/r/316069 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6498c32929892454700e852d412056a5acc2453a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: wmf/1.28.0-wmf.22 Gerrit-Owner: Brion VIBBERGerrit-Reviewer: TheDJ ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Split TMH transcode queue into two for prioritization
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/331668 ) Change subject: Split TMH transcode queue into two for prioritization .. Split TMH transcode queue into two for prioritization Prep for I3d834ad: creates a second queue for high-priority transcodes, which includes only SD resolutions and videos less than 15 minutes long by default. HD resolutions and longer videos go in the existing queue. This should allow for more responsivity to new uploads when there's a flood of uploads, though can still get bogged down if there's too much. Later, the jobs themselves will be improved to do even better selection of what to work on, but using these same queues. Needs to be live or the high-priority jobs will be sent to regular job queue runners instead of video scalers, leading to failures if ffmpeg etc is missing. Bug: T155098 Change-Id: I83e5dab7dfb7be7a6df1a516701ef534601d530f --- M hieradata/hosts/mw1168.yaml M hieradata/hosts/mw1169.yaml M hieradata/labs/deployment-prep/host/deployment-tmh01.yaml M hieradata/role/common/mediawiki/videoscaler.yaml M modules/mediawiki/manifests/jobrunner.pp M modules/mediawiki/templates/jobrunner/jobrunner.conf.erb 6 files changed, 16 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/68/331668/1 diff --git a/hieradata/hosts/mw1168.yaml b/hieradata/hosts/mw1168.yaml index 08ebfe2..dd089e1 100644 --- a/hieradata/hosts/mw1168.yaml +++ b/hieradata/hosts/mw1168.yaml @@ -1,4 +1,5 @@ -mediawiki::jobrunner::runners_transcode: 16 +mediawiki::jobrunner::runners_transcode: 4 +mediawiki::jobrunner::runners_transcode_prioritized: 12 hhvm::extra::fcgi: hhvm: server: diff --git a/hieradata/hosts/mw1169.yaml b/hieradata/hosts/mw1169.yaml index 08ebfe2..dd089e1 100644 --- a/hieradata/hosts/mw1169.yaml +++ b/hieradata/hosts/mw1169.yaml @@ -1,4 +1,5 @@ -mediawiki::jobrunner::runners_transcode: 16 +mediawiki::jobrunner::runners_transcode: 4 +mediawiki::jobrunner::runners_transcode_prioritized: 12 hhvm::extra::fcgi: hhvm: server: diff --git a/hieradata/labs/deployment-prep/host/deployment-tmh01.yaml b/hieradata/labs/deployment-prep/host/deployment-tmh01.yaml index 6ef6b62..5436415 100644 --- a/hieradata/labs/deployment-prep/host/deployment-tmh01.yaml +++ b/hieradata/labs/deployment-prep/host/deployment-tmh01.yaml @@ -2,4 +2,5 @@ mediawiki::jobrunner::runners_gwt: 0 mediawiki::jobrunner::runners_translate: 0 mediawiki::jobrunner::runners_transcode: 2 +mediawiki::jobrunner::runners_transcode_prioritized: 2 mediawiki::jobrunner::runners_upload: 0 diff --git a/hieradata/role/common/mediawiki/videoscaler.yaml b/hieradata/role/common/mediawiki/videoscaler.yaml index c579f22..01cc154 100644 --- a/hieradata/role/common/mediawiki/videoscaler.yaml +++ b/hieradata/role/common/mediawiki/videoscaler.yaml @@ -2,7 +2,8 @@ admin::groups: - deployment - perf-roots -mediawiki::jobrunner::runners_transcode: 8 +mediawiki::jobrunner::runners_transcode: 4 +mediawiki::jobrunner::runners_transcode_prioritized: 4 nutcracker::verbosity: "4" hhvm::extra::fcgi: hhvm: diff --git a/modules/mediawiki/manifests/jobrunner.pp b/modules/mediawiki/manifests/jobrunner.pp index ebe0db0..8f1f133 100644 --- a/modules/mediawiki/manifests/jobrunner.pp +++ b/modules/mediawiki/manifests/jobrunner.pp @@ -11,6 +11,7 @@ $runners_upload= 0, $runners_gwt = 0, $runners_transcode = 0, +$runners_transcode_prioritized = 0, $runners_translate = 0, $statsd_server = undef, $port = 9005, diff --git a/modules/mediawiki/templates/jobrunner/jobrunner.conf.erb b/modules/mediawiki/templates/jobrunner/jobrunner.conf.erb index d39865c..23bcbd6 100644 --- a/modules/mediawiki/templates/jobrunner/jobrunner.conf.erb +++ b/modules/mediawiki/templates/jobrunner/jobrunner.conf.erb @@ -17,7 +17,8 @@ "gwtoolsetUploadMediafileJob", "gwtoolsetUploadMetadataJob", "uploadFromUrl", -"webVideoTranscode" +"webVideoTranscode", +"webVideoTranscodePrioritized", ], "low-priority": [ "cirrusSearchLinksUpdate", @@ -46,6 +47,12 @@ "webVideoTranscode" ] }, +"transcode_prioritized": { +"runners": <%= @runners_transcode_prioritized %>, +"include": [ +"webVideoTranscodePrioritized" +] +}, "translate": { "runners": <%= @runners_translate %>, "include": [ -- To view, visit https://gerrit.wikimedia.org/r/331668 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I83e5dab7dfb7be7a6df1a516701ef534601d530f Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Exclude new high-priority video transcode jobs from default ...
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/331669 ) Change subject: Exclude new high-priority video transcode jobs from default queue .. Exclude new high-priority video transcode jobs from default queue Prep for I3d834ad: TMH transcode jobs being split into two queues, one low and one high priority. Existing queue is low prio, new queue is high prio and by default will include only SD resolutions and files less than 15 minutes long, while large and long files go to the low-priority queue. Bug: T155098 Change-Id: I3aee49682f66cdd7c7a6b9267d8d486affc2903a --- M wmf-config/CommonSettings.php 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/69/331669/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 14e1e68..b5be2a2 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -2580,6 +2580,7 @@ # Timed Media Handler: $wgJobTypesExcludedFromDefaultQueue[] = 'webVideoTranscode'; +$wgJobTypesExcludedFromDefaultQueue[] = 'webVideoTranscodePrioritized'; # GWToolset $wgJobTypesExcludedFromDefaultQueue[] = 'gwtoolsetUploadMetadataJob'; -- To view, visit https://gerrit.wikimedia.org/r/331669 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3aee49682f66cdd7c7a6b9267d8d486affc2903a Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: TMH job queue split into low and high priority
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/331662 ) Change subject: TMH job queue split into low and high priority .. TMH job queue split into low and high priority This is a first step to retooling the queue management for TMH transcode. Lower resolutions and shorter files are now transcoded via one queue ('webVideoTranscodePrioritized' jobs) while high resolutions and long files are transcoded in a second (the existing 'webVideoTranscode' job) Beware that in production, this may require setting up the new queue to send to the scalers! Does not yet address relative prioritization after upload; each queue can still bog down if it gets behind. The thresholds can be configured via global vars: $wgTmhPriorityResolutionThreshold = 480; // pixels height $wgTmhPriorityLengthThreshold = 900; // seconds Bug: T155098 Change-Id: I3d834adddfa68e91bd5369246724cac2360f0de6 --- M TimedMediaHandler.hooks.php M TimedMediaHandler.php M WebVideoTranscode/WebVideoTranscode.php M WebVideoTranscode/WebVideoTranscodeJob.php 4 files changed, 29 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/62/331662/1 diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php index 016ae73..1a1d46e 100644 --- a/TimedMediaHandler.hooks.php +++ b/TimedMediaHandler.hooks.php @@ -261,6 +261,8 @@ // Add transcode job class: $wgJobClasses['webVideoTranscode'] = 'WebVideoTranscodeJob'; + // Same class with different queue priority: + $wgJobClasses['webVideoTranscodePrioritized'] = 'WebVideoTranscodeJob'; // Transcode jobs must be explicitly requested from the job queue: $wgJobTypesExcludedFromDefaultQueue[] = 'webVideoTranscode'; diff --git a/TimedMediaHandler.php b/TimedMediaHandler.php index 15e348a..bbf1ad5 100644 --- a/TimedMediaHandler.php +++ b/TimedMediaHandler.php @@ -244,6 +244,15 @@ $wgFileExtensions = array_merge( $wgFileExtensions, $wgTmhFileExtensions ); +// Transcode resolutions higher than this will run in the low-priority queue +// This'll give us SD transcodes as fast as possible, then do HD later. +$wgTmhPriorityResolutionThreshold = 480; + +// Transcodes of files longer than this (seconds) will run in the low-priority +// queue; defaults to 15 minutes. +// This'll mean long videos won't flood the high-priority queue. +$wgTmhPriorityLengthThreshold = 900; + // Timed Media Handler AutoLoad Classes: $wgAutoloadClasses['TimedMediaHandler'] = "$timedMediaDir/TimedMediaHandler_body.php"; $wgAutoloadClasses['TimedMediaHandlerHooks'] = "$timedMediaDir/TimedMediaHandler.hooks.php"; diff --git a/WebVideoTranscode/WebVideoTranscode.php b/WebVideoTranscode/WebVideoTranscode.php index 0ada0c4..1628ec5 100644 --- a/WebVideoTranscode/WebVideoTranscode.php +++ b/WebVideoTranscode/WebVideoTranscode.php @@ -1153,6 +1153,8 @@ * @param $transcodeKey String transcode key */ public static function updateJobQueue( &$file, $transcodeKey ) { + global $wgTmhPriorityResolutionThreshold, $wgTmhPriorityLengthThreshold; + $fileName = $file->getTitle()->getDbKey(); $db = $file->repo->getMasterDB(); @@ -1182,9 +1184,19 @@ return; } + // Set the priority + $transcodeHeight = 0; + $matches = []; + if ( preg_match( '/^(\d+)p/', $transcodeKey, $matches ) ) { + $transcodeHeight = intval( $matches[0] ); + } + $prioritized = ( $transcodeHeight <= $wgTmhPriorityResolutionThreshold ) + && ( $file->getLength() <= $wgTmhPriorityLengthThreshold ); + $job = new WebVideoTranscodeJob( $file->getTitle(), [ 'transcodeMode' => 'derivative', 'transcodeKey' => $transcodeKey, + 'prioritized' => $prioritized ] ); try { diff --git a/WebVideoTranscode/WebVideoTranscodeJob.php b/WebVideoTranscode/WebVideoTranscodeJob.php index 980a66a..32c43b9 100644 --- a/WebVideoTranscode/WebVideoTranscodeJob.php +++ b/WebVideoTranscode/WebVideoTranscodeJob.php @@ -26,7 +26,12 @@ public $file; public function __construct( $title, $params, $id = 0 ) { - parent::__construct( 'webVideoTranscode', $title, $params, $id ); + if ( isset( $params['prioritized'] ) && $params['prioritized']) { + $command = 'webVideoTranscodePrioritized'; + } else { + $command = 'webVideoTranscode'; + } +
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Fix length calculation for shortening transcode filenames
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/331985 ) Change subject: Fix length calculation for shortening transcode filenames .. Fix length calculation for shortening transcode filenames Follow-up to I826af75e to include the hash, which wasn't being counted causing some files to be miscounted as not requiring shortage. Also made the counting clearer on what it was doing instead of having a random ' + 12' at the end. ;) Should fix long Russian filenames that were _just_ the wrong length to get stored. Bug: T155248 Change-Id: I2a3765bd594f5c12b838f9c2d7593596c1dd3936 --- M WebVideoTranscode/WebVideoTranscode.php 1 file changed, 4 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/85/331985/1 diff --git a/WebVideoTranscode/WebVideoTranscode.php b/WebVideoTranscode/WebVideoTranscode.php index 0ada0c4..eaccdb9 100644 --- a/WebVideoTranscode/WebVideoTranscode.php +++ b/WebVideoTranscode/WebVideoTranscode.php @@ -538,8 +538,8 @@ * Get the name to use as the base name for the transcode. * * Swift has problems where the url-encoded version of -* the path (ie 'filename.ogv/filename.ogv.720p.webm' ) -* is greater that > 1024 bytes, so shorten in that case. +* the path (ie '0/00/filename.ogv/filename.ogv.720p.webm' ) +* is greater than > 1024 bytes, so shorten in that case. * * Future versions might respect FileRepo::$abbrvThreshold. * @@ -549,7 +549,8 @@ */ public static function getTranscodeFileBaseName( $file, $suffix = '' ) { $name = $file->getName(); - if ( strlen( urlencode( $name ) ) * 2 + 12 > 1024 ) { + $length = strlen( urlencode( '0/00/' . $name . '/' . $name . '.' . $suffix ) ); + if ( $length > 1024 ) { return 'transcode' . '.' . $suffix; } else { return $name . '.' . $suffix; -- To view, visit https://gerrit.wikimedia.org/r/331985 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2a3765bd594f5c12b838f9c2d7593596c1dd3936 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Cap .ogv transcode frame rate to 60 fps (1000 fps bug)
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/332066 ) Change subject: Cap .ogv transcode frame rate to 60 fps (1000 fps bug) .. Cap .ogv transcode frame rate to 60 fps (1000 fps bug) ffmpeg sometimes reports that WebM source videos are at 1000 fps which ffmpeg2theora dutifully tries to process output for, creating many duplicate frames. This causes playback troubles, poorer compression, and much larger encoding times, and is generally annoying as heck. As a workaround, cap ffmpeg2theora's .ogv output to 60fps, which is the highest actual frame rate we see in the wild. Along with the 'noUpscaling' option we already use this will not inflate files that have a correct frame rate. This will still create dupe frames on input that's really 30 fps or whatever, but a LOT less. :) Bug: T135671 Change-Id: Ie58aed3a3884fde9353c33233da400b8c0d35bad --- M WebVideoTranscode/WebVideoTranscode.php 1 file changed, 11 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/66/332066/1 diff --git a/WebVideoTranscode/WebVideoTranscode.php b/WebVideoTranscode/WebVideoTranscode.php index eaccdb9..c1b8d1c 100644 --- a/WebVideoTranscode/WebVideoTranscode.php +++ b/WebVideoTranscode/WebVideoTranscode.php @@ -88,7 +88,7 @@ 'framerate' => '15', 'audioQuality' => '-1', 'channels' => '2', - 'noUpscaling'=> 'true', + 'noUpscaling'=> 'true', // also caps to source frame rate 'twopass'=> 'false', // will be overridden by $wgTmhTheoraTwoPassEncoding 'optimize' => 'true', 'keyframeInterval' => '128', @@ -100,9 +100,10 @@ [ 'maxSize'=> '426x240', 'videoBitrate' => '512', + 'framerate' => '60', // max to reduce "1000fps bug" problems 'audioQuality' => '0', 'channels' => '2', - 'noUpscaling'=> 'true', + 'noUpscaling'=> 'true', // also caps to source frame rate 'twopass'=> 'false', // will be overridden by $wgTmhTheoraTwoPassEncoding 'optimize' => 'true', 'keyframeInterval' => '128', @@ -114,9 +115,10 @@ [ 'maxSize'=> '640x360', 'videoBitrate' => '1024', + 'framerate' => '60', // max to reduce "1000fps bug" problems 'audioQuality' => '1', 'channels' => '2', - 'noUpscaling'=> 'true', + 'noUpscaling'=> 'true', // also caps to source frame rate 'twopass'=> 'false', // will be overridden by $wgTmhTheoraTwoPassEncoding 'optimize' => 'true', 'keyframeInterval' => '128', @@ -128,9 +130,10 @@ [ 'maxSize'=> '854x480', 'videoBitrate' => '2048', + 'framerate' => '60', // max to reduce "1000fps bug" problems 'audioQuality' => '2', 'channels' => '2', - 'noUpscaling'=> 'true', + 'noUpscaling'=> 'true', // also caps to source frame rate 'twopass'=> 'false', // will be overridden by $wgTmhTheoraTwoPassEncoding 'optimize' => 'true', 'keyframeInterval' => '128', @@ -143,8 +146,9 @@ [ 'maxSize'=> '1280x720', 'videoQuality' => 6, + 'framerate' =>
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add 'webp' package to ImageMagick role
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/331820 ) Change subject: Add 'webp' package to ImageMagick role .. Add 'webp' package to ImageMagick role ImageMagick converts WebP files through delegation to external programs 'cwebp' and 'dwebp', which live in the 'webp' package and are not installed by the 'imagemagick' package itself. This should fix thumbs for WebP uploads which were enabled today. Bug: T27397 Change-Id: I00c0334aae132db4bb6ddc5e1f29e9d62f381800 --- M modules/imagemagick/manifests/install.pp 1 file changed, 4 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/20/331820/1 diff --git a/modules/imagemagick/manifests/install.pp b/modules/imagemagick/manifests/install.pp index 6881f22..37f09eb 100644 --- a/modules/imagemagick/manifests/install.pp +++ b/modules/imagemagick/manifests/install.pp @@ -17,6 +17,9 @@ group => 'root', mode=> '0644', source => 'puppet:///modules/imagemagick/policy.xml', -require => Class['packages::imagemagick'] +require => [ +Class['packages::imagemagick'], +Class['packages::webp'] +] } } -- To view, visit https://gerrit.wikimedia.org/r/331820 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I00c0334aae132db4bb6ddc5e1f29e9d62f381800 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Apply '-slices' param to ffmpeg for VP8 output
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/344887 ) Change subject: Apply '-slices' param to ffmpeg for VP8 output .. Apply '-slices' param to ffmpeg for VP8 output Creates multiple 'token partitions' in the bitstream allowing decoders that support multithreaded decoding to do so more efficiently. Uses 2 partitions for low resolutions, 4 for HD, 8 for >HD. Also cleaned up some definitions that were erroneously left with old configs. Change-Id: Ib2805e2e2bdd33c73cc25059b3e2d585db68c7e7 --- M WebVideoTranscode/WebVideoTranscode.php M WebVideoTranscode/WebVideoTranscodeJob.php 2 files changed, 13 insertions(+), 19 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/87/344887/1 diff --git a/WebVideoTranscode/WebVideoTranscode.php b/WebVideoTranscode/WebVideoTranscode.php index e34d22e..43cb37e 100644 --- a/WebVideoTranscode/WebVideoTranscode.php +++ b/WebVideoTranscode/WebVideoTranscode.php @@ -176,27 +176,12 @@ 'maxSize'=> '288x160', 'videoBitrate' => '128', 'audioQuality' => '-1', - 'samplerate' => '44100', - 'channels' => '2', 'noUpscaling'=> 'true', 'twopass'=> 'true', 'keyframeInterval' => '128', 'bufDelay' => '256', 'videoCodec' => 'vp8', - 'type' => 'video/webm; codecs="vp8, vorbis"', - ], - WebVideoTranscode::ENC_WEBM_240P => - [ - 'maxSize'=> '426x240', - 'videoBitrate' => '256', - 'audioQuality' => '-1', - 'samplerate' => '44100', - 'channels' => '2', - 'noUpscaling'=> 'true', - 'twopass'=> 'true', - 'keyframeInterval' => '128', - 'bufDelay' => '256', - 'videoCodec' => 'vp8', + 'slices' => '2', 'type' => 'video/webm; codecs="vp8, vorbis"', ], WebVideoTranscode::ENC_WEBM_240P => @@ -204,12 +189,12 @@ 'maxSize'=> '426x240', 'videoBitrate' => '256', 'audioQuality' => '1', - 'samplerate' => '44100', 'noUpscaling'=> 'true', 'twopass'=> 'true', 'keyframeInterval' => '128', 'bufDelay' => '256', 'videoCodec' => 'vp8', + 'slices' => '2', 'type' => 'video/webm; codecs="vp8, vorbis"', ], WebVideoTranscode::ENC_WEBM_360P => @@ -217,12 +202,12 @@ 'maxSize'=> '640x360', 'videoBitrate' => '512', 'audioQuality' => '1', - 'samplerate' => '44100', 'noUpscaling'=> 'true', 'twopass'=> 'true', 'keyframeInterval' => '128', 'bufDelay' => '256', 'videoCodec' => 'vp8', + 'slices' => '2', 'type' => 'video/webm; codecs="vp8, vorbis"', ], WebVideoTranscode::ENC_WEBM_480P => @@ -230,12 +215,12 @@ 'maxSize'=> '854x480', 'videoBitrate' => '1024',
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Remove obsoleted maint scripts in favor of requeueTranscodes...
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/343771 ) Change subject: Remove obsoleted maint scripts in favor of requeueTranscodes.php .. Remove obsoleted maint scripts in favor of requeueTranscodes.php The new requeueTranscodes.php handles several cases better: * has a --throttle option to avoid flooding queues * handles cases where transcode table wasn't filled out right * more flexible config options on one script * should handle multiple overlapping cases better Change-Id: I321d4869ac8ea187c2bbf0fbfc0ce0ad3a540630 --- D maintenance/cleanupTranscodes.php D maintenance/moveTranscoded.php D maintenance/resetTranscodes.php D maintenance/retryTranscodes.php 4 files changed, 0 insertions(+), 197 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/71/343771/1 diff --git a/maintenance/cleanupTranscodes.php b/maintenance/cleanupTranscodes.php deleted file mode 100644 index 6bcf216..000 --- a/maintenance/cleanupTranscodes.php +++ /dev/null @@ -1,47 +0,0 @@ -addOption( "key", "remove all transcodes for given key", false, true ); - $this->addOption( "all", "remove all transcodes", false, false ); - $this->mDescription = "cleanup transcodes left over after changing encoding profiles."; - } - public function execute() { - global $wgEnabledTranscodeSet, $wgEnabledAudioTranscodeSet; - $transcodeSet = array_merge( $wgEnabledTranscodeSet, $wgEnabledAudioTranscodeSet ); - - if ( $this->hasOption( "all" ) ) { - $where = []; - } elseif ( $this->hasOption( "key" ) ) { - $where = [ 'transcode_key' => $this->getOption( 'key' ) ]; - } else { - $where = 'transcode_key NOT IN ("'. implode( '", "', $transcodeSet ).'")'; - } - $this->output( "Cleanup transcodes:\n" ); - $dbr = wfGetDB( DB_SLAVE ); - $res = $dbr->select( 'transcode', '*', $where, __METHOD__ ); - foreach ( $res as $row ) { - $this->output( - 'remove: '. $row->transcode_image_name . ' ' . $row->transcode_key . "\n" - ); - $title = Title::newFromText( $row->transcode_image_name, NS_FILE ); - $file = wfLocalFile( $title ); - WebVideoTranscode::removeTranscodes( $file, $row->transcode_key ); - } - $this->output( "Finished!\n" ); - } -} - -$maintClass = 'CleanupTranscodes'; // Tells it to run the class -require_once RUN_MAINTENANCE_IF_MAIN; diff --git a/maintenance/moveTranscoded.php b/maintenance/moveTranscoded.php deleted file mode 100644 index 2434dd4..000 --- a/maintenance/moveTranscoded.php +++ /dev/null @@ -1,55 +0,0 @@ -mDescription = "move transcoded files from thumb to transcoded container."; - } - public function execute() { - - $this->output( "Move transcoded files:\n" ); - $dbr = wfGetDB( DB_SLAVE ); - $res = $dbr->select( 'transcode', '*', [], __METHOD__ ); - foreach ( $res as $row ) { - $title = Title::newFromText( $row->transcode_image_name, NS_FILE ); - $file = wfLocalFile( $title ); - if ( !$file ) { - continue; - } - $oldPath = $file->getThumbPath( $file->getName() . '.' . $row->transcode_key ); - - $newPath = WebVideoTranscode::getDerivativeFilePath( $file, $row->transcode_key ); - if ( $oldPath != $newPath ) { - if ( $file->repo->fileExists( $oldPath ) ) { - if ( $file->repo->fileExists( $newPath ) ) { - $res = $file->repo->quickPurge( $oldPath ); - if ( !$res ) { - wfDebug( "Could not delete file $oldPath\n" ); - } else { - $this->output( "deleted $oldPath, exists in transcoded container\n" ); - } - } else { - $this->output( " $oldPath => $newPath\n" ); - $file->repo->quickImport( $oldPath, $newPath ); - $file->repo->quickPurge( $oldPath ); - } - } - } - - } -
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Update ogv.js to 1.4.1
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/347025 ) Change subject: Update ogv.js to 1.4.1 .. Update ogv.js to 1.4.1 * new A/V sync mode is much smoother on slow machines * various seek and other bug fixes * VP9 decoder (not used yet) This is a 'slim' JS-only build, skipping the experimental builds in WebAssembly and for multithreaded, since they're not quite stable and not used by default. Change-Id: I0875232ed93c7ba5b08bc0ab941303fcc66cd0fc --- M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/dynamicaudio.swf M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-audio-opus.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-audio-vorbis.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-theora.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-vp8.js A MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-vp9.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-demuxer-ogg.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-demuxer-webm.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-support.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-version.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-worker-audio.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-worker-video.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv.js A MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/pthread-main.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/readme.md 15 files changed, 1,075 insertions(+), 17,116 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/25/347025/1 -- To view, visit https://gerrit.wikimedia.org/r/347025 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0875232ed93c7ba5b08bc0ab941303fcc66cd0fc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Fix seek on resolution switching for ogv.js playback
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/347026 ) Change subject: Fix seek on resolution switching for ogv.js playback .. Fix seek on resolution switching for ogv.js playback Was previously seeking before creating the new player, which reset the play head to 0 seconds when switching resolutions. Now works in right order, and reuses the player instead of creating a new one. Change-Id: I004d3e012e68bb4b689c39415cf4f1455b5cd029 --- M MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js 1 file changed, 7 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/26/347026/1 diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js index b510bb5..7cd9420 100644 --- a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js +++ b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js @@ -178,14 +178,15 @@ var _this = this; var src = source.getSrc(); var vid = this.getPlayerElement(); - if ( typeof vid.stop !== 'undefined' ) { - vid.stop(); + + vid.src = source.src; + if ( switchCallback ) { + switchCallback(); } - switchCallback(); - - // Currently have to tear down the player and make a new one - this.embedPlayerHTML( doneCallback ); + if ( doneCallback ) { + doneCallback(); + } }, /** -- To view, visit https://gerrit.wikimedia.org/r/347026 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I004d3e012e68bb4b689c39415cf4f1455b5cd029 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: WIP - provisional revision table restructure
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/350097 ) Change subject: WIP - provisional revision table restructure .. WIP - provisional revision table restructure Revision table compaction and prep work for MCR Currently includes (untested) tables.sql and a partial patch file for offline restructure (also untested). Still todo: * apply enough changes to archive to support deletion * decide on content_text_id vs content_address * hook up the updater * start prepping code to work with this schema! * online migration state management Open questions: * migrate format of existing archive stuff? * apply 'actor', 'comment' split-out change to non-revision stuff too, or wait to later? * is internal API on Revision enough to cover many changes, or... * ...do we need better API abstractions first? Bug: T161671 Change-Id: I50ee6506ff71e7613e50c33d865199b07918c1de --- A maintenance/archives/patch-revision-restructure.sql M maintenance/tables.sql 2 files changed, 234 insertions(+), 32 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/97/350097/1 diff --git a/maintenance/archives/patch-revision-restructure.sql b/maintenance/archives/patch-revision-restructure.sql new file mode 100644 index 000..b802992 --- /dev/null +++ b/maintenance/archives/patch-revision-restructure.sql @@ -0,0 +1,109 @@ +-- @TODO consider splitting this to three patch files: setup, migration, cleanup. + +-- +-- Setup: +-- Create the new tables, and add new columns to revision... +-- + +-- the table creations are in tables.sql, need to be copied here: +-- @TODO create comment +-- @TODO create actor +-- @TODO create content +-- @TODO create slots + +-- @TODO create slot_role +-- @TODO populate slot_role +-- @TODO create content_format +-- @TODO populate content_format +-- @TODO create content_model +-- @TODO populate content_model + +-- Add new fields to revision +ALTER TABLE revision + CHANGE COLUMN rev_id rev_id bigint unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, + ADD COLUMN rev_comment_id bigint +AFTER rev_page, + ADD COLUMN rev_actor int unsigned NOT NULL default 0 +AFTER rev_comment_id, +; +CREATE INDEX /*i*/actor_timestamp ON /*_*/revision (rev_actor,rev_timestamp); +CREATE INDEX /*i*/page_actor_timestamp ON /*_*/revision (rev_page,rev_actor,rev_timestamp); + +-- +-- Migration: +-- Move data from the old fields to the new tables, brute-force style. +-- +-- Production upgrade would not run this, instead migrating data in small bits +-- through a batch process. +-- +-- If this is run on a small wiki via update.php it should work, but requires +-- the wiki to be offline and won't provide any feedback about how long it +-- takes. +-- +-- A smarter updater plugin could do the migration in the same way we'd do it +-- in production, which might be safer. +-- + +-- Migrate comments... +INSERT INTO comment (comment_id, comment_text) + SELECT rev_id, rev_comment +FROM revision + ORDER BY rev_id; +UPDATE revision + SET rev_comment_id=rev_id + WHERE rev_comment_id IS NULL; + +-- Migrate actors... +INSERT INTO actor (actor_user) + SELECT rev_user FROM user +WHERE rev_user > 0 +GROUP BY rev_user +ORDER BY rev_user; +INSERT INTO actor (actor_text) + SELECT rev_user_text FROM revision +WHERE rev_user = 0 +GROUP BY rev_user_text +ORDER BY rev_user_text; +UPDATE revision + SET rev_actor = (SELECT actor_id FROM actor WHERE actor_user=rev_user) + WHERE rev_user > 0 AND rev_actor IS NULL; +UPDATE revision + SET rev_actor = (SELECT actor_id FROM actor WHERE actor_text=rev_user_text) + WHERE rev_user == 0 AND rev_actor IS NULL; + +-- Migrate content... +INSERT INTO content (cont_id,cont_text_id,cont_len,cont_sha1,cont_model,cont_format) + SELECT rev_id,rev_text_id,rev_len,rev_sha1,cm_id,cf_id +FROM revision + LEFT JOIN content_model ON rev_content_model=cm_model + LEFT JOIN content_format ON rev_content_format=cm_format; + +-- Migrate slot associations... +INSERT INTO slots (slot_revision,slot_content,slot_role) + SELECT rev_id,rev_id,sr_id +FROM revision + LEFT JOIN slot_role ON sr_role='default'; + +-- +-- Cleanup: +-- Once everything is migrated, we can remove the obsolete fields from +-- the revision table and their indexes. +-- +-- Production upgrade would run this on replicas when they're out of rotation. +-- + +-- Drop old fields +ALTER TABLE revision + DROP KEY user_timestamp, + DROP KEY usertext_timestamp, + DROP KEY page_user_timestamp, + + DROP COLUMN rev_comment, + DROP COLUMN rev_text_id, + DROP COLUMN rev_user, + DROP COLUMN rev_user_text, + DROP COLUMN rev_len, + DROP COLUMN rev_sha1, + DROP COLUMN rev_content_model, + DROP COLUMN rev_content_format +; diff --git a/maintenance/tables.sql b/maintenance/tables.sql index 38fef45..fec2bff 100644 --- a/maintenance/tables.sql +++ b/maintenance/tables.sql
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Fix 'seeking' message in ogv.js on end of audio file
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370832 ) Change subject: Fix 'seeking' message in ogv.js on end of audio file .. Fix 'seeking' message in ogv.js on end of audio file Use the 'seeked' event for end and don't trigger seeking mode when not seeking. Bug: T172888 Change-Id: I46bf5d4041ebaad648ca07e9e026fdd6699f4884 --- M MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js 1 file changed, 10 insertions(+), 5 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/32/370832/1 diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js index d523f99..44f3371 100644 --- a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js +++ b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js @@ -197,12 +197,17 @@ this.currentTime = time; this.previousTime = time; // prevent weird double-seek. MwEmbedPlyer is weird! - // Run the onSeeking interface update - this.controlBuilder.onSeek(); - // @todo add proper events upstream if( this.seeking ){ - this.seeking = false; - $( this ).trigger( 'seeked' ); + // Run the onSeeking interface update + this.controlBuilder.onSeek(); + var _this = this; + function onseeked(event) { + _this.seeking = false; + _this.hideSpinner(); + $( _this ).trigger( 'seeked' ); + this.removeEventListener( 'seeked', onseeked ); + } + this.playerElement.addEventListener( 'seeked', onseeked ); } if ( $.isFunction( callback ) ) { callback(); -- To view, visit https://gerrit.wikimedia.org/r/370832 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I46bf5d4041ebaad648ca07e9e026fdd6699f4884 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Use native 'timeupdate' event for ogv.js
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370831 ) Change subject: Use native 'timeupdate' event for ogv.js .. Use native 'timeupdate' event for ogv.js Was previously simulated as didn't exist, but it does now. Change-Id: Id2eca0884ecdc262a422f96664557afc4bacb2b6 --- M MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js 1 file changed, 3 insertions(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/31/370831/1 diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js index 7cd9420..d523f99 100644 --- a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js +++ b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js @@ -89,19 +89,9 @@ _this.onClipDone(); }); - // simulate timeupdate events, needed for subtitles - // @todo switch this to native timeupdate event when available upstream - var lastTime = 0, - timeupdateInterval = 0.25; - player.addEventListener( 'framecallback', function( event ) { - var player = _this.getPlayerElement(), - now = player ? player.currentTime : lastTime; - // Don't spam time updates on every frame - if ( Math.abs( now - lastTime ) >= timeupdateInterval ) { - lastTime = now; - $( _this ).trigger( 'timeupdate', [event, _this.id] ); - } - }); + player.addEventListener( 'timeupdate', function( event ) { + $( _this ).trigger( 'timeupdate', [event, _this.id] ); + } ); $( _this ).empty().append( player ); player.play(); -- To view, visit https://gerrit.wikimedia.org/r/370831 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id2eca0884ecdc262a422f96664557afc4bacb2b6 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: More careful order & size check for video sources
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/371715 ) Change subject: More careful order & size check for video sources .. More careful order & size check for video sources Previously we always used the 'most preferred' codec if available, even if the size was wildly inappropriate. This caused slow playback of large VP9-encoded videos even when a more suitable VP8 or Ogg was available. Now discarding sources larger than the display size, unless it's the only thing available. Bug: T145925 Change-Id: I03ccd572ea386553df037e84ed896237c1f02e49 --- M MwEmbedModules/EmbedPlayer/resources/mw.MediaElement.js 1 file changed, 32 insertions(+), 33 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/15/371715/1 diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.MediaElement.js b/MwEmbedModules/EmbedPlayer/resources/mw.MediaElement.js index 9af4899..f05558a 100644 --- a/MwEmbedModules/EmbedPlayer/resources/mw.MediaElement.js +++ b/MwEmbedModules/EmbedPlayer/resources/mw.MediaElement.js @@ -310,46 +310,45 @@ if( ! namedSourceSet[ codec ] ){ continue; } - if( namedSourceSet[ codec ].length == 1 ){ - mw.log('MediaElement::autoSelectSource: Set 1 source via EmbedPlayer.CodecPreference: ' + namedSourceSet[ codec ][0].getTitle() ); - return setSelectedSource( namedSourceSet[ codec ][0] ); - } else if( namedSourceSet[ codec ].length > 1 ) { - // select based on size: - // Set via embed resolution closest to relative to display size - var minSizeDelta = null; + // select based on size: + // Set via embed resolution closest to relative to display size + var minSizeDelta = null; - // unless we're really slow... - var isBogoSlow = useBogoSlow && OGVCompat.isSlow(); + // unless we're really slow... + var isBogoSlow = useBogoSlow && OGVCompat.isSlow(); - if( this.parentEmbedId ){ - var displayWidth = $('#' + this.parentEmbedId).width(); - $.each( namedSourceSet[ codec ], function(inx, source ){ - if ( ( isBogoSlow && source.height > 240 ) - || (useBogoSlow && source.height > 360 ) ) { - // On iOS or slow Windows devices, large videos decoded in JavaScript are a bad idea! + if( this.parentEmbedId ){ + var displayWidth = $('#' + this.parentEmbedId).width(); + $.each( namedSourceSet[ codec ], function(inx, source ){ + if ( ( isBogoSlow && source.height > 240 ) + || (useBogoSlow && source.height > 360 ) ) { + // On iOS or slow Windows devices, large videos decoded in JavaScript are a bad idea! + // continue + return true; + } + if( source.width && displayWidth ){ + if ( source.width > displayWidth ) { + // Bigger than the space to display? + // Skip it unless it's the only one that fits. // continue return true; } - if( source.width && displayWidth ){ - var sizeDelta = Math.abs( source.width - displayWidth ); - mw.log('MediaElement::autoSelectSource: size delta : ' + sizeDelta + ' for s:' + source.width ); - if(
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [WIP] Early versions of 'actor' column migration
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/365894 ) Change subject: [WIP] Early versions of 'actor' column migration .. [WIP] Early versions of 'actor' column migration Creates actor table. Very incomplete. Bug: T167246 Change-Id: I98210ea8e45a0e22ca3e3300e16df2bf69066f74 --- M RELEASE-NOTES-1.30 A includes/Actor.php M includes/DefaultSettings.php M includes/Revision.php M includes/actions/HistoryAction.php M includes/actions/InfoAction.php M includes/installer/DatabaseUpdater.php M includes/installer/MysqlUpdater.php M includes/installer/SqliteUpdater.php A maintenance/archives/patch-actor-table.sql A maintenance/migrateActor.php 11 files changed, 366 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/94/365894/1 diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30 index 87e6ce5..bd725b9 100644 --- a/RELEASE-NOTES-1.30 +++ b/RELEASE-NOTES-1.30 @@ -41,6 +41,10 @@ enabled by setting $wgUsePigLatinVariant to true. * Added RecentChangesPurgeRows hook to allow extensions to purge data that depends on the recentchanges table. +* Column pairs (*_user, *_user_text) are being replaced with references + to a shared 'actor' table in the database. +** Large wikis may want to use $wgActorTableSchemaMigrationStage to perform + the update at leisure. === Languages updated in 1.30 === diff --git a/includes/Actor.php b/includes/Actor.php new file mode 100644 index 000..debad65 --- /dev/null +++ b/includes/Actor.php @@ -0,0 +1,192 @@ +mId = intval( $id ); + $this->mUserId = is_null( $userId ) ? null : intval( $userId ); + $this->mText = strval( $text ); + } + + /** +* @return int the row id for the actor table +*/ + public function getId() { + return $this->mId; + } + + /** +* @return int|null user_id of the matching user, or null +*/ + public function getUserId() { + return $this->mUserId; + } + + /** +* @return string text form of the username/IP/etc +*/ + public function getText() { + return $this->mText; + } + + /** +* @return User|bool matching User object or nothing +*/ + public function getUser() { + if ( $this->mId ) { + return User::newFromId( $this->mId ); + } else { + return User::newFromName( $this->mText, false ); + } + } +} + +class ActorStore { + protected $mDb; + + public function __construct( IDatabase $db ) { + $this->mDb = $db; + } + + /** +* Store an actor record if necessary given an ID and text, +* returning the record with id. +* +* @param int|null $userId the user id +* @param string $text +* @return Actor +* @throws Exception may be thrown on database error +*/ + public function store( $userId, $text ) { + if ( $userId ) { + $conds = [ 'actor_user' => $userId ]; + } else { + $conds = [ 'actor_text' => $text ]; + } + $row = $this->mDb->selectRow( 'actor', + [ 'actor_id', 'actor_user', 'actor_text' ], + $conds, + __METHOD__ + ); + if ( $row ) { + return new Actor( $row->actor_id, $row->actor_user, $row->actor_text ); + } else { + $id = $this->mDb->nextSequenceValue( 'actor_id_seq' ); + $ok = $this->mDb->insert( 'actor', + [ + 'actor_id' => $id, + 'actor_user' => $userId, + 'actor_text' => $text + ], + __METHOD__ + ); + if ( $ok ) { + $id = $this->mDb->insertId(); + return new Actor( $id, $userId, $text ); + } else { + throw new MWException( 'unexpected failure inserting actor row' ); + } + } + } + + /** +* Provide the columns that would be needed to look up an actor reference +* when manually doing a join to actor table. +* +* @return array of string column names +*/ + public function selectFields() { + return [ 'actor_id', 'actor_user', 'actor_text' ]; + } + + /** +* Create an Actor instance from a database row object. +* @param object $row a DB result row
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix help text for --d on shell.php
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/350783 ) Change subject: Fix help text for --d on shell.php .. Fix help text for --d on shell.php 1 is stderr, not 0 Change-Id: Iaee4ffd5767f8ae693e8ef19371ce38fe6bd1817 --- M maintenance/shell.php 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/83/350783/1 diff --git a/maintenance/shell.php b/maintenance/shell.php index 9f2306f..5df5b54 100644 --- a/maintenance/shell.php +++ b/maintenance/shell.php @@ -49,8 +49,8 @@ parent::__construct(); $this->addOption( 'd', 'For back compatibility with eval.php. ' . - '0 send debug to stderr. ' . - 'With 1 additionally initialize database with debugging ', + '1 send debug to stderr. ' . + 'With 2 additionally initialize database with debugging ', false, true ); } -- To view, visit https://gerrit.wikimedia.org/r/350783 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Iaee4ffd5767f8ae693e8ef19371ce38fe6bd1817 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: [WIP] Enable WebM playback via ogv.js
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370854 ) Change subject: [WIP] Enable WebM playback via ogv.js .. [WIP] Enable WebM playback via ogv.js Do not merge before ready to deploy! WebM is now fairly stable in ogv.js, though current version spams console a bit. Allow WebM to play back via the shim on Safari/IE/Edge. This is prep for removing the Ogg Theora video transcodes from Wikimedia in favor of WebM due to ongoing tooling issues. Bug: T172444 Change-Id: I68f22d7cb0cee4fe3f5742a742d45189b617fe07 --- M MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js M MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js M MwEmbedModules/EmbedPlayer/resources/mw.MediaPlayers.js 3 files changed, 12 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/54/370854/1 diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js index 7cd9420..0eb8b31 100644 --- a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js +++ b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js @@ -41,7 +41,9 @@ * @return OGVPlayer */ _ogvJsInit: function() { - var options = {}; + var options = { + enableWebM: true + }; if ( this._iOSAudioContext ) { // Reuse the audio context we opened earlier options.audioContext = this._iOSAudioContext; diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js index b0a2aff..398a87e 100644 --- a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js +++ b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js @@ -94,6 +94,13 @@ ], 'IEWebMPrompt' ); var ogvJsPlayer = new mw.MediaPlayer( 'ogvJsPlayer', [ + 'video/webm', + 'video/webm; codecs="vp8"', + 'video/webm; codecs="vp8, vorbis"', + 'video/webm; codecs="vp9, opus"', + 'audio/webm', + 'audio/webm; codecs="vorbis"', + 'audio/webm; codecs="opus"', 'video/ogg', 'video/ogg; codecs="theora"', 'video/ogg; codecs="theora, vorbis"', diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.MediaPlayers.js b/MwEmbedModules/EmbedPlayer/resources/mw.MediaPlayers.js index 9d1e34f..bf68ae6 100644 --- a/MwEmbedModules/EmbedPlayer/resources/mw.MediaPlayers.js +++ b/MwEmbedModules/EmbedPlayer/resources/mw.MediaPlayers.js @@ -34,8 +34,8 @@ this.defaultPlayers['application/vnd.apple.mpegurl'] = ['Native']; this.defaultPlayers['video/ogg'] = ['Native', 'Vlc', 'OgvJs', 'Generic', 'VLCApp']; - this.defaultPlayers['audio/webm'] = ['Native', 'Vlc', 'VLCApp', 'IEWebMPrompt']; - this.defaultPlayers['video/webm'] = ['Native', 'Vlc', 'VLCApp', 'IEWebMPrompt']; + this.defaultPlayers['audio/webm'] = ['Native', 'Vlc', 'OgvJs', 'VLCApp', 'IEWebMPrompt']; + this.defaultPlayers['video/webm'] = ['Native', 'Vlc', 'OgvJs', 'VLCApp', 'IEWebMPrompt']; this.defaultPlayers['application/ogg'] = ['Native', 'Vlc', 'OgvJs', 'Generic', 'VLCApp']; this.defaultPlayers['audio/ogg'] = ['Native', 'Vlc', 'OgvJs', 'VLCApp']; this.defaultPlayers['audio/mpeg']= ['Native', 'Kplayer']; -- To view, visit https://gerrit.wikimedia.org/r/370854 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I68f22d7cb0cee4fe3f5742a742d45189b617fe07 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: [WIP] Disable Ogg Theora video transcodes in default config
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370855 ) Change subject: [WIP] Disable Ogg Theora video transcodes in default config .. [WIP] Disable Ogg Theora video transcodes in default config Do not merge prior to deploy! With WebM playback enabled via ogv.js, there's less reason to keep the Ogg Theora video transcodes on Wikimedia or other sites. Removing them by default in favor of just generating WebM. This speeds encoding time and saves disk space, at the cost of the WebM videos requiring more CPU in Safari/IE/Edge with the ogv.js player shim. Prep for removing them from Wikimedia due to ongoing tooling issues with ffmpeg2theora. Bug: T172445 Change-Id: I2ffd2c6d0f87c53c0addc69515fdad803e192199 --- M TimedMediaHandler.php 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/55/370855/1 diff --git a/TimedMediaHandler.php b/TimedMediaHandler.php index c1e4e9a..723bfd9 100644 --- a/TimedMediaHandler.php +++ b/TimedMediaHandler.php @@ -135,7 +135,8 @@ // WebM VP8/Vorbis // primary free/open video format - // supported by Chrome/Firefox/Opera but not Safari/IE/Edge + // supported by Chrome/Firefox/Opera natively + // plays back in Safari/IE/Edge via ogv.js // Very low-bitrate web streamable WebM video WebVideoTranscode::ENC_WEBM_160P, @@ -158,8 +159,10 @@ // A 4K full high quality WebM stream // WebVideoTranscode::ENC_WEBM_2160P, +/* // Ogg Theora/Vorbis - // Fallback for Safari/IE/Edge with ogv.js + // Optional fallback for Safari/IE/Edge with ogv.js + // Faster to encode & play back than WebM but less efficient. // Requires twice the bitrate for same quality as VP8, // and JS decoder can be slow, so shift to smaller sizes. @@ -183,6 +186,7 @@ // Variable-bitrate HD Ogg stream // for ogv.js on reasonably speedy machines WebVideoTranscode::ENC_OGV_1080P, +*/ /* // MP4 H.264/AAC -- To view, visit https://gerrit.wikimedia.org/r/370855 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ffd2c6d0f87c53c0addc69515fdad803e192199 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Avoid setting skin-specific styles on content w/ 'header' class
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/370482 ) Change subject: Avoid setting skin-specific styles on content w/ 'header' class .. Avoid setting skin-specific styles on content w/ 'header' class Content using 'header' as a CSS class was affected by skin styles in Minerva being insufficiently specific to the skin- specific elements. Add '.header-container' to the specifiers for '.header' so they won't conflict anymore. Bug: T172626 Change-Id: Id599c65cb14a4c7d366137b2b4c18d2a4373d767 --- M resources/skins.minerva.base.styles/print.less M resources/skins.minerva.base.styles/ui.less M resources/skins.minerva.print.styles/header.less M resources/skins.minerva.tablet.styles/common.less 4 files changed, 10 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/MinervaNeue refs/changes/82/370482/1 diff --git a/resources/skins.minerva.base.styles/print.less b/resources/skins.minerva.base.styles/print.less index 7f247bc..73eaa04 100644 --- a/resources/skins.minerva.base.styles/print.less +++ b/resources/skins.minerva.base.styles/print.less @@ -1,7 +1,7 @@ @media print { .noprint, .banner-container, - .header, + .header-container .header, .pre-content, .post-content { display: none; diff --git a/resources/skins.minerva.base.styles/ui.less b/resources/skins.minerva.base.styles/ui.less index 0b015f8..0d947e0 100644 --- a/resources/skins.minerva.base.styles/ui.less +++ b/resources/skins.minerva.base.styles/ui.less @@ -69,7 +69,7 @@ } } -.header { +.header-container .header { display: table; width: 100%; border-spacing: 0; @@ -132,7 +132,7 @@ } } -.header > form, +.header-container .header > form, .overlay-header .overlay-title { padding: 0.15em 0; @@ -150,7 +150,7 @@ // FIXME: As soon as HeaderV2 feature flag is removed this entire block can disappear as a search icon // will now be shown on Opera Mini instead. @media all and ( max-width: @wgMFDeviceWidthMobileSmall ) { - .header { + .header-container .header { .search { border: 1px solid @grayLight; // Remove the space for the search icon inside the search bar and increase height to size of button @@ -166,7 +166,7 @@ .search-box, // Selector is needed to override table-cell rules -.header .search-box { +.header-container .header .search-box { display: none; width: auto; } @@ -310,7 +310,7 @@ // FIXME: Create generic class to represent both of these headers .overlay, -.header { +.header-container .header { // need to specify id or else other rules are more important // FIXME: simplify when .icon class from Overlay used instead diff --git a/resources/skins.minerva.print.styles/header.less b/resources/skins.minerva.print.styles/header.less index 06362c2..06f3b3a 100644 --- a/resources/skins.minerva.print.styles/header.less +++ b/resources/skins.minerva.print.styles/header.less @@ -4,7 +4,7 @@ box-shadow: none !important; } -.header { +.header-container .header { border-top: 0; display: block; height: auto; diff --git a/resources/skins.minerva.tablet.styles/common.less b/resources/skins.minerva.tablet.styles/common.less index 8274c19..7e295fd 100644 --- a/resources/skins.minerva.tablet.styles/common.less +++ b/resources/skins.minerva.tablet.styles/common.less @@ -13,7 +13,7 @@ } } - .header { + .header-container .header { .branding-box { width: @brandingBoxWidth; } @@ -146,7 +146,7 @@ #mw-mf-page-center .mw-mf-banner, .banner-container, // FIXME: Generic header class needed me-thinks! - .header, + .header-container .header, .page-header-bar, .content-header, .overlay-header, @@ -163,7 +163,7 @@ max-width: @contentMaxWidthTablet; } - .header { + .header-container .header { // Make sure the main menu and secondary button icon images are aligned // with the content. max-width: @contentMaxWidthTablet + 2 * @iconGutterWidth; -- To view, visit https://gerrit.wikimedia.org/r/370482 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id599c65cb14a4c7d366137b2b4c18d2a4373d767 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/skins/MinervaNeue Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[wmf/1.30.0-wmf.14]: Enable WebM playback via ogv.js
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/373126 ) Change subject: Enable WebM playback via ogv.js .. Enable WebM playback via ogv.js WebM is now fairly stable in ogv.js, though current version spams console a bit. Allow WebM to play back via the shim on Safari/IE/Edge. This is prep for removing the Ogg Theora video transcodes from Wikimedia in favor of WebM due to ongoing tooling issues. Note that due to ordering of codecs, this will cause WebM versions to play back preferably to the Ogg versions as soon as it goes out. Bug: T172444 Change-Id: I68f22d7cb0cee4fe3f5742a742d45189b617fe07 (cherry picked from commit a6f23cae887e638e3e08794f2520446d40e45d84) --- M MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js M MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js M MwEmbedModules/EmbedPlayer/resources/mw.MediaPlayers.js 3 files changed, 15 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/26/373126/1 diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js index 44f3371..3626307 100644 --- a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js +++ b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js @@ -41,7 +41,9 @@ * @return OGVPlayer */ _ogvJsInit: function() { - var options = {}; + var options = { + enableWebM: true + }; if ( this._iOSAudioContext ) { // Reuse the audio context we opened earlier options.audioContext = this._iOSAudioContext; diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js index b0a2aff..e22fc85 100644 --- a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js +++ b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js @@ -94,6 +94,16 @@ ], 'IEWebMPrompt' ); var ogvJsPlayer = new mw.MediaPlayer( 'ogvJsPlayer', [ + 'video/webm', + 'video/webm; codecs="vp8"', + 'video/webm; codecs="vp8, vorbis"', + 'video/webm; codecs="vp8, opus"', + 'video/webm; codecs="vp9"', + 'video/webm; codecs="vp9, vorbis"', + 'video/webm; codecs="vp9, opus"', + 'audio/webm', + 'audio/webm; codecs="vorbis"', + 'audio/webm; codecs="opus"', 'video/ogg', 'video/ogg; codecs="theora"', 'video/ogg; codecs="theora, vorbis"', diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.MediaPlayers.js b/MwEmbedModules/EmbedPlayer/resources/mw.MediaPlayers.js index 9d1e34f..bf68ae6 100644 --- a/MwEmbedModules/EmbedPlayer/resources/mw.MediaPlayers.js +++ b/MwEmbedModules/EmbedPlayer/resources/mw.MediaPlayers.js @@ -34,8 +34,8 @@ this.defaultPlayers['application/vnd.apple.mpegurl'] = ['Native']; this.defaultPlayers['video/ogg'] = ['Native', 'Vlc', 'OgvJs', 'Generic', 'VLCApp']; - this.defaultPlayers['audio/webm'] = ['Native', 'Vlc', 'VLCApp', 'IEWebMPrompt']; - this.defaultPlayers['video/webm'] = ['Native', 'Vlc', 'VLCApp', 'IEWebMPrompt']; + this.defaultPlayers['audio/webm'] = ['Native', 'Vlc', 'OgvJs', 'VLCApp', 'IEWebMPrompt']; + this.defaultPlayers['video/webm'] = ['Native', 'Vlc', 'OgvJs', 'VLCApp', 'IEWebMPrompt']; this.defaultPlayers['application/ogg'] = ['Native', 'Vlc', 'OgvJs', 'Generic', 'VLCApp']; this.defaultPlayers['audio/ogg'] = ['Native', 'Vlc', 'OgvJs', 'VLCApp']; this.defaultPlayers['audio/mpeg']= ['Native', 'Kplayer']; -- To view, visit https://gerrit.wikimedia.org/r/373126 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I68f22d7cb0cee4fe3f5742a742d45189b617fe07 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: wmf/1.30.0-wmf.14 Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[wmf/1.30.0-wmf.15]: Enable WebM playback via ogv.js
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/373127 ) Change subject: Enable WebM playback via ogv.js .. Enable WebM playback via ogv.js WebM is now fairly stable in ogv.js, though current version spams console a bit. Allow WebM to play back via the shim on Safari/IE/Edge. This is prep for removing the Ogg Theora video transcodes from Wikimedia in favor of WebM due to ongoing tooling issues. Note that due to ordering of codecs, this will cause WebM versions to play back preferably to the Ogg versions as soon as it goes out. Bug: T172444 Change-Id: I68f22d7cb0cee4fe3f5742a742d45189b617fe07 (cherry picked from commit a6f23cae887e638e3e08794f2520446d40e45d84) --- M MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js M MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js M MwEmbedModules/EmbedPlayer/resources/mw.MediaPlayers.js 3 files changed, 15 insertions(+), 3 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/27/373127/1 diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js index 44f3371..3626307 100644 --- a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js +++ b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js @@ -41,7 +41,9 @@ * @return OGVPlayer */ _ogvJsInit: function() { - var options = {}; + var options = { + enableWebM: true + }; if ( this._iOSAudioContext ) { // Reuse the audio context we opened earlier options.audioContext = this._iOSAudioContext; diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js index b0a2aff..e22fc85 100644 --- a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js +++ b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedTypes.js @@ -94,6 +94,16 @@ ], 'IEWebMPrompt' ); var ogvJsPlayer = new mw.MediaPlayer( 'ogvJsPlayer', [ + 'video/webm', + 'video/webm; codecs="vp8"', + 'video/webm; codecs="vp8, vorbis"', + 'video/webm; codecs="vp8, opus"', + 'video/webm; codecs="vp9"', + 'video/webm; codecs="vp9, vorbis"', + 'video/webm; codecs="vp9, opus"', + 'audio/webm', + 'audio/webm; codecs="vorbis"', + 'audio/webm; codecs="opus"', 'video/ogg', 'video/ogg; codecs="theora"', 'video/ogg; codecs="theora, vorbis"', diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.MediaPlayers.js b/MwEmbedModules/EmbedPlayer/resources/mw.MediaPlayers.js index 9d1e34f..bf68ae6 100644 --- a/MwEmbedModules/EmbedPlayer/resources/mw.MediaPlayers.js +++ b/MwEmbedModules/EmbedPlayer/resources/mw.MediaPlayers.js @@ -34,8 +34,8 @@ this.defaultPlayers['application/vnd.apple.mpegurl'] = ['Native']; this.defaultPlayers['video/ogg'] = ['Native', 'Vlc', 'OgvJs', 'Generic', 'VLCApp']; - this.defaultPlayers['audio/webm'] = ['Native', 'Vlc', 'VLCApp', 'IEWebMPrompt']; - this.defaultPlayers['video/webm'] = ['Native', 'Vlc', 'VLCApp', 'IEWebMPrompt']; + this.defaultPlayers['audio/webm'] = ['Native', 'Vlc', 'OgvJs', 'VLCApp', 'IEWebMPrompt']; + this.defaultPlayers['video/webm'] = ['Native', 'Vlc', 'OgvJs', 'VLCApp', 'IEWebMPrompt']; this.defaultPlayers['application/ogg'] = ['Native', 'Vlc', 'OgvJs', 'Generic', 'VLCApp']; this.defaultPlayers['audio/ogg'] = ['Native', 'Vlc', 'OgvJs', 'VLCApp']; this.defaultPlayers['audio/mpeg']= ['Native', 'Kplayer']; -- To view, visit https://gerrit.wikimedia.org/r/373127 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I68f22d7cb0cee4fe3f5742a742d45189b617fe07 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: wmf/1.30.0-wmf.15 Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Put print click handler on link, not on list item
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/354998 ) Change subject: Put print click handler on link, not on list item .. Put print click handler on link, not on list item Was responding to clicks outside the link, which was confusing. Bug: T24256 Change-Id: I22f7cf20a08bb4204b0442defeb7cfb83899b969 --- M resources/src/mediawiki/page/ready.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/98/354998/1 diff --git a/resources/src/mediawiki/page/ready.js b/resources/src/mediawiki/page/ready.js index 758e20a..1f6c8a6 100644 --- a/resources/src/mediawiki/page/ready.js +++ b/resources/src/mediawiki/page/ready.js @@ -59,7 +59,7 @@ mw.hook( 'wikipage.categories' ).fire( $nodes ); } - $( '#t-print' ).click( function ( e ) { + $( '#t-print a' ).click( function ( e ) { window.print(); e.preventDefault(); } ); -- To view, visit https://gerrit.wikimedia.org/r/354998 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I22f7cf20a08bb4204b0442defeb7cfb83899b969 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add \b to regexes in BlockLevelPass to avoid confusing tr & ...
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/354607 ) Change subject: Add \b to regexes in BlockLevelPass to avoid confusing tr & track .. Add \b to regexes in BlockLevelPass to avoid confusing tr & track With TimedMediaHandler in video.js mode, videos can be inline, without a wrapper div. Previously, in this mode two paragraphs where one contained a video would end up merged into one paragraph, due to BlockLevelPass matching "" against "___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Support uploads with UTF-8 names on Windows
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/382074 ) Change subject: Support uploads with UTF-8 names on Windows .. Support uploads with UTF-8 names on Windows On PHP 7.1 and later, filesystem functions on Windows use the Unicode system functions, which makes our file handling work for non-ASCII file names. Previously this was blacklisted for Windows on all PHP versions. Versions before 7.1 will still reject Unicode filenames with non-ASCII chars. Bug: T3780 Change-Id: I94377faa5185f133be2dfb7b9b6aeacbd582834f --- M includes/libs/filebackend/FSFileBackend.php 1 file changed, 6 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/74/382074/1 diff --git a/includes/libs/filebackend/FSFileBackend.php b/includes/libs/filebackend/FSFileBackend.php index 30548ef..3b373db 100644 --- a/includes/libs/filebackend/FSFileBackend.php +++ b/includes/libs/filebackend/FSFileBackend.php @@ -99,7 +99,12 @@ } public function getFeatures() { - return !$this->isWindows ? FileBackend::ATTR_UNICODE_PATHS : 0; + if ( $this->isWindows && version_compare( PHP_VERSION, '7.1', 'lt' ) ) { + // PHP before 7.1 used 8-bit code page for filesystem paths on Windows + return 0; + } else { + return FileBackend::ATTR_UNICODE_PATHS; + } } protected function resolveContainerPath( $container, $relStoragePath ) { -- To view, visit https://gerrit.wikimedia.org/r/382074 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I94377faa5185f133be2dfb7b9b6aeacbd582834f Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Retain some WebM metadata for processing purposes
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/376088 ) Change subject: Retain some WebM metadata for processing purposes .. Retain some WebM metadata for processing purposes All Matroska-specific metadata from getid3 was being wiped out from MediaWiki-side processing because there was some extra detailed binary junk in there. Now retaining the 'comments' subsection, which includes things like the writingapp and muxingapp tags. These can be used to detect files copied from YouTube for instance by their listing "Google" for these, though that's not an automatic sign of being a problematic file. Bug: T167000 Change-Id: I195b09ca8713e36477dab3327b8361db35e41dcf --- M handlers/WebMHandler/WebMHandler.php 1 file changed, 56 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/88/376088/1 diff --git a/handlers/WebMHandler/WebMHandler.php b/handlers/WebMHandler/WebMHandler.php index 708a46a..15abfb8 100644 --- a/handlers/WebMHandler/WebMHandler.php +++ b/handlers/WebMHandler/WebMHandler.php @@ -11,7 +11,13 @@ protected function getID3( $path ) { $id3 = parent::getID3( $path ); // Unset some parts of id3 that are too detailed and matroska specific: - unset( $id3['matroska'] ); + // @todo include the basic file codec and other metadata too? + if ( isset( $id3['matroska'] ) ) { + $comments = $id3['matroska']['comments']; + $id3['matroska'] = [ + 'comments' => $comments + ]; + } return $id3; } @@ -173,4 +179,53 @@ $file->getHeight() )->text(); } + + /** +* Display metadata box on file description page. +* +* Very basic, cribbed from OggHandlerTMH fow now. +* Only shows the top-level writing/demuxing app comment. +* +* @param File $file +* @param bool|IContextSource $context Context to use (optional) +* @return array|bool +*/ + public function formatMetadata( $file, $context = false ) { + $metadata = $file->getMetadata(); + + if ( is_string( $metadata ) ) { + $metadata = $this->unpackMetadata( $metadata ); + } + + if ( isset( $metadata['error'] ) ) { + return false; + } + + if ( !$metadata ) { + return false; + } + + $props = []; + + if ( isset( $metadata['matroska'] ) && isset( $metadata['matroska']['comments'] ) ) { + $comments = $metadata['matroska']['comments']; + // Map comments from getid3's matroska handler to output format + // Localization of labels by FormatMetadata... + $map = [ + 'muxingapp' => 'Software', + 'writingapp' => 'Software', + ]; + foreach ( $map as $commentTag => $propTag ) { + if ( isset( $comments[$commentTag] ) ) { + if ( !isset( $props[$propTag] ) ) { + $props[$propTag] = []; + } + $props[$propTag][] = $comments[$commentTag]; + } + } + } + + return $this->formatMetadataHelper( $props, $context ); + } + } -- To view, visit https://gerrit.wikimedia.org/r/376088 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I195b09ca8713e36477dab3327b8361db35e41dcf Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: [WIP] QuickTime MJPEG/MP3 240p video fallback for iOS
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/380886 ) Change subject: [WIP] QuickTime MJPEG/MP3 240p video fallback for iOS .. [WIP] QuickTime MJPEG/MP3 240p video fallback for iOS Still testing this, based on old abandonded patch. As a stopgap until the frontend video rewrite is done, produce video transcodes at low resolution in a format that iOS understands that should be free of patent issues. QuickTime (.mov) container with MJPEG video (no known patents) and MP3 audio (patents expired). iOS and Mac OS understand such files and will play them back in a element in Safari, but video quality is bad and bitrate is high because MJPEG has no interframe compression. Desktop view will get the ogv.js shim along with the rest of the player frontend, so this MJPEG file is only exposed in these situations: * mobile view * JS disabled * HTML-scraping with the JS removed Bug: T101716 Change-Id: I15b971d47bf8862524e3306615cfbc366e6d8116 --- M TimedMediaHandler.php M WebVideoTranscode/WebVideoTranscode.php M WebVideoTranscode/WebVideoTranscodeJob.php M i18n/en.json 4 files changed, 63 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/86/380886/1 diff --git a/TimedMediaHandler.php b/TimedMediaHandler.php index 0cade78..3804eda 100644 --- a/TimedMediaHandler.php +++ b/TimedMediaHandler.php @@ -216,6 +216,9 @@ // A 4K high quality stream; higher end phones, tablets, smart tvs WebVideoTranscode::ENC_H264_2160P, */ + + // Last-ditch fallback for iOS; low visual quality. + WebVideoTranscode::ENC_MJPEG_240P, ]; $wgEnabledAudioTranscodeSet = [ diff --git a/WebVideoTranscode/WebVideoTranscode.php b/WebVideoTranscode/WebVideoTranscode.php index b444c08..768669b 100644 --- a/WebVideoTranscode/WebVideoTranscode.php +++ b/WebVideoTranscode/WebVideoTranscode.php @@ -64,6 +64,9 @@ const ENC_H264_1440P = '1440p.mp4'; const ENC_H264_2160P = '2160p.mp4'; + // mjpeg+mp3 QuickTime profile for iOS + const ENC_MJPEG_240P = '240p.mov'; + const ENC_OGG_VORBIS = 'ogg'; const ENC_OGG_OPUS = 'opus'; const ENC_MP3 = 'mp3'; @@ -478,6 +481,20 @@ 'type' => 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"', ], + // MJPEG/MP3 profile for iOS last-ditch fallback + // Won't look good, but plays. :D + self::ENC_MJPEG_240P => + [ + 'maxSize' => '426x240', + 'videoBitrate' => '1536', + 'framerate' => '15', + 'samplerate' => '44010', + 'bufDelay' => '256', + 'videoCodec' => 'mjpeg', + 'audioCodec' => 'pcm_mulaw', + 'type' => 'video/quicktime; codecs="jpeg, mp3"', + ], + // Audio profiles self::ENC_OGG_VORBIS => [ diff --git a/WebVideoTranscode/WebVideoTranscodeJob.php b/WebVideoTranscode/WebVideoTranscodeJob.php index cec23b2..ebbaa12 100644 --- a/WebVideoTranscode/WebVideoTranscodeJob.php +++ b/WebVideoTranscode/WebVideoTranscodeJob.php @@ -199,7 +199,8 @@ $status = $this->ffmpeg2TheoraEncode( $options ); } elseif ( $options['videoCodec'] == 'vp8' || $options['videoCodec'] == 'vp9' || $options['videoCodec'] == 'h264' || - ( $options['videoCodec'] == 'theora' && $wgFFmpeg2theoraLocation === false ) + ( $options['videoCodec'] == 'theora' && $wgFFmpeg2theoraLocation === false ) || + $options['videoCodec'] == 'mjpeg' ) { // Check for twopass: if ( isset( $options['twopass'] ) ) { @@ -384,6 +385,8 @@ $cmd .= $this->ffmpegAddH264VideoOptions( $options, $pass ); } elseif ( $options['videoCodec'] == 'theora' ) { $cmd .= $this->ffmpegAddTheoraVideoOptions( $options, $pass ); + } elseif ( $options['videoCodec'] == 'mjpeg' ) { + $cmd .= $this->ffmpegAddMJPEGVideoOptions( $options, $pass ); } // Add size options: $cmd .= $this->ffmpegAddVideoSizeOptions( $options ); @@ -631,6 +634,43 @@ } /** +* Adds ffmpeg shell options for MJPEG MOV +* +* @param array $options +* @param string $pass +* @return string +*/ + function ffmpegAddMJPEGVideoOptions( $options, $pass ) { + global $wgFFmpegThreads; + + // Get a local
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Enable MP3 audio transcodes by default
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/380791 ) Change subject: Enable MP3 audio transcodes by default .. Enable MP3 audio transcodes by default Currently TimedMediaHandler's frontend code doesn't work on the mobile view, which means we don't load the ogv.js shim for Mobile Safari. Creating MP3 transcodes for audio means they can get used directly in the mobile view, fixing audio playback for iPhone/iPad and probably Windows Mobile and other "misc" OSs. Note that on desktop Safari/IE/Edge, ogv.js is still used because Ogg has a higher priority than MP3. This may be changed later. Relevant MP3 patents are believed to now be expired. Bug: T165717 Change-Id: Ia06e3a3fe18628b378f786197da430515d9d92d3 --- M TimedMediaHandler.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/91/380791/1 diff --git a/TimedMediaHandler.php b/TimedMediaHandler.php index 0cade78..80b410d 100644 --- a/TimedMediaHandler.php +++ b/TimedMediaHandler.php @@ -225,7 +225,7 @@ // WebVideoTranscode::ENC_OGG_OPUS, // avconv needs libmp3lame support - // WebVideoTranscode::ENC_MP3, + WebVideoTranscode::ENC_MP3, // avconv needs libvo_aacenc support // WebVideoTranscode::ENC_AAC, -- To view, visit https://gerrit.wikimedia.org/r/380791 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia06e3a3fe18628b378f786197da430515d9d92d3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...mwdumper[master]: Workaround to use JVM's UTF-8 decoder in place of Xerces one
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/381733 ) Change subject: Workaround to use JVM's UTF-8 decoder in place of Xerces one .. Workaround to use JVM's UTF-8 decoder in place of Xerces one It's apparently still failing in some edge cases. Applying workaround recommended on the talk page in 2013: https://www.mediawiki.org/wiki/Manual_talk:MWDumper Bug: T176829 Change-Id: I07cef81fa997af699ace105ae72e4fe67fc7eef0 --- M src/org/mediawiki/importer/XmlDumpReader.java 1 file changed, 7 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/mwdumper refs/changes/33/381733/1 diff --git a/src/org/mediawiki/importer/XmlDumpReader.java b/src/org/mediawiki/importer/XmlDumpReader.java index aa25b12..e2c33c6 100644 --- a/src/org/mediawiki/importer/XmlDumpReader.java +++ b/src/org/mediawiki/importer/XmlDumpReader.java @@ -27,6 +27,8 @@ import java.io.IOException; import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.Reader; import java.io.UnsupportedEncodingException; import java.util.Calendar; import java.util.GregorianCalendar; @@ -41,6 +43,7 @@ import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; +import org.xml.sax.InputSource; public class XmlDumpReader extends DefaultHandler { InputStream input; @@ -87,8 +90,11 @@ try { SAXParserFactory factory = SAXParserFactory.newInstance(); SAXParser parser = factory.newSAXParser(); + Reader reader = new InputStreamReader(input, "UTF-8"); + InputSource is = new InputSource(reader); + is.setEncoding("UTF-8"); - parser.parse(input, this); + parser.parse(is, this); } catch (ParserConfigurationException e) { throw (IOException)new IOException(e.getMessage()).initCause(e); } catch (SAXException e) { -- To view, visit https://gerrit.wikimedia.org/r/381733 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I07cef81fa997af699ace105ae72e4fe67fc7eef0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/tools/mwdumper Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[wmf/1.30.0-wmf.15]: Disable Ogg Theora video transcodes in default config
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/373692 ) Change subject: Disable Ogg Theora video transcodes in default config .. Disable Ogg Theora video transcodes in default config With WebM playback enabled via ogv.js, there's less reason to keep the Ogg Theora video transcodes on Wikimedia or other sites. Removing them by default in favor of just generating WebM. This speeds encoding time and saves disk space, at the cost of the WebM videos requiring more CPU in Safari/IE/Edge with the ogv.js player shim. Prep for removing them from Wikimedia due to ongoing tooling issues with ffmpeg2theora. Safe to merge after I68f22d7c goes out fully. Bug: T172445 Change-Id: I2ffd2c6d0f87c53c0addc69515fdad803e192199 (cherry picked from commit 7437bb4c8e4d8caa683fcae4b61d9ef46d670385) --- M TimedMediaHandler.php 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/92/373692/1 diff --git a/TimedMediaHandler.php b/TimedMediaHandler.php index 80ac0ee..0cade78 100644 --- a/TimedMediaHandler.php +++ b/TimedMediaHandler.php @@ -135,7 +135,8 @@ // WebM VP8/Vorbis // primary free/open video format - // supported by Chrome/Firefox/Opera but not Safari/IE/Edge + // supported by Chrome/Firefox/Opera natively + // plays back in Safari/IE/Edge via ogv.js // Very low-bitrate web streamable WebM video WebVideoTranscode::ENC_WEBM_160P, @@ -158,8 +159,10 @@ // A 4K full high quality WebM stream // WebVideoTranscode::ENC_WEBM_2160P, +/* // Ogg Theora/Vorbis - // Fallback for Safari/IE/Edge with ogv.js + // Optional fallback for Safari/IE/Edge with ogv.js + // Faster to encode & play back than WebM but less efficient. // Requires twice the bitrate for same quality as VP8, // and JS decoder can be slow, so shift to smaller sizes. @@ -183,6 +186,7 @@ // Variable-bitrate HD Ogg stream // for ogv.js on reasonably speedy machines WebVideoTranscode::ENC_OGV_1080P, +*/ /* // MP4 H.264/AAC -- To view, visit https://gerrit.wikimedia.org/r/373692 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ffd2c6d0f87c53c0addc69515fdad803e192199 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: wmf/1.30.0-wmf.15 Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Check for new vagrant ruby.exe location on Windows
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/383499 ) Change subject: Check for new vagrant ruby.exe location on Windows .. Check for new vagrant ruby.exe location on Windows Vagrant for Windows has moved ruby.exe to its mingw64 subdir, breaking the setup.bat call. Definitely broken in 1.9.7 and 2.0.0. Adds a check for the old location, and if not present tries the new location instead. Bug: T171380 Change-Id: Ib34569e12cd0bfe6adce58eb2a902f2354be1f14 --- M setup.bat 1 file changed, 5 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/99/383499/1 diff --git a/setup.bat b/setup.bat index a921499..ed00b14 100644 --- a/setup.bat +++ b/setup.bat @@ -14,4 +14,8 @@ for /f "tokens=*" %%F in ('where vagrant.exe') do set vagrant=%%F -"%vagrant%\..\..\embedded\bin\ruby.exe" "%~dp0\support\setup.rb" "%0" %* +if exist "%vagrant%\..\..\embedded\bin\ruby.exe" ( + "%vagrant%\..\..\embedded\bin\ruby.exe" "%~dp0\support\setup.rb" "%0" %* +) else ( + "%vagrant%\..\..\embedded\mingw64\bin\ruby.exe" "%~dp0\support\setup.rb" "%0" %* +) -- To view, visit https://gerrit.wikimedia.org/r/383499 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib34569e12cd0bfe6adce58eb2a902f2354be1f14 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Final adjust to Ogg Theora transcode settings
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/391346 ) Change subject: Final adjust to Ogg Theora transcode settings .. Final adjust to Ogg Theora transcode settings Apply some final tweaks to Ogg Theora transcode settings: * use --soft-target on ffmpeg2theora * use a bandwidth target instead of quality target on HD targets * include 1440p and 2160p defs for comparison testing * don't force super-low frame rate on 15fps (Note that Theora output is not in use in production anymore, and will probably be removed later entirely.) Change-Id: I51c02ba68cea452eb6f393f894018b852b34fc31 --- M WebVideoTranscode/WebVideoTranscode.php M WebVideoTranscode/WebVideoTranscodeJob.php 2 files changed, 43 insertions(+), 4 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/46/391346/1 diff --git a/WebVideoTranscode/WebVideoTranscode.php b/WebVideoTranscode/WebVideoTranscode.php index 8e21edd..c8125ab 100644 --- a/WebVideoTranscode/WebVideoTranscode.php +++ b/WebVideoTranscode/WebVideoTranscode.php @@ -32,6 +32,8 @@ const ENC_OGV_480P = '480p.ogv'; const ENC_OGV_720P = '720p.ogv'; const ENC_OGV_1080P = '1080p.ogv'; + const ENC_OGV_1440P = '1440p.ogv'; + const ENC_OGV_2160P = '2160p.ogv'; // WebM VP8/Vorbis profiles: const ENC_WEBM_160P = '160p.webm'; @@ -84,8 +86,9 @@ self::ENC_OGV_160P => [ 'maxSize'=> '288x160', - 'videoBitrate' => '160', - 'framerate' => '15', + 'videoBitrate' => '256', + 'softTarget' => 'true', + 'framerate' => '60', // max to reduce "1000fps bug" problems 'audioQuality' => '-1', 'channels' => '2', 'noUpscaling'=> 'true', // also caps to source frame rate @@ -100,6 +103,7 @@ [ 'maxSize'=> '426x240', 'videoBitrate' => '512', + 'softTarget' => 'true', 'framerate' => '60', // max to reduce "1000fps bug" problems 'audioQuality' => '0', 'channels' => '2', @@ -115,6 +119,7 @@ [ 'maxSize'=> '640x360', 'videoBitrate' => '1024', + 'softTarget' => 'true', 'framerate' => '60', // max to reduce "1000fps bug" problems 'audioQuality' => '1', 'channels' => '2', @@ -130,6 +135,7 @@ [ 'maxSize'=> '854x480', 'videoBitrate' => '2048', + 'softTarget' => 'true', 'framerate' => '60', // max to reduce "1000fps bug" problems 'audioQuality' => '2', 'channels' => '2', @@ -145,7 +151,8 @@ self::ENC_OGV_720P => [ 'maxSize'=> '1280x720', - 'videoQuality' => 6, + 'videoBitrate' => '4096', + 'softTarget' => 'true', 'framerate' => '60', // max to reduce "1000fps bug" problems 'audioQuality' => 3, 'noUpscaling'=> 'true', // also caps to source frame rate @@ -159,7 +166,38 @@ self::ENC_OGV_1080P => [ 'maxSize'=> '1920x1080', - 'videoQuality' => 6, + 'videoBitrate' => '8192', + 'softTarget' => 'true', + 'framerate' => '60', // max to reduce "1000fps bug" problems +
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Desktop native MP3 at higher priority than ogv.js Ogg
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393941 ) Change subject: Desktop native MP3 at higher priority than ogv.js Ogg .. Desktop native MP3 at higher priority than ogv.js Ogg This gets desktop browsers (Safari, Edge, IE 11) using the native MP3 audio playback when available in higher priority than the ogv.js-based Ogg playback. Browsers with native Ogg playback will continue to see the Ogg files, which usually is the originals so far. This brings desktop and mobile more in line with expectations for what's native/non-native. Bug: T165717 Change-Id: I52da07bae219e5df5431f9756c4100417d0b5036 --- M MwEmbedModules/EmbedPlayer/EmbedPlayer.config.php M MwEmbedModules/EmbedPlayer/resources/mw.MediaElement.js 2 files changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/41/393941/1 diff --git a/MwEmbedModules/EmbedPlayer/EmbedPlayer.config.php b/MwEmbedModules/EmbedPlayer/EmbedPlayer.config.php index 59fa159..7ba89ec 100644 --- a/MwEmbedModules/EmbedPlayer/EmbedPlayer.config.php +++ b/MwEmbedModules/EmbedPlayer/EmbedPlayer.config.php @@ -10,7 +10,7 @@ // The preferred media codec preference // Note user selected format order - 'EmbedPlayer.CodecPreference' => array( 'vp9', 'webm', 'h264', 'ogg', 'mp3' ), + 'EmbedPlayer.CodecPreference' => array( 'vp9', 'webm', 'h264', 'ogg', 'mp3', 'ogvjs' ), // If video tag support should be disabled all-together, used to test // fallback decoding methods and direct file links diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.MediaElement.js b/MwEmbedModules/EmbedPlayer/resources/mw.MediaElement.js index f05558a..d378f2e 100644 --- a/MwEmbedModules/EmbedPlayer/resources/mw.MediaElement.js +++ b/MwEmbedModules/EmbedPlayer/resources/mw.MediaElement.js @@ -272,7 +272,7 @@ break; case 'ogvJsPlayer': useBogoSlow = true; - var shortName = 'ogg'; + var shortName = 'ogvjs'; break; case 'webmNative': var shortName = 'webm'; -- To view, visit https://gerrit.wikimedia.org/r/393941 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I52da07bae219e5df5431f9756c4100417d0b5036 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Remove ffmpeg2theora dependency from TimedMediaHandler
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/393982 ) Change subject: Remove ffmpeg2theora dependency from TimedMediaHandler .. Remove ffmpeg2theora dependency from TimedMediaHandler No longer used in standard install, Ogg Theora output is being deprecated. Change-Id: I0bcd4d7b8fbf055da678add65da7682b145f65af --- M puppet/modules/role/manifests/timedmediahandler.pp 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/82/393982/1 diff --git a/puppet/modules/role/manifests/timedmediahandler.pp b/puppet/modules/role/manifests/timedmediahandler.pp index 143b5f3..5657bd1 100644 --- a/puppet/modules/role/manifests/timedmediahandler.pp +++ b/puppet/modules/role/manifests/timedmediahandler.pp @@ -4,7 +4,6 @@ class role::timedmediahandler { include ::role::multimedia -require_package('ffmpeg2theora') require_package('ffmpeg') mediawiki::extension { 'MwEmbedSupport': } @@ -17,7 +16,7 @@ needs_update => true, composer => true, require => [ -Package['ffmpeg', 'ffmpeg2theora'], +Package['ffmpeg'], Mediawiki::Extension['MwEmbedSupport'] ], } -- To view, visit https://gerrit.wikimedia.org/r/393982 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0bcd4d7b8fbf055da678add65da7682b145f65af Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add WebAssembly application/wasm MIME type
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392567 ) Change subject: Add WebAssembly application/wasm MIME type .. Add WebAssembly application/wasm MIME type Needed to get TimedMediaHandler's .wasm binaries for latest version of ogv.js working via the static.php intermediary, which uses StreamFile::contentTypeFromPath() to check MIME types and refuses to serve out the file if it's unknown. Bug: T179108 Bug: T181022 Change-Id: Ic15c4d985a9cac9e685b12876804504e6eb46171 --- M includes/libs/mime/mime.info M includes/libs/mime/mime.types 2 files changed, 2 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/67/392567/1 diff --git a/includes/libs/mime/mime.info b/includes/libs/mime/mime.info index d8b8be7..3670243 100644 --- a/includes/libs/mime/mime.info +++ b/includes/libs/mime/mime.info @@ -87,6 +87,7 @@ application/x-tcl [EXECUTABLE] application/x-perl [EXECUTABLE] application/x-python [EXECUTABLE] +application/wasm [EXECUTABLE] application/pdf application/acrobat[OFFICE] application/msword [OFFICE] diff --git a/includes/libs/mime/mime.types b/includes/libs/mime/mime.types index f1cd59d..ef6854c 100644 --- a/includes/libs/mime/mime.types +++ b/includes/libs/mime/mime.types @@ -187,3 +187,4 @@ chemical/x-mdl-rgfile rg application/x-amf amf application/sla stl +application/wasm wasm -- To view, visit https://gerrit.wikimedia.org/r/392567 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic15c4d985a9cac9e685b12876804504e6eb46171 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Fix audio/video player regression
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392574 ) Change subject: Fix audio/video player regression .. Fix audio/video player regression Fixes regression from a mistaken overfix in I241d1e Bug: T169385 Change-Id: I30c71e92f0b475f3cecc03c5a2b869e7002c0862 --- M MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/74/392574/1 diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js index 0b6871a..189485b 100644 --- a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js +++ b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayer.js @@ -745,7 +745,8 @@ } // Set up the new embedObj mw.log( 'EmbedPlayer::updatePlaybackInterface: embedding with ' + this.selectedPlayer.library ); - this.selectedPlayer.on('load', function() { + // Note this is not a jQuery event handler, but a call with a callback: + this.selectedPlayer.load(function() { _this.updateLoadedPlayerInterface( callback ); }); }, -- To view, visit https://gerrit.wikimedia.org/r/392574 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I30c71e92f0b475f3cecc03c5a2b869e7002c0862 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Disable wasm, use asm.js codec modules for Safari/Edge
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392575 ) Change subject: Disable wasm, use asm.js codec modules for Safari/Edge .. Disable wasm, use asm.js codec modules for Safari/Edge WebAssembly .wasm versions of the codec modules load faster, but run about the same speed as the JS versions. Both are inscrutable. ;) But having some trouble with the deployment and it should be tested better first. Also we should more thoroughly discuss implications of including binary code modules for JS client-side code, and whether we should be leaning on package managers for importing those. Bug: T181022 Change-Id: I2ac297ca61fbf24c8c5b5428d3af5002b0925109 --- M MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/75/392575/1 diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js index 3626307..e667b41 100644 --- a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js +++ b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js @@ -42,7 +42,7 @@ */ _ogvJsInit: function() { var options = { - enableWebM: true + wasm: false }; if ( this._iOSAudioContext ) { // Reuse the audio context we opened earlier -- To view, visit https://gerrit.wikimedia.org/r/392575 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ac297ca61fbf24c8c5b5428d3af5002b0925109 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[wmf/1.31.0-wmf.8]: Disable wasm, use asm.js codec modules for Safari/Edge
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/392643 ) Change subject: Disable wasm, use asm.js codec modules for Safari/Edge .. Disable wasm, use asm.js codec modules for Safari/Edge WebAssembly .wasm versions of the codec modules load faster, but run about the same speed as the JS versions. Both are inscrutable. ;) But having some trouble with the deployment and it should be tested better first. Also we should more thoroughly discuss implications of including binary code modules for JS client-side code, and whether we should be leaning on package managers for importing those. Bug: T181022 Change-Id: I2ac297ca61fbf24c8c5b5428d3af5002b0925109 --- M MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/43/392643/1 diff --git a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js index 3626307..e667b41 100644 --- a/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js +++ b/MwEmbedModules/EmbedPlayer/resources/mw.EmbedPlayerOgvJs.js @@ -42,7 +42,7 @@ */ _ogvJsInit: function() { var options = { - enableWebM: true + wasm: false }; if ( this._iOSAudioContext ) { // Reuse the audio context we opened earlier -- To view, visit https://gerrit.wikimedia.org/r/392643 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2ac297ca61fbf24c8c5b5428d3af5002b0925109 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: wmf/1.31.0-wmf.8 Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Use constrained quality mode for WebM VP8 and VP9
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/389900 ) Change subject: Use constrained quality mode for WebM VP8 and VP9 .. Use constrained quality mode for WebM VP8 and VP9 Use -crf option for both VP8 and VP9, which uses lower bitrate when possible while maintaining a certain quality level. This tends to use full bitrate for complex videos and lower bitrates for simpler videos with less motion. Replaces the VBR setting last introduced for VP9. * added 'crf' setting * removed the 'vbr' setting previously used for VP9 * tweaked the max size for 2160p VP8 to match VP9. * removed minimum keyframe interval forcing * increased max keyframe interval from 128 to 240 Bug: T70418 Change-Id: Ic48293c9666fc579f9a876a75266acadea326980 --- M WebVideoTranscode/WebVideoTranscode.php M WebVideoTranscode/WebVideoTranscodeJob.php 2 files changed, 38 insertions(+), 30 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/00/389900/1 diff --git a/WebVideoTranscode/WebVideoTranscode.php b/WebVideoTranscode/WebVideoTranscode.php index 71f6460..8e21edd 100644 --- a/WebVideoTranscode/WebVideoTranscode.php +++ b/WebVideoTranscode/WebVideoTranscode.php @@ -175,10 +175,10 @@ [ 'maxSize'=> '288x160', 'videoBitrate' => '128', + 'crf'=> '10', 'audioQuality' => '-1', - 'noUpscaling'=> 'true', 'twopass'=> 'true', - 'keyframeInterval' => '128', + 'keyframeInterval' => '240', 'bufDelay' => '256', 'videoCodec' => 'vp8', 'slices' => '2', @@ -188,10 +188,10 @@ [ 'maxSize'=> '426x240', 'videoBitrate' => '256', + 'crf'=> '10', 'audioQuality' => '1', - 'noUpscaling'=> 'true', 'twopass'=> 'true', - 'keyframeInterval' => '128', + 'keyframeInterval' => '240', 'bufDelay' => '256', 'videoCodec' => 'vp8', 'slices' => '2', @@ -201,10 +201,10 @@ [ 'maxSize'=> '640x360', 'videoBitrate' => '512', + 'crf'=> '10', 'audioQuality' => '1', - 'noUpscaling'=> 'true', 'twopass'=> 'true', - 'keyframeInterval' => '128', + 'keyframeInterval' => '240', 'bufDelay' => '256', 'videoCodec' => 'vp8', 'slices' => '2', @@ -214,10 +214,10 @@ [ 'maxSize'=> '854x480', 'videoBitrate' => '1024', + 'crf'=> '10', 'audioQuality' => '2', - 'noUpscaling'=> 'true', 'twopass'=> 'true', - 'keyframeInterval' => '128', + 'keyframeInterval' => '240', 'bufDelay' => '256', 'videoCodec' => 'vp8', 'slices' => '4', @@ -227,40 +227,52 @@ [ 'maxSize'=> '1280x720', 'videoBitrate' => '2048', + 'crf'=> '10', 'audioQuality' => 3, -
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Update ogv.js to 1.5.0
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/390222 ) Change subject: Update ogv.js to 1.5.0 .. Update ogv.js to 1.5.0 * includes WASM (WebAssembly) builds of modules for faster startup * fixes broken display on Windows of some files * fixes broken aspect ratio in fullscreen on Edge 16 * cleans up console spam * recompilation of everything Change-Id: Ic5020179a1b0f1e9321c14d117b22df455e7050a --- A MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-audio-opus-wasm.js A MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-audio-opus-wasm.wasm M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-audio-opus.js A MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-audio-vorbis-wasm.js A MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-audio-vorbis-wasm.wasm M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-audio-vorbis.js A MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-theora-wasm.js A MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-theora-wasm.wasm M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-theora.js A MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-vp8-wasm.js A MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-vp8-wasm.wasm M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-vp8.js A MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-vp9-wasm.js A MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-vp9-wasm.wasm M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-vp9.js A MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-demuxer-ogg-wasm.js A MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-demuxer-ogg-wasm.wasm M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-demuxer-ogg.js A MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-demuxer-webm-wasm.js A MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-demuxer-webm-wasm.wasm M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-demuxer-webm.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-support.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-version.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-worker-audio.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-worker-video.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv.js D MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/pthread-main.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/readme.md 28 files changed, 956 insertions(+), 873 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/22/390222/1 -- To view, visit https://gerrit.wikimedia.org/r/390222 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic5020179a1b0f1e9321c14d117b22df455e7050a Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Adjust VP9 encoding options
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/388934 ) Change subject: Adjust VP9 encoding options .. Adjust VP9 encoding options Adjusted the encoding options for WebM VP9 video transcodes (not yet used in production). * bumped bandwidth from 50% to 62.5% of the VP8 versions * use 2-pass on all resolutions instead of just some * use -speed 4 on first pass, -speed 1 on second pass * use -auto-alt-ref 1 -lag-in-frames 25 * bump keyframe max interval up to 240 from 128 Still 2-4x slower than VP8 encoding, but quality matches better now. Change-Id: I731a6ca7e7cd0fd8f9e80f2f2cb406abe4edea7e --- M WebVideoTranscode/WebVideoTranscode.php M WebVideoTranscode/WebVideoTranscodeJob.php 2 files changed, 56 insertions(+), 27 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/34/388934/1 diff --git a/WebVideoTranscode/WebVideoTranscode.php b/WebVideoTranscode/WebVideoTranscode.php index b444c08..0e79906 100644 --- a/WebVideoTranscode/WebVideoTranscode.php +++ b/WebVideoTranscode/WebVideoTranscode.php @@ -269,11 +269,13 @@ [ 'maxSize'=> '288x160', 'videoBitrate' => '80', + 'vbr'=> [ 0.5, 1.5, 10 ], // min bitrate, max bitrate, buffer size ratios 'samplerate' => '48000', - 'noUpscaling'=> 'true', 'twopass'=> 'true', - 'keyframeInterval' => '128', + 'altref' => 'true', + 'keyframeInterval' => '240', 'bufDelay' => '256', + 'speed' => '1', 'videoCodec' => 'vp9', 'audioCodec' => 'opus', 'type' => 'video/webm; codecs="vp9, opus"', @@ -281,12 +283,14 @@ self::ENC_VP9_240P => [ 'maxSize'=> '426x240', - 'videoBitrate' => '128', + 'videoBitrate' => '150', + 'vbr'=> [ 0.5, 1.5, 10 ], 'samplerate' => '48000', - 'noUpscaling'=> 'true', 'twopass'=> 'true', - 'keyframeInterval' => '128', + 'altref' => 'true', + 'keyframeInterval' => '240', 'bufDelay' => '256', + 'speed' => '1', 'videoCodec' => 'vp9', 'audioCodec' => 'opus', 'type' => 'video/webm; codecs="vp9, opus"', @@ -294,12 +298,14 @@ self::ENC_VP9_360P => [ 'maxSize'=> '640x360', - 'videoBitrate' => '256', + 'videoBitrate' => '320', + 'vbr'=> [ 0.5, 1.5, 10 ], 'samplerate' => '48000', - 'noUpscaling'=> 'true', 'twopass'=> 'true', - 'keyframeInterval' => '128', + 'altref' => 'true', + 'keyframeInterval' => '240', 'bufDelay' => '256', + 'speed' => '1', 'videoCodec' => 'vp9', 'audioCodec' => 'opus', 'tileColumns'=> '1', @@ -308,12 +314,14 @@ self::ENC_VP9_480P => [ 'maxSize'=> '854x480', - 'videoBitrate' => '512', + 'videoBitrate' => '640', +
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Remove firejail config for now-unused ffmpeg2theora
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403212 ) Change subject: Remove firejail config for now-unused ffmpeg2theora .. Remove firejail config for now-unused ffmpeg2theora ffmpeg2theora is no longer used in production, don't need a firejail config for it. Bug: T181591 Change-Id: Ic21d2759b3b0f161b3206510418f60fd3a598744 --- D modules/mediawiki/files/mediawiki-firejail-ffmpeg2theora M modules/mediawiki/manifests/firejail.pp 2 files changed, 0 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/12/403212/1 diff --git a/modules/mediawiki/files/mediawiki-firejail-ffmpeg2theora b/modules/mediawiki/files/mediawiki-firejail-ffmpeg2theora deleted file mode 100755 index 7c5dfd1..000 --- a/modules/mediawiki/files/mediawiki-firejail-ffmpeg2theora +++ /dev/null @@ -1,5 +0,0 @@ -#! /usr/bin/python -# -*- coding: utf-8 -*- - -import sys, subprocess -subprocess.call(['/usr/bin/firejail', '--profile=/etc/firejail/mediawiki-converters.profile', '/usr/bin/ffmpeg2theora'] + sys.argv[1:]) diff --git a/modules/mediawiki/manifests/firejail.pp b/modules/mediawiki/manifests/firejail.pp index 449ff93..a3d9c9d 100644 --- a/modules/mediawiki/manifests/firejail.pp +++ b/modules/mediawiki/manifests/firejail.pp @@ -14,13 +14,6 @@ mode => '0555', } -file { '/usr/local/bin/mediawiki-firejail-ffmpeg2theora': -source => 'puppet:///modules/mediawiki/mediawiki-firejail-ffmpeg2theora', -owner => 'root', -group => 'root', -mode => '0555', -} - file { '/usr/local/bin/mediawiki-firejail-rsvg-convert': source => 'puppet:///modules/mediawiki/mediawiki-firejail-rsvg-convert', owner => 'root', -- To view, visit https://gerrit.wikimedia.org/r/403212 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic21d2759b3b0f161b3206510418f60fd3a598744 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Regression fix for TMH + Score integration
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/402935 ) Change subject: Regression fix for TMH + Score integration .. Regression fix for TMH + Score integration If there wasn't another TMH invocation on the page, the audio player generated by a ... would not invoke the TMH frontend, resulting in inconsistent appearance and failure to run the Ogg output on Safari/IE/Edge. This was due to changes in the frontend code for TMH a while back; added a workaround to invoke the TMH-side code that sets it up, but not sure this is nice. :D Still want a better interface between these two for the future. Bug: T148716 Change-Id: I0b86d37ac268a45dd3417fc7cbb49f3f7d3adbee --- M includes/Score.php 1 file changed, 8 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Score refs/changes/35/402935/1 diff --git a/includes/Score.php b/includes/Score.php index b7a2583..d9b2ac8 100644 --- a/includes/Score.php +++ b/includes/Score.php @@ -511,6 +511,14 @@ 'width' => self::DEFAULT_PLAYER_WIDTH ] ); $link .= $player->toHtml(); + + // This is a hack for T148716 to load the TMH frontend + // which we're sort of side-using here. In the future, + // we should use a clean standard interface for this. + $tmh = new TimedMediaHandler(); + if ( method_exists( $tmh, 'parserTransformHook' ) ) { + $tmh->parserTransformHook( $parser, null ); + } } if ( $options['override_audio'] !== false ) { $link .= $parser->recursiveTagParse( "[[File:{$options['audio_name']}]]" ); -- To view, visit https://gerrit.wikimedia.org/r/402935 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0b86d37ac268a45dd3417fc7cbb49f3f7d3adbee Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/Score Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Update comment avconv -> ffmpeg
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403470 ) Change subject: Update comment avconv -> ffmpeg .. Update comment avconv -> ffmpeg Update old comment about avconv and ffmpeg2theora, we now use just ffmpeg for the tasks it's mentioning. Change-Id: Ib39022b2c37b033d7acc7dcdfb89fcd465bd50f4 --- M wmf-config/CommonSettings.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config refs/changes/70/403470/1 diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php index 2fb13e7..0cc3007 100644 --- a/wmf-config/CommonSettings.php +++ b/wmf-config/CommonSettings.php @@ -915,7 +915,7 @@ $wgOggThumbLocation = false; // use ffmpeg for performance // tmh1/2 have 12 cores and need lots of shared memory - // for avconv / ffmpeg2theora + // for ffmpeg, which mmaps large input files $wgTranscodeBackgroundMemoryLimit = 4 * 1024 * 1024; // 4GB $wgFFmpegThreads = 2; -- To view, visit https://gerrit.wikimedia.org/r/403470 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib39022b2c37b033d7acc7dcdfb89fcd465bd50f4 Gerrit-PatchSet: 1 Gerrit-Project: operations/mediawiki-config Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Remove Ogg Theora .ogv transcode output code paths
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403180 ) Change subject: Remove Ogg Theora .ogv transcode output code paths .. Remove Ogg Theora .ogv transcode output code paths Since these are no longer used in production, and the conversions tools are hard to maintain due to low general usage, going ahead and taking out the Ogg Theora .ogv transcode output and ffmpeg2theora code paths. Ogg Theora videos are still supported for playback and as transcode sources, which will be converted to WebM or whatever is configured as output. The WebVideoTranscode:ENC_OGV_* constants are no longer defined, so make sure they are removed from your LocalSettings.php Bug: T181591 Change-Id: Ib98662ab8f8f9fe2ef70c1f7a79320285c3cda87 --- M README M TimedMediaHandler.php M TimedMediaHandlerHooks.php M WebVideoTranscode/WebVideoTranscode.php M WebVideoTranscode/WebVideoTranscodeJob.php 5 files changed, 24 insertions(+), 349 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/80/403180/1 diff --git a/README b/README index bc43088..9736aca 100644 --- a/README +++ b/README @@ -19,6 +19,16 @@ require( "$IP/extensions/TimedMediaHandler/TimedMediaHandler.php" ); +== Updates in 2018 == + +Ogg Theora (.ogv) video output has been removed due to ongoing issues with +ffmpeg2theora and libtheora packaging. WebM is now be used as the preferred +royalty-free video output by default. Ogg files are still supported, but +videos will be transcoded to WebM. + +If your LocalSettings.php used one of the WebVideoTranscode::ENC_OGV_160P etc +constants, you may need to remove them after updating to a current version. + == Running Transcodes == Transcoding a video to another resolution or format takes a good amount which @@ -30,6 +40,7 @@ forget to su as a webserver user): php runJobs.php --type webVideoTranscode --maxjobs 1 + php runJobs.php --type webVideoTranscodePrioritized --maxjobs 1 == Kaltura HTML5 player library == @@ -41,26 +52,19 @@ http://www.html5video.org/kaltura-player/docs -== Libav == +== ffmpeg == -We use Libav for two purposes: +We use ffmpeg for two purposes: - creating still images of videos (aka thumbnails) - - transcoding WebM, H.264 videos + - transcoding between WebM, Ogg and/or H.264 videos -Wikimedia currently uses libav as shipped in Ubuntu 12.04 (libav 0.8.x). -For best experience use that or any later release from http://libav.org. +Wikimedia currently uses ffmpeg as shipped in Debian 9. +For best experience use that or any later release from http://ffmpeg.org On Ubuntu/Debian: - apt-get install libav-tools + apt-get install ffmpeg -For H.264 support: - apt-get install libav-tools libavcodec-extra-53 - -If you operating system does not include the required libav software, -you can download static builds for multiple platforms at: - http://firefogg.org/nightly/ - -You can also build libav/ffmpeg from source. +You can also build ffmpeg from source. Guide for building ffmpeg with H.264 for Ubuntu: https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide @@ -77,21 +81,6 @@ Default being `/usr/bin/avconv`. - -== ffmpeg2theora == - -We use ffmpeg2theora for extract metadata from videos, you will need a copy on -your server. For best experience, use the latest release of ffmpeg2theora. At a -minimum you need to use ffmpeg2theora 0.27. - -You can download static ffmpeg2theora builds for multiple platforms at: -http://firefogg.org/nightly/ - -Set the ffmpeg2theora binary location with: - -$wgFFmpeg2theoraLocation = '/path/to/ffmpeg2theora'; - -Default being `/usr/bin/ffmpeg2theora`. == oggThumb == diff --git a/TimedMediaHandler.php b/TimedMediaHandler.php index cfee6ef..98e205e 100644 --- a/TimedMediaHandler.php +++ b/TimedMediaHandler.php @@ -92,11 +92,6 @@ // Number of threads to use in avconv for transcoding $wgFFmpegThreads = 1; -// The location of ffmpeg2theora (transcoding) -// Set to false to use avconv/ffmpeg to produce Ogg Theora transcodes instead; -// beware this will disable Ogg skeleton metadata generation. -$wgFFmpeg2theoraLocation = '/usr/bin/ffmpeg2theora'; - // Location of oggThumb binary ( used instead of ffmpeg ) $wgOggThumbLocation = '/usr/bin/oggThumb'; @@ -236,11 +231,6 @@ // If mp4 source assets can be ingested: $wgTmhEnableMp4Uploads = false; - -// Two-pass encoding for .ogv Theora transcodes is flaky as of October 2015. -// Enable this only if testing with latest theora libraries! -// See tracking bug: https://phabricator.wikimedia.org/T115883 -$wgTmhTheoraTwoPassEncoding = false; /* CONFIGURATION ENDS HERE */ diff --git a/TimedMediaHandlerHooks.php b/TimedMediaHandlerHooks.php index 64dbf97..448f9b4 100644 --- a/TimedMediaHandlerHooks.php +++ b/TimedMediaHandlerHooks.php @@ -208,7 +208,7 @@ $wgResourceModules,
[MediaWiki-commits] [Gerrit] operations/puppet[production]: Install php7.0-bz2 package, needed for dumps
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/403193 ) Change subject: Install php7.0-bz2 package, needed for dumps .. Install php7.0-bz2 package, needed for dumps This may help with a problem that cropped up where bzip2 stream wrappers are missing on php 7.0 in beta and production. Change-Id: I1c453436d85bfd1561dbc78895e958d007dc9b1d --- M modules/contint/manifests/packages/php.pp 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/93/403193/1 diff --git a/modules/contint/manifests/packages/php.pp b/modules/contint/manifests/packages/php.pp index e77d5e0..97cdd18 100644 --- a/modules/contint/manifests/packages/php.pp +++ b/modules/contint/manifests/packages/php.pp @@ -60,6 +60,7 @@ # ..and these are part of php5-common, # but now are separate packages 'php7.0-bcmath', +'php7.0-bz2', 'php7.0-mbstring', 'php7.0-xml', 'php-imagick', -- To view, visit https://gerrit.wikimedia.org/r/403193 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1c453436d85bfd1561dbc78895e958d007dc9b1d Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Update video.js to v6
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/405088 ) Change subject: Update video.js to v6 .. Update video.js to v6 * update video.js to 6.6.0 * switched from videojs-resolution-switcher to videojs-resolution-switcher-v6 * res switcher icon is still broken, but switching works * removed videojs-replay, video.js natively does this now Bug: T165815 Change-Id: I6a0a45e4b84c72fb8535ee86a71221f68284aefd --- M Gruntfile.js M TimedMediaHandlerHooks.php M package.json M resources/ext.tmh.player.js M resources/mw-info-button/mw-info-button.js D resources/videojs-replay/lang/en.js D resources/videojs-replay/videojs-replay.css D resources/videojs-replay/videojs-replay.js M resources/videojs-resolution-switcher/videojs-resolution-switcher.js A resources/videojs-responsive-layout/videojs-responsive-layout.min.js M resources/videojs/font/VideoJS.eot M resources/videojs/font/VideoJS.svg M resources/videojs/font/VideoJS.ttf M resources/videojs/font/VideoJS.woff M resources/videojs/lang/ar.js M resources/videojs/lang/de.js M resources/videojs/lang/el.js M resources/videojs/lang/en.js M resources/videojs/lang/es.js M resources/videojs/lang/fa.js M resources/videojs/lang/fr.js A resources/videojs/lang/gl.js A resources/videojs/lang/he.js M resources/videojs/lang/nl.js M resources/videojs/lang/pl.js A resources/videojs/lang/pt-PT.js M resources/videojs/lang/ru.js A resources/videojs/lang/sk.js M resources/videojs/lang/tr.js M resources/videojs/lang/uk.js M resources/videojs/lang/vi.js M resources/videojs/lang/zh-CN.js M resources/videojs/lang/zh-TW.js M resources/videojs/video-js.css M resources/videojs/video-js.swf A resources/videojs/video.cjs.js A resources/videojs/video.es.js M resources/videojs/video.js 38 files changed, 70,658 insertions(+), 22,342 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/88/405088/1 -- To view, visit https://gerrit.wikimedia.org/r/405088 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I6a0a45e4b84c72fb8535ee86a71221f68284aefd Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Update ogv.js to 1.5.3
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/405221 ) Change subject: Update ogv.js to 1.5.3 .. Update ogv.js to 1.5.3 * fixes canPlayType, will be needed for video.js updates * compiler build chain update to emscripten 1.37.28 * minor internals cleanup Also added 'grunt update-ogvjs' command to automate copying from the node_modules dir. Need to update package manually, then copy with the grunt command. Change-Id: I0097f11baf6a0f055220a8f43133edf3007c3469 --- M Gruntfile.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-audio-opus-wasm.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-audio-opus-wasm.wasm M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-audio-opus.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-audio-vorbis-wasm.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-audio-vorbis-wasm.wasm M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-audio-vorbis.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-theora-wasm.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-theora-wasm.wasm M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-theora.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-vp8-wasm.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-vp8-wasm.wasm M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-vp8.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-vp9-wasm.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-vp9-wasm.wasm M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-decoder-video-vp9.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-demuxer-ogg-wasm.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-demuxer-ogg-wasm.wasm M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-demuxer-ogg.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-demuxer-webm-wasm.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-demuxer-webm-wasm.wasm M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-demuxer-webm.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-support.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-version.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-worker-audio.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv-worker-video.js M MwEmbedModules/EmbedPlayer/binPlayers/ogv.js/ogv.js M package.json 28 files changed, 755 insertions(+), 667 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/21/405221/1 -- To view, visit https://gerrit.wikimedia.org/r/405221 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I0097f11baf6a0f055220a8f43133edf3007c3469 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Blacklist ogv.js's wasm on iOS 11.2.5 as well
Brion VIBBER has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/405989 ) Change subject: Blacklist ogv.js's wasm on iOS 11.2.5 as well .. Blacklist ogv.js's wasm on iOS 11.2.5 as well Work around upstream breakage in webkit. Change-Id: I95dcdbfc78d28ce2d53c01d460b344c1e3dc4da9 --- M resources/ext.tmh.player.js 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/89/405989/1 diff --git a/resources/ext.tmh.player.js b/resources/ext.tmh.player.js index 4260aaa..0528af6 100644 --- a/resources/ext.tmh.player.js +++ b/resources/ext.tmh.player.js @@ -137,7 +137,7 @@ base: mw.OgvJsSupport.basePath(), // Disable WebAssembly on iOS 11.2.2, where it's broken. - wasm: ( typeof WebAssembly === 'object' ) && !( navigator.userAgent.match( /(iPhone|iPad); CPU OS 11_2_2/ ) ) + wasm: ( typeof WebAssembly === 'object' ) && !( navigator.userAgent.match( /(iPhone|iPad); CPU OS 11_2_[2-5]/ ) ) }; globalConfig.techOrder.push( 'ogvjs' ); } -- To view, visit https://gerrit.wikimedia.org/r/405989 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I95dcdbfc78d28ce2d53c01d460b344c1e3dc4da9 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Brion VIBBER___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
< 11 12 13 14 15 16