[MediaWiki-commits] [Gerrit] TEST: DO NOT MERGE - change (mediawiki...TimedMediaHandler)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/251701 Change subject: TEST: DO NOT MERGE .. TEST: DO NOT MERGE Change-Id: Ie2ce639247bf38721b372ed3fe200fcb2d9f91d0 --- D README A README.md M TimedMediaHandler.hooks.php M TimedMediaHandler.php M WebVideoTranscode/WebVideoTranscode.php A extension.json 6 files changed, 677 insertions(+), 497 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/01/251701/1 diff --git a/README b/README deleted file mode 100644 index c37c5ad..000 --- a/README +++ /dev/null @@ -1,127 +0,0 @@ -== TimedMediaHandler == - -This extension provides a media handler for the Ogg, WebM, mp4 container format. -When enabled, a player will be automatically embedded in the file description -page, or any wiki page while still using the same syntax as for images. - -* Broad support for input file formats -* Transcoder to make video at web resolutions when embedding clips in a page -* include support for timed Text per the w3c "track" recommendation -* use embedPlayer mwEmbed javascript module for playback - -To install this extension, add the following to the end of your -LocalSettings.php: - - // You need mwEmbedSupport ( if not already added ) - require( "$IP/extensions/MwEmbedSupport/MwEmbedSupport.php" ); - - // TimedMediaHandler -require( "$IP/extensions/TimedMediaHandler/TimedMediaHandler.php" ); - - -== Running Transcodes == - -Transcoding a video to another resolution or format takes a good amount which -prevents that processing to be handled as a web service. Instead, the extension -implements an asynchronous job, named webVideoTranscode, which you must be -running regularly as your web server user. - -The job can be run using the MediaWiki maintenance/runJobs.php utility (do not -forget to su as a webserver user): - - php runJobs.php --type webVideoTranscode --maxjobs 1 - - -== Kaltura HTML5 player library == - -TimedMediaHandler uses the Kaltura HTML5 player library for video playback, it -relies on the element as well as JavaScript. - -For more information about the player library visit: - http://www.html5video.org/kaltura-player/docs - - -== Libav == - -We use Libav for two purposes: - - creating still images of videos (aka thumbnails) - - transcoding WebM, 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. - -On Ubuntu/Debian: - apt-get install libav-tools - -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. -Guide for building ffmpeg with H.264 for Ubuntu: -https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide - -Some old versions of FFmpeg had a bug which made it extremely slow to seek in -large theora videos in order to generate a thumbnail. If you are using an old -version of FFmpeg and find that performance is extremely poor (tens of seconds) -to generate thumbnails of theora videos that are several minutes or more in -length. Please update to a more recent version. - -In MediaWiki configuration, after the require line in LocalSettings.php, you -will have to specify the FFmpeg binary location with: - -$wgFFmpegLocation = '/path/to/ffmpeg'; - -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 ffmpeg2thoera 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 - -We use oggvideotools for creating still images of videos, you will need a copy on your -server. - -Set the oggThumb binary location with: - -$wgOggThumbLocation = '/path/to/oggThumb'; - -Download oggThumb from: http://dev.streamnik.de/oggvideotools.html - -== PEAR File_Ogg == - -Tim Starling, a Wikimedia developer, forked the PEAR File_Ogg package and -improved it significantly to support this extension. - -The PEAR bundle is licensed under the LGPL, you can get informations about -this package on the pear webpage: - - http://pear.php.net/package/File_Ogg - -== getID3 == - -getID3 is used for metadata of WebM files. - -getID3() by James Heinrich-available at http://getid3.sourceforge.net -or http://www.getid3.org/ - -getID3 code is released under the GNU GPL: -http://www.gnu.org/copyleft/gpl.html diff --git a/README.md b/README.md new
[MediaWiki-commits] [Gerrit] Test: DO NOT MERGE - change (mediawiki...TimedMediaHandler)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/251545 Change subject: Test: DO NOT MERGE .. Test: DO NOT MERGE Change-Id: I220e2a6fa16fadb22199107b73eabfb02fa18c6b --- D README A README.md M TimedMediaHandler.hooks.php M TimedMediaHandler.php M WebVideoTranscode/WebVideoTranscode.php A extension.json 6 files changed, 891 insertions(+), 764 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/45/251545/1 diff --git a/README b/README deleted file mode 100644 index c37c5ad..000 --- a/README +++ /dev/null @@ -1,127 +0,0 @@ -== TimedMediaHandler == - -This extension provides a media handler for the Ogg, WebM, mp4 container format. -When enabled, a player will be automatically embedded in the file description -page, or any wiki page while still using the same syntax as for images. - -* Broad support for input file formats -* Transcoder to make video at web resolutions when embedding clips in a page -* include support for timed Text per the w3c "track" recommendation -* use embedPlayer mwEmbed javascript module for playback - -To install this extension, add the following to the end of your -LocalSettings.php: - - // You need mwEmbedSupport ( if not already added ) - require( "$IP/extensions/MwEmbedSupport/MwEmbedSupport.php" ); - - // TimedMediaHandler -require( "$IP/extensions/TimedMediaHandler/TimedMediaHandler.php" ); - - -== Running Transcodes == - -Transcoding a video to another resolution or format takes a good amount which -prevents that processing to be handled as a web service. Instead, the extension -implements an asynchronous job, named webVideoTranscode, which you must be -running regularly as your web server user. - -The job can be run using the MediaWiki maintenance/runJobs.php utility (do not -forget to su as a webserver user): - - php runJobs.php --type webVideoTranscode --maxjobs 1 - - -== Kaltura HTML5 player library == - -TimedMediaHandler uses the Kaltura HTML5 player library for video playback, it -relies on the element as well as JavaScript. - -For more information about the player library visit: - http://www.html5video.org/kaltura-player/docs - - -== Libav == - -We use Libav for two purposes: - - creating still images of videos (aka thumbnails) - - transcoding WebM, 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. - -On Ubuntu/Debian: - apt-get install libav-tools - -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. -Guide for building ffmpeg with H.264 for Ubuntu: -https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide - -Some old versions of FFmpeg had a bug which made it extremely slow to seek in -large theora videos in order to generate a thumbnail. If you are using an old -version of FFmpeg and find that performance is extremely poor (tens of seconds) -to generate thumbnails of theora videos that are several minutes or more in -length. Please update to a more recent version. - -In MediaWiki configuration, after the require line in LocalSettings.php, you -will have to specify the FFmpeg binary location with: - -$wgFFmpegLocation = '/path/to/ffmpeg'; - -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 ffmpeg2thoera 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 - -We use oggvideotools for creating still images of videos, you will need a copy on your -server. - -Set the oggThumb binary location with: - -$wgOggThumbLocation = '/path/to/oggThumb'; - -Download oggThumb from: http://dev.streamnik.de/oggvideotools.html - -== PEAR File_Ogg == - -Tim Starling, a Wikimedia developer, forked the PEAR File_Ogg package and -improved it significantly to support this extension. - -The PEAR bundle is licensed under the LGPL, you can get informations about -this package on the pear webpage: - - http://pear.php.net/package/File_Ogg - -== getID3 == - -getID3 is used for metadata of WebM files. - -getID3() by James Heinrich-available at http://getid3.sourceforge.net -or http://www.getid3.org/ - -getID3 code is released under the GNU GPL: -http://www.gnu.org/copyleft/gpl.html diff --git a/README.md b/README.md new
[MediaWiki-commits] [Gerrit] TEST: DO NOT MERGE - change (mediawiki...TimedMediaHandler)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/250951 Change subject: TEST: DO NOT MERGE .. TEST: DO NOT MERGE Change-Id: I94df1c3ae4f78d18b229dc2d30253b276c8385af --- D README A README.md M TimedMediaHandler.hooks.php M TimedMediaHandler.php M WebVideoTranscode/WebVideoTranscode.php A extension.json 6 files changed, 1,266 insertions(+), 765 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/51/250951/1 diff --git a/README b/README deleted file mode 100644 index c37c5ad..000 --- a/README +++ /dev/null @@ -1,127 +0,0 @@ -== TimedMediaHandler == - -This extension provides a media handler for the Ogg, WebM, mp4 container format. -When enabled, a player will be automatically embedded in the file description -page, or any wiki page while still using the same syntax as for images. - -* Broad support for input file formats -* Transcoder to make video at web resolutions when embedding clips in a page -* include support for timed Text per the w3c "track" recommendation -* use embedPlayer mwEmbed javascript module for playback - -To install this extension, add the following to the end of your -LocalSettings.php: - - // You need mwEmbedSupport ( if not already added ) - require( "$IP/extensions/MwEmbedSupport/MwEmbedSupport.php" ); - - // TimedMediaHandler -require( "$IP/extensions/TimedMediaHandler/TimedMediaHandler.php" ); - - -== Running Transcodes == - -Transcoding a video to another resolution or format takes a good amount which -prevents that processing to be handled as a web service. Instead, the extension -implements an asynchronous job, named webVideoTranscode, which you must be -running regularly as your web server user. - -The job can be run using the MediaWiki maintenance/runJobs.php utility (do not -forget to su as a webserver user): - - php runJobs.php --type webVideoTranscode --maxjobs 1 - - -== Kaltura HTML5 player library == - -TimedMediaHandler uses the Kaltura HTML5 player library for video playback, it -relies on the element as well as JavaScript. - -For more information about the player library visit: - http://www.html5video.org/kaltura-player/docs - - -== Libav == - -We use Libav for two purposes: - - creating still images of videos (aka thumbnails) - - transcoding WebM, 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. - -On Ubuntu/Debian: - apt-get install libav-tools - -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. -Guide for building ffmpeg with H.264 for Ubuntu: -https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide - -Some old versions of FFmpeg had a bug which made it extremely slow to seek in -large theora videos in order to generate a thumbnail. If you are using an old -version of FFmpeg and find that performance is extremely poor (tens of seconds) -to generate thumbnails of theora videos that are several minutes or more in -length. Please update to a more recent version. - -In MediaWiki configuration, after the require line in LocalSettings.php, you -will have to specify the FFmpeg binary location with: - -$wgFFmpegLocation = '/path/to/ffmpeg'; - -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 ffmpeg2thoera 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 - -We use oggvideotools for creating still images of videos, you will need a copy on your -server. - -Set the oggThumb binary location with: - -$wgOggThumbLocation = '/path/to/oggThumb'; - -Download oggThumb from: http://dev.streamnik.de/oggvideotools.html - -== PEAR File_Ogg == - -Tim Starling, a Wikimedia developer, forked the PEAR File_Ogg package and -improved it significantly to support this extension. - -The PEAR bundle is licensed under the LGPL, you can get informations about -this package on the pear webpage: - - http://pear.php.net/package/File_Ogg - -== getID3 == - -getID3 is used for metadata of WebM files. - -getID3() by James Heinrich-available at http://getid3.sourceforge.net -or http://www.getid3.org/ - -getID3 code is released under the GNU GPL: -http://www.gnu.org/copyleft/gpl.html diff --git a/README.md b/README.md new
[MediaWiki-commits] [Gerrit] Test: DO NOT MERGE - change (mediawiki...TimedMediaHandler)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/247917 Change subject: Test: DO NOT MERGE .. Test: DO NOT MERGE Change-Id: Ib0536cdeef11cfb57a843a0da5a9f106336098a0 --- M tests/phpunit/TestVideoThumbnail.php 1 file changed, 0 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/17/247917/1 diff --git a/tests/phpunit/TestVideoThumbnail.php b/tests/phpunit/TestVideoThumbnail.php index b3c9ef8..3db9d6d 100644 --- a/tests/phpunit/TestVideoThumbnail.php +++ b/tests/phpunit/TestVideoThumbnail.php @@ -10,8 +10,6 @@ * Once video files are uploaded test thumbnail generating * * @dataProvider mediaFilesProvider -* Broken as per bug 61877 -* @group Broken */ function testApiThumbnails( $file ){ // Upload the file to the mediaWiki system -- To view, visit https://gerrit.wikimedia.org/r/247917 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib0536cdeef11cfb57a843a0da5a9f106336098a0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/TimedMediaHandler Gerrit-Branch: master Gerrit-Owner: Paladox___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Test: DO NOT MERGE - change (mediawiki...TimedMediaHandler)
Paladox has uploaded a new change for review. https://gerrit.wikimedia.org/r/236000 Change subject: Test: DO NOT MERGE .. Test: DO NOT MERGE Change-Id: I0f2253100cb9fb1aa39973412422e8d55ed54d36 --- M MwEmbedModules/EmbedPlayer/resources/skins/mw.PlayerControlBuilder.js M TimedMediaHandler.hooks.php M TimedMediaHandler_body.php M TimedMediaTransformOutput.php M resources/PopUpThumbVideo.css A resources/ext.tmh.thumbnail A resources/ext.tmh.thumbnail.css 7 files changed, 25 insertions(+), 10 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler refs/changes/00/236000/1 diff --git a/MwEmbedModules/EmbedPlayer/resources/skins/mw.PlayerControlBuilder.js b/MwEmbedModules/EmbedPlayer/resources/skins/mw.PlayerControlBuilder.js index 5ef54d4..60a82c6 100644 --- a/MwEmbedModules/EmbedPlayer/resources/skins/mw.PlayerControlBuilder.js +++ b/MwEmbedModules/EmbedPlayer/resources/skins/mw.PlayerControlBuilder.js @@ -370,7 +370,6 @@ getPlayButtonPosition: function() { var _this = this; return { - 'position' : 'absolute', 'left' : '50%', 'top' : '50%', 'margin-left' : - .5 * this.getComponentWidth( 'playButtonLarge' ), diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php index 83432a3..54b7304 100644 --- a/TimedMediaHandler.hooks.php +++ b/TimedMediaHandler.hooks.php @@ -59,6 +59,9 @@ // Add the PopUpMediaTransform module ( specific to timedMedia handler ( no support in mwEmbed modules ) $wgResourceModules+= array( + 'ext.tmh.thumbnail.styles' => $baseExtensionResource + array( + 'styles' => 'resources/ext.tmh.thumbnail.css', + ), 'mw.PopUpMediaTransform' => $baseExtensionResource + array( 'scripts' => 'resources/mw.PopUpThumbVideo.js', 'dependencies' => array( 'mw.MwEmbedSupport', 'mediawiki.Title', 'mw.PopUpMediaTransform.styles' ), @@ -201,6 +204,7 @@ public static function onImageOpenShowImageInlineBefore( $imagePage, $out ) { $handler = $imagePage->getDisplayedFile()->getHandler(); if ( $handler !== false && $handler instanceof TimedMediaHandler ) { + $out->addModuleStyles( 'ext.tmh.thumbnail.styles' ); $out->addModules( array( 'mw.TimedText.loader', 'mw.MediaWikiPlayer.loader', @@ -456,6 +460,7 @@ } if ( $addModules ) { + $out->addModuleStyles( 'ext.tmh.thumbnail.styles' ); $out->addModules( array( 'mw.TimedText.loader', 'mw.MediaWikiPlayer.loader', diff --git a/TimedMediaHandler_body.php b/TimedMediaHandler_body.php index c49cef1..20809d6 100644 --- a/TimedMediaHandler_body.php +++ b/TimedMediaHandler_body.php @@ -201,6 +201,7 @@ return ; } $parserOutput->hasTimedMediaTransform = true; + $parserOutput->addModuleStyles( 'ext.tmh.thumbnail.styles' ); $parserOutput->addModules( array( 'mw.TimedText.loader', 'mw.MediaWikiPlayer.loader', diff --git a/TimedMediaTransformOutput.php b/TimedMediaTransformOutput.php index 3653209..e743aa1 100644 --- a/TimedMediaTransformOutput.php +++ b/TimedMediaTransformOutput.php @@ -321,7 +321,7 @@ // Build the video tag output: $s = Xml::tags( 'div' , array( 'class' => 'mediaContainer', - 'style' => 'position:relative;display:block;width:'. $width + 'style' => 'width:'. $width ), Html::rawElement( $this->getTagName(), $this->getMediaAttr( $sizeOverride, $autoPlay ), // The set of media sources: diff --git a/resources/PopUpThumbVideo.css b/resources/PopUpThumbVideo.css index c55bb06..7e2722e 100644 --- a/resources/PopUpThumbVideo.css +++ b/resources/PopUpThumbVideo.css @@ -13,17 +13,9 @@ /* @embed */ background-image:url('player_big_play_button_hover.png'); } -.PopUpMediaTransform { - position : relative; - display: inline-block; -} /* Should hopefully be only visible to screen readers */ .mw-tmh-playtext { display: block; height: 0; overflow: hidden; -} - -li.gallerybox div.thumb div.PopUpMediaTransform { -margin: 0 auto; } diff --git a/resources/ext.tmh.thumbnail b/resources/ext.tmh.thumbnail new file mode 100644 index