Extension:TimedMediaHandler/zh

The TimedMediaHandler extension allows you to display audio and video files in wiki pages, using the same syntax as for image files. It includes the Kaltura HTML5 Player and an experimental VideoJS Player. There is support for subtitles and captions (aka Timed Text) and real time stream switching between multiple WebM and other derivatives and many other features. TMH server side support includes options for uploading HTML5 audio and video, multiple transcode profiles to deliver content, Metadata parsing for Ogg and WebM videos and integrates with MediaWiki's jobQueue system for scheduling transcoding jobs.

功能概览
查看Commons:Commons:TimedText页面.

语法简介
在image embed syntax基础上，Timed Media Handler支持：


 * Video.ogv
 * 用原尺寸显示一个视频. 显示一个在视频中点提取的静止图像，和一个用来激活播放器的播放按钮.


 * Audio.oga
 * 为声音文件显示一个占位符，包含一个用于激活播放器的播放按钮.


 * Video.ogv
 * 在一个浮动的缩略图里显示视频.


 * 在一个图片库（image gallery）里嵌入视频（每一个截图都会弹出一个用于完整视频的对话框）.
 * 在一个图片库（image gallery）里嵌入视频（每一个截图都会弹出一个用于完整视频的对话框）.


 * Video.ogg
 * 用1分25秒的一帧画面插入视频作为占位图形. 一个单独的数字将默认被理解成秒数.


 * 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

客户端支持


这个播放器在大部分现代浏览器上能够工作，支持IE9及更高版本（在MediaWiki's support matrix里有关于现代浏览器的描述）. 移动端支持情况不一，尤其是在iOS上.

As of August 2015, TimedMediaHandler includes a JavaScript compatibility shim for Ogg audio/video that works in Safari, Internet Explorer 10/11, and Microsoft Edge browsers.

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.

安装
请同时看来了解详细安装指南.

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 for mp4) to $wgFileExtensions, so you do not need to manually add video file types.

维基百科媒体编码选项的比较
See /VP9 transition for deployment details on planned Wikimedia update from VP8 to VP9.

Sorted by bandwidth tier (grayed items are not currently enabled):

详细选项:

配置
这里展示了配置用变量和它们的默认值：

如果需要转码，请确认你的$wgMaxShellMemory, $wgMaxShellTime, $wgMaxShellFileSize足够大而保证转码工作进行并保存输出. 默认值很可能太小了.

进行转码工作
由于转码工作是资源集中型工作，它们不会再常规工作队列中运行 ( 查看 bug 29336 ). 取而代之的是，它们必须在--类型变量里被要求.

编码节点
为了能够转码许多视频，你可能想要运行多个连接到主数据库并且直接访问你的文件的编码节点. 如果你在使用ubuntu lucid (10.04) ，你需要添加[$launchpad this ppa]并且安装php5-cli php-pear imagemagick ffmpeg ffmpeg2theora.