Extension:WikiVideos

MediaWiki extensions manual
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
  • $wgWikiVideosCaptions
  • $wgWikiVideosMaxSize
  • $wgWikiVideosChapters
  • $wgWikiVideosMinSize
  • $wgWikiVideosControls
  • $wgWikiVideosVoiceName
  • $wgWikiVideosVoiceGender
  • $wgGoogleCloudCredentials
  • $wgWikiVideosAutoplay
  • $wgWikiVideosUserAgent
  • $wgWikiVideosVoiceLanguage
Quarterly downloads 8 (Ranked 129th)
Translate the WikiVideos extension if it is available at translatewiki.net

The WikiVideos extension allows the creation of videos using wikitext.

Usage

edit

The 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

Editing with the visual editor

edit

Until 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

edit

Each 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 the voice-language attribute (for example <gallery voice-language="es">), optionally specifying a supported locale (for example <gallery voice-language="en-GB">).
  • $wgWikiVideosVoiceGender = ''; ― Preferred voice gender (either male or female). 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 the voice-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 the voice-name attribute (for example <gallery voice-name="es-ES-Standard-B">).

See also

edit