HTML5 video & MediaWiki

Need help in 2.5, 2.6, 2.8! Thanks

I propose to present in this paper detailed instructions of integration HTML5 video in to MediaWiki 1.18.x on CentOS 6.2.

Configuration of CentOS 6.2

 * 1) yum update
 * 2) yum install nasm
 * 3) yum install gcc gcc-c++
 * 4) yum install automake autoconf libtool subversion zlib-devel

GIT

 * 1) yum install git

Add repositories
The remaining packages available in repositories for CentOS, but are available for Red Hat. We need can be found тут. Add repositories:


 * 1) rpm -Uhv http://apt.sw.be/redhat/el6/en/x86_64/rpmforge/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

And install this%
 * 1) yum install SDL-devel a52dec a52dec-devel alsa-lib-devel faac faac-devel faad2 faad2-devel
 * 2) yum install freetype-devel giflib gsm gsm-devel imlib2 imlib2-devel
 * 3) yum install lame lame-devel libICE-devel libSM-devel libX11-devel
 * 4) yum install libXau-devel libXdmcp-devel libXext-devel libXrandr-devel libXrender-devel libXt-devel
 * 5) yum install libid3tag libogg-devel libvorbis-devel mesa-libGL-devel mesa-libGLU-devel
 * 6) yum install xorg-x11-proto-devel xvidcore xvidcore-devel zlib-devel
 * 7) yum install amrnb-devel amrwb-devel
 * 8) yum install libtheora libtheora-devel
 * 9) yum install glibc gcc gcc-c++ autoconf automake libtool
 * 10) yum install subversion
 * 11) yum install ncurses-devel
 * 12) yum install libdc1394 libdc1394-devel
 * 13) yum install yasm nasm
 * 14) yum install opencore-amr opencore-amr-devel

OGG
libogg-devel.i686 : Files needed for development using libogg libogg-devel.x86_64 : Files needed for development using libogg libogg-devel-docs.noarch : Documentation for developing Ogg applications


 * 1) yum install libogg libogg-devel

oggz tools

 * 1) yum install liboggz oggz-utils liboggz-devel

liboggz-devel.x86_64 : Header files, libraries and development documentation for liboggz. liboggz-doc.x86_64 : Documentation for liboggz liboggz-docs.noarch : Documentation for liboggz oggz-utils.x86_64 : Utilities included with the liboggz library liboggz.x86_64 : Simple programming interface for Ogg files and streams

wxPython
wxPython-devel.x86_64 : Development files for wxPython add-on modules wxPython.x86_64 : GUI toolkit for the Python programming language


 * 1) yum install  wxPython  wxPython-devel

Vorbis General Audio Compression Codec
libvorbis.i686 : The Vorbis General Audio Compression Codec. libvorbis.x86_64 : The Vorbis General Audio Compression Codec. libvorbis-devel.i686 : Development tools for Vorbis applications. libvorbis-devel.x86_64 : Development tools for Vorbis applications. libvorbis-devel-docs.noarch : Documentation for developing Vorbis applications python-vorbis.x86_64 : Python bindings for libvorbis vorbis-tools.x86_64 : The Vorbis General Audio Compression Codec tools vorbisgain.x86_64 : Lossless volume-adjusting utility for Ogg Vorbis files perl-Apache-MP3.noarch : Perl module to generate streamable directories of MP3 and Ogg Vorbis files tagtool.x86_64 : Manage the information fields in MP3 and Ogg Vorbis files


 * 1) yum install libvorbis libvorbis-devel vorbis-tools vorbisgain perl-Apache-MP3 tagtool

Doxygen
doxygen.x86_64 : A documentation system for C/C++ doxygen-doxywizard.x86_64 : A GUI for creating and editing configuration files


 * 1) yum install doxygen doxygen-doxywizard

SDL - Simple Direct media Layer
We need libraries и headers

SDL_Pango.x86_64 : Rendering of internationalized text for SDL (Simple DirectMedia Layer) SDL_Pango-devel.x86_64 : Header files, libraries and development documentation for SDL_Pango. SDL_gfx-devel.x86_64 : Header files, libraries and development documentation for SDL_gfx SDL_image.x86_64 : Load images as SDL surfaces SDL_image-devel.x86_64 : Header files, libraries and development documentation for SDL_image SDL_mixer-devel.x86_64 : Header files, libraries and development documentation for SDL_mixer. SDL_net-devel.x86_64 : Header files, libraries and development documentation for SDL_net. SDL_ttf-devel.x86_64 : Header files, libraries and development documentation for SDL_ttf SDL.i686 : A cross-platform multimedia library SDL.x86_64 : A cross-platform multimedia library SDL-devel.i686 : Files needed to develop Simple DirectMedia Layer applications SDL-devel.x86_64 : Files needed to develop Simple DirectMedia Layer applications SDL-static.x86_64 : Files needed to develop static Simple DirectMedia Layer applications SDL_gfx.x86_64 : Graphic primitives, rotozoomer, framerate control and image filters SDL_mixer.x86_64 : Simple multi-channel audio mixer SDL_net.x86_64 : Cross-platform network API SDL_ttf.x86_64 : Simple DirectMedia Layer - Sample TrueType Font Library


 * 1) yum install SDL SDL-devel

glib-devel.x86_64 : The GIMP ToolKit (GTK+) and GIMP Drawing Kit (GDK) support library
 * 1) yum install glib-devel

gtkhtml2.i686 : An HTML widget for GTK+ 2.0 gtkhtml2.x86_64 : An HTML widget for GTK+ 2.0
 * 1) yum install smpeg smpeg-devel


 * 1) yum install SDL_ttf SDL-static SDL_Pango SDL_Pango-devel
 * 2) yum install SDL_gfx-devel SDL_image SDL_image-devel
 * 3) yum install SDL_mixer-devel SDL_net-devel SDL_ttf-devel
 * 4) yum install SDL_gfx SDL_mixer SDL_net perl-SDL

Open Sound System
We need OSS audio driver and development headers. I don't install this. On CentOS this package is installed by default.

Theora Video Compression Codec
In README of libtheora says that we need:


 * 1) OGG
 * 2) Vorbis General Audio Compression Codec
 * 3) Doxygen
 * 4) SDL - Simple Direct media Layer
 * 5) Open Sound System

libtheora.i686 : Theora Video Compression Codec libtheora.x86_64 : Theora Video Compression Codec libtheora-devel.i686 : Development tools for Theora applications libtheora-devel.x86_64 : Development tools for Theora applications libtheora-devel-docs.noarch : Documentation for developing Theora applications


 * 1) yum install libtheora libtheora-devel libtheora-devel-docs

SCons
SCons need for installation ffmpeg2theora. # yum install scons

libkate
libkate-devel.x86_64 : Development files for libkate libkate-docs.x86_64 : Documentation for libkate libkate-docs.noarch : Documentation for libkate libkate-utils.x86_64 : Encoder/Decoder utilities for libkate kate-utils.x86_64 : Encoder/Decoder utilities for libkate libkate.x86_64 : Libraries to handle the Kate bitstream format


 * 1) yum install libkate libkate-utils libkate-devel kate-utils libkate-docs

Installing extensions
Download this two extensions:
 * 1) Extension:TimedMediaHandler
 * 2) Extension:MwEmbedSupport

Then add the following to the end of your LocalSettings.php:

Running Transcodes
To transcode the video you need to run webVideoTranscode jobs. So, in /extensions/TimedMediaHandler/maintenance/ you can find WebVideoJobRunner.php. If you want to have a job runner that checks for new jobs every 5 min, run: WebVideoJobRunner.php

Installing FFmpeg and FFmpeg2Theora
Based on adding repositories. Add:


 * 1) nano /etc/yum.repos.d/linuxtech.repo

With text: [linuxtech] name=LinuxTECH baseurl=http://pkgrepo.linuxtech.net/el6/release/ enabled=1 gpgcheck=1 gpgkey=http://pkgrepo.linuxtech.net/el6/release/RPM-GPG-KEY-LinuxTECH.NET

Save file and update:
 * 1) yum update

Instaling FFmpeg:
 * 1) yum install ffmpeg ffmpeg-devel ffmpeg-spice-devel gstreamer-ffmpeg ffmpeg-spice-libs

Installing FFmpeg2Theora:
 * 1) yum install ffmpeg2theora

And to confirm what all is doing the right thing
 * 1) yum update

Result: Setting up Update Process No Packages marked for Update

At this stage, Hurray!

Now we must show our wiki, where the binary of ffmpeg and ffmpeg2theora. Response: ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz
 * 1) whereis ffmpeg

In our LocalSettings.php add after extentions TimedMediaHandler and MwEmbedSupport $wgFFmpegLocation = '/usr/local/bin/ffmpeg';

Similarly, for ffmpeg2theora: ffmpeg2theora: /usr/bin/ffmpeg2theora /usr/share/man/man1/ffmpeg2theora.1.gz And add in LocalSettings.php $wgFFmpeg2theoraLocation = '/usr/bin/ffmpeg2theora';
 * 1) whereis ffmpeg2theora

At this stage nothing will not work until we run the update script in your wiki. So:
 * 1) cd /var/www/html/имя_вашей_вики/maintenance/
 * 2) php update.php

And the long-awaited moment .... player is running, you can upload files ogg, ogv, oga, webm and wiki plays them.

PEAR File_Ogg
Here we can find and:
 * 1) php pyrus.phar install pear/File_Ogg-0.3.1