By Nathan Willis
November 28, 2012
Wikimedia recently rolled out a new feature on Wikipedia and
related sites: an HTML5-based media player. Although Wikimedia's
version is implemented in an extension for the MediaWiki software, the
player itself is based on an existing open source tool, which makes it
potentially useful to a much wider audience.
The player is provided in MediaWiki's TimedMediaHandler
extension, which is an adaptation of the HTML5 media player created by
the Kaltura video platform.
Although the HTML5 <video> element garners more
attention, the player can handle <audio> content as
well. Previously, Wikipedia and its sister sites had embedded
multimedia content in pages via an Ogg-only player (Theora for video,
Vorbis for audio), which came with its share of difficulties for users
whose browsers lacked Ogg support. The new player handles the
royalty-free WebM format as well (sporting VP8 video support), but its
key features extend beyond codec coverage.
First, the extension is designed to allow page authors to embed
video or audio directly into a MediaWiki site using the same syntax
used for images. Displaying a video can be as simple as adding
[[File:Foo.ogv]] to the page text; the extension handles the
rest. As is the case with other MediaWiki markup elements, appending
a vertical bar allows the author to access some optional features.
The |start=mm:ss argument will start playing the
media clip at the time specified; similarly
|end=mm:ss indicates when to stop playing the clip.
The |thumbtime=mm:ss argument uses the frame at time
mm:ss as the thumbnail image for the video.
For site visitors, the player should appear as an embedded video
with a strip of controls across the bottom, just like all of the
Flash-based players so common today. The Wikimedia bug tracker
includes some reports
of difficulty with Safari on some versions of Mac OS X, but at
the moment there is not a definitive browser compatibility list.
The extension is also designed to handle closed captioning,
subtitles, and any other "timed text" associated with an audio or
video file. MediaWiki supports the SRT captioning format for timed
text, and the player displays a "CC" icon in the media toolbar from
which users can activate any available text track. Subtitles can be
in any language; after all, one of Wikimedia's goals is to provide
translations into as many languages as possible. Consequently, the
HTML5 media player integrates with MediaWiki's existing translation
tools.
It is also tied in to MediaWiki's media upload system. In a blog
post outlining the history of the player, Guillaume Paumier notes
that the organization has put effort into re-engineering Wikimedia
Commons, the content repository shared by all of Wikimedia's sites.
The ability to start and end delivery of multimedia content at
specific timestamps is, no doubt, one technique used to remove
redundancy: there is no need to store multiple copies of a lengthy
video so that specific segments can be played back on different pages.
Paumier also contrasts the playback extension with the services
offered by commercial video hosting sites. The MediaWiki extension
does not harvest end-user data or report it to anyone else, and it
displays authorship information for the content, even when embedded in
a third-party page.
Servers, fallback, and more
The server side of the TimedMediaHandler extension also allows the
wiki to transcode content on the server side to deliver it at
different quality levels and resolutions. It uses FFmpeg to perform
the transcoding, from a pre-defined set of basic profiles (160p, 480p,
720p, etc.). Which transcoding profiles are active is configurable in
the MediaWiki settings file. Transcoding jobs are not automatically
run by the MediaWiki job queue due to their resource-intensive nature;
they can be queued up, but the resulting webVideoTranscode
queue must be started manually. In the player user interface, the
available versions of a file are accessible in a pop-up menu.
On browsers that do not support the player widget (which would
include any that have JavaScript switched off, as it uses jQuery), the
extension falls back on the Java-based Cortado media player applet.
Presumably those who switch off both JavaScript and Java are
comfortable missing out on some audio and video content.
Interestingly enough, although Vorbis remains the sole audio codec
supported in the current release, the documentation notes that MP3
support is in the works, awaiting the expiration of the relevant
patents. In fact, the documentation says the patents will expire in
2012, although there are plenty of other dates given in other
locations (including Wikipedia itself).
Beyond MP3, there are other codec possibilities (such as WAV, Opus, and
FLAC). Multiple codec support is hardly the mission-critical issue for
Wikimedia, however. Integration with the existing page creation and
editing tools is probably of more practical importance. On that
front, there is still plenty of work remaining to be done. In
September 2010, TimedMediaHandler developer Michael Dale wrote
a blog entry about the Kaltura video "sequencer," an editing widget
that Wikimedia was working to integrate into the MediaWiki page
editing tools.
The Kaltura sequencer is not yet a full editor; rather than
creating a single output file, it creates a tightly-orchestrated
sequences of clips. This means there is still a gap in the workflow
for open web video, much as there still is on the desktop.
Nevertheless, the Wikimedia TimedMediaHandler player is still an
important milestone, if for no other reason than because of the vast
assortment of MediaWiki-based web sites.
There are multiple alternative HTML5-based media players available;
the html5video.org site maintains a list
with basic information on each. It is important to note that the site
is hosted by Kaltura, but it also embeds each of the listed players,
so a side-by-side comparison is comparatively simple. The Kaltura
player is clearly one of the most modern options, with support for
less common parts of the specification like Media Events (e.g.,
attributes like onloadedmetadata and onratechange).
But Wikimedia has clearly done work to improve it in other areas, such
as the timed text support. For the majority of the millions of
visitors that frequent Wikipedia and the like on a daily basis, the
only important feature is the fact that playback will work. But for
open source advocates and other software developers, the availability
of a new playback tool is just the beginning.
Comments (3 posted)
Brief items
Can we cease behaving like we're still pounding keys on 110-baud
teletypes now? Some old-school Unix habits have persisted long past
the point that they're even remotely sane. Shell programming at any
volume above a few lines of throwaway code is one of them - it's
*nuts* and we should *stop doing it*.
—
Eric S. Raymond
At the end of the day the market size for "people who agree exactly with
the Gnome defaults" is smaller than "people who kind of like it but want
to tweak a couple of things". Our way or the highway doesn't work very
well with UI. I'm surprised the fact that there's only one distribution
of note still defaulting to Gnome 3 hasn't woken people up a bit more.
—
Alan Cox
Comments (53 posted)
Version 3.1 of GNU Libtasn1, the library for working with X.509 and Kerberos structures, is out. Noteworthy changes include a number of new and renamed types, and more detailed error messages.
Full Story (comments: none)
The first stable release of kdev-python is now available. Kdev-python is the Python support plugin for KDE's KDevelop IDE. It supports KDevelop's syntax highlighting, code completion, jump-to-declaration, and all sorts of other IDE goodies.
Full Story (comments: none)
The Koha community has released version 3.10.0 of its free software library management system. Highlights include Plack compatibility in the staff interface and significant enhancements to the Acquisitions, Cataloging, and Circulation modules.
Comments (none posted)
Collabora and Fluendo have announced the next release of their jointly-developed GStreamer SDK, this time adding Android support. The Android port is decidedly unofficial, as reflected in the announcement. "The GStreamer SDK for Android is targeted at API Level 9 (Android 2.3.1, Gingerbread) or higher. However, due to some of the restrictions of previous versions of Android, some features such as hardware acceleration are only available from API Level 16 (Android 4.1, Jelly Bean)."
Comments (none posted)
Newsletters and articles
Comments (none posted)
HarfBuzz maintainer Behdad Esfahbod has published a white paper [Google Doc] of interest to those working on font rendering. Entitled "High-DPI, Subpixel Text Positioning, Hinting," it covers his recent work to catalog the effects of various approaches to hinting, antialiasing, and sub-pixel positioning, particularly when applied to modern high-resolution displays. If reading this on your new monitor hurts your eyes, you should probably take a look.
Full Story (comments: none)
Page editor: Nathan Willis
Next page: Announcements>>