Extension:WikiVideos
![]() Release status: beta |
|
---|---|
Description | Create videos using wikitext |
Author(s) | Sophivorustalk |
Latest version | 4.3 (2023-01-15) |
MediaWiki | >= 1.31.0 |
PHP | 7+ |
Database changes | No |
License | GNU General Public License 3.0 or later |
Download | |
Example | https://wikivideos.org |
|
|
Quarterly downloads | 10 (Ranked 130th) |
Translate the WikiVideos extension if it is available at translatewiki.net | |
The WikiVideos extension allows the creation of videos using wikitext.
Usage
editThe following wikitext:
<gallery mode="video" width="300"> File:Old pond.jpg | Old pond File:Frog leap.jpg | frog leaps in File:Water sound.jpg | water's sound </gallery>
will output the following video:
Essentially, the algorithm shows one image after another while an automated voice reads the text aloud.
Installation
edit- Setup your Google Text-to-Speech API
- Install the latest FFmpeg and FFprobe
- Download and move the extracted
WikiVideos
folder to yourextensions/
directory.
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/WikiVideos - Only when installing from Git, run Composer to install PHP dependencies, by issuing
composer install --no-dev
in the extension directory. (See task T173141 for potential complications.) - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'WikiVideos' );
- Configure as needed.
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Editing with the visual editor
editUntil this issue gets fixed, to edit videos with the visual editor, you'll need to manually add the following to extensions/VisualEditor/modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js, line 275:
new OO.ui.MenuOptionWidget( {
data: 'video',
label: 'Video'
} ),
Configuration
editEach configuration option is shown with its default value:
Required
edit$wgGoogleCloudCredentials = '';
― Absolute path to the application credentials for your Google service account.$wgFFmpegLocation = '/usr/bin/ffmpeg';
― Absolute path to FFmpeg (see $wgFFmpegLocation).$wgFFprobeLocation = '/usr/bin/ffprobe';
― Absolute path to FFprobe (see $wgFFprobeLocation).
Optional
edit$wgWikiVideosUserAgent = 'WikiVideos/4 (https://www.mediawiki.org/wiki/Extension:WikiVideos)';
― Content of the User-Agent header when downloading files from Commons. Required to comply with Wikimedias User-Agent policy.$wgWikiVideosMinSize = 200;
― Default min size of the video files.$wgWikiVideosMaxSize = 1280;
― Default max size of the video files. If the video width is larger than the height, then this limits the width, while the height is scaled accordingly, and viceversa if the height is larger than the width.$wgWikiVideosControls = true;
― Whether to show video controls by default (play/pause button, volume, etc).$wgWikiVideosAutoplay = false;
― Whether to autoplay videos by default.$wgWikiVideosChapters = true;
― Whether to show video chapters by default.$wgWikiVideosCaptions = false;
― Whether to show video captions by default.$wgWikiVideosVoiceLanguage = '';
― Preferred voice language (see supported voices and languages). If left empty, the main language of the wiki will be used (see $wgLanguageCode). May be overridden on a per-video basis using thevoice-language
attribute (for example<gallery voice-language="es">
), optionally specifying a supported locale (for example<gallery voice-language="en-GB">
).$wgWikiVideosVoiceGender = '';
― Preferred voice gender (eithermale
orfemale
). If left empty, the gender of the first voice for the chosen language will be used (see supported voices and languages). May be overridden on a per-video basis using thevoice-gender
attribute (for example<gallery voice-gender="female">
).$wgWikiVideosVoiceName = '';
― Preferred voice name (see supported voices and languages). If left empty, the first voice for the chosen language and gender will be used. May be overridden on a per-video basis using thevoice-name
attribute (for example<gallery voice-name="es-ES-Standard-B">
).
See also
edit- Google Text-to-Speech API setup instructions
- Google Text-to-Speech API pricing (first 4,000,000 characters each month are free, which is a lot)
- Google Text-to-Speech API supported voices and languages
- Wikivideos - Project proposal based on this extension