summaryrefslogtreecommitdiff
path: root/extensions/TimedMediaHandler/README
blob: c37c5ad8e189d4c42bd0059403b360d3d7a09163 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
== 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 <video> 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 <info@getid3.org>
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