Extension:TimedMediaHandler/ru

Расширение TimedMediaHandler позволяет отображать аудио и видео файлов на страницах Вики, используя тот же синтаксис, что и для файлов изображений. Он включает HTML5 плеер Kaltura и экспериментальных VideoJS плеер. Есть поддержка субтитров и титров (подобно Синхронизированному тексту) и в реальном времени переключаться между несколькими WebM и OGG производными и многие другие функции. ТМХ поддержка на стороне сервера включает в себя опции для загрузки аудио и видео HTML5, несколько профилей транскодирования для доставки Контента, Medata парсинг OGG и WebM видео и интегрируется с системой jobQueue mediawiki для планирования задания

Обзор функций
See Commons:Commons:TimedText page.

Syntax synopsis
В дополнение к image embed syntax, Timed Media Handler поддерживает:


 * Video.ogv
 * Отображать видео в его номинальном размере. Отображает неподвижное изображение из середины, с кнопкой воспроизведения, чтобы начать воспроизведение во встроенном плеере.


 * Audio.oga
 * Показать заполнитель для звуковых файлов, с кнопкой воспроизведения, чтобы начать воспроизведение во встроенном плеере.


 * Video.ogv
 * Показать видео в плавающем окне в миниатюре


 * Показать видео встроенным в галерею изображений (каждый клип будет представлен в виде всплывающего диалогового окна полноразмерного плеера)
 * Показать видео встроенным в галерею изображений (каждый клип будет представлен в виде всплывающего диалогового окна полноразмерного плеера)


 * Video.ogg
 * Use a frame from 1 minute 25 seconds into the video as the placeholder image. A single number is taken as an offset in seconds.


 * Video.ogg
 * Temporal media fragments Displays a video clip starting at 1 minute 25 seconds into the video. A single number is taken as an offset in seconds. You can also include an end time of the form  Which would result in a clip of 5 seconds playing from 1:25 to 1:30. If thumbtime is not provided, the start time will be used for the displayed thumbnail.


 * Устаревшие
 * The syntax words noicon and noplayer are deprecated and do not function. The keyword disablecontrols will likely be deprecated soon. It takes the following values: options, timedText, fullscreen

Client support


Плеер работает на большинстве современных браузеров и поддерживает IE9 и позже (в современных браузерах, как описано в таблице поддержки mediawiki). Поддержка всех мобильных устройств, особенно на iOS

С августа 2015 года, TimedMediaHandler включает в себя и javascript совместимости ШИМ для OGG аудио/видео, которая работает в Opera, Интернет Explorer 10/11 и браузеров Microsoft Edge.

Third-party users of MediaWiki may also wish to manually enable MP4 H.264/AAC support for native video and audio playback in Safari/IE/Edge, but when using these formats you may need a patent license from MPEG-LA for internet broadcasting.

Установка
Also see the for detailed install instructions.

You will want a recent version of ffmpeg in order to support encoding to WebM ( with the latest version of VP8). j^ supplies up-to-date static builds of ffmpeg with WebM support for major OSs at firefogg.org/nightly/

The extension will automatically add supported file types (except mp4) to $wgFileExtensions, so you do not need to manually add video file types.

Comparison of Wikipedia media encoding options
Sorted by bandwidth tier (grayed items are not currently enabled):

Detailed options:

Configuration
Here are some configuration variables which may be useful:

For transcoding, make sure you have $wgMaxShellMemory, $wgMaxShellTime, $wgMaxShellFileSize are large enough to allow encoding jobs to run and save output. Default values are most likely too low.

Running transcode jobs
Because transcode jobs are resource intensive they will not run as part of normal job queue ( see bug 29336 ) Instead they must be requested by the --type argument:

Encoding nodes
To be able to transcode many videos you might want to run multiple encoding nodes that connect to the master db and access your file store directly. You will need to install ffmpeg.

Minimal install under Ubuntu 16.04
apt-get install ffmpeg

Road Map

 * Add support for transcoding from arbitrary format uploads.
 * Improve mobile support for uploading and playback ( via native aps if the browser html5 support does not include WebM )
 * Add support for WebM flattening of edited sequences
 * Add support for 8k videos
 * Upgrade to 2.x branch. (On hold. Planning on switching to video.js.)
 * Change Kaltura player to Video.js as our main video player.
 * Consistent mobile support
 * MPEG-DASH adaptive streaming
 * "GIF mode" for autoplay silent videos
 * MIDI input support
 * Better internal interface for connecting to Score, other extensions

Примечания
These notes about the status of TimedMediaHandler were shared by Jan Gerber at the end of his consulting agreement for WMF on 27 September, 2013:

Since you asked in the last meeting to write up an overview of the current state of TimedMediaHandler, here we go:


 * videoscalers:
 * setup like jobrunners, but only processing video transcode jobs (configuration of jobs/memory/threads in puppet and wikimedia-config)


 * imagescalers:
 * extract frames from videos, using avconv for all videos reading videos via http from swift backend


 * proxy caches:
 * must support HTTP 206 Range Requests for video urls (currently requires custom code that is managed in puppet)


 * custom packages for video transcoding (apt.wikimedia.org):
 * ffmpeg2theora (new upstream version to reduce memory by only using one thread)
 * libav (ubuntu version with patch to fix memory leak in ogg decoder)
 * libvpx (new upstream version fixing various issues and quality improvements)


 * custom packages for image scaling (apt.wikimedia.org):
 * vips (new upstream version addressing various performance issues)


 * TimedMediaHandler:
 * Upstream coded included in TMH:
 * mwEmbed (https://github.com/kaltura/mwEmbed) has local changes needs to be merged during next update
 * PEAR File_Ogg (http://pear.php.net/package/File_Ogg) has local changes was part of OggHandler, Tim is upstream maintainer
 * getID3 (http://getid3.org) has small local changes but merged upstream


 * Statistics and monitoring:
 * Transcoding queue and errors:
 * https://commons.wikimedia.org/wiki/Special:TimedMediaHandler


 * Ganglia for video scalers:
 * http://ganglia.wikimedia.org/latest/?r=hour&cs=&ce=&s=by+name&c=Video%2520scalers%2520eqiad&tab=m&vn=

August 2015 update
Brion and TheDJ are starting up some new maintenance on TImedMediaHandler:

Done:
 * fixed some regressions in transcode handling
 * added /ogv.js JavaScript compatibility shim for Safari 6.1+, IE 10/11, and Edge
 * increasing Ogg transcode quality (increased bandwidth)
 * support subtitles in ogv.js
 * finish killing broken Cortado Java compatibility shim
 * retooling TMH's ResourceLoader modules for better compatibility
 * fix ogv.js issues
 * missing volume control

Todo 'small':
 * fix more transcode issues

Todo 'medium':
 * get transcoding from VP9/Opus working on Wikimedia servers...
 * transcoding to VP9/Opus WebM with decreased bandwidth
 * add Ogg skeleton to ogg audio transcodes for better seeking
 * integrate lightweight video player into Extension:MobileFrontend
 * rework serving Timed Text

Todo 'large':
 * replace Kaltura player with VideoJS
 * integrate video player into Extension:MultimediaViewer
 * integrate audio/video into Extension:VisualEditor
 * DASH or DASH-like adaptive streaming

Todo 'long-term':
 * get VP9 working fast enough on ogv.js to replace Ogg Theora transcodes