Thanks for bringing this up, Brion.  I've been hoping we could have this
conversation for a while now.

Before coming to WMF, I worked for a number of years as a broadcast
engineer for a fairly popular video site.  So, I've researched this in some
depth.  Here's a summary.

First, let's talk about the technical difference between the codecs as it
pertains to this discussion:

* h.264 is clearly the best from a technical standpoint.  The encoder
itself has features that aren't present in the others.  Also, it's been on
the market longer so implementations are more highly optimized.  There's
specific hardware support in a lot of devices, and GPU-accelerated decode
support in a lot of software.  h.264 was developed by a number of companies
as an "open" standard, but is covered by many patents.

* WebM (aka VP8) is really not bad, but is technically inferior to h.264
Main and High Profiles[1].  It's a modern codec, but being newer doesn't
make it better.  That said, it's close enough to h.264 that the quality
difference isn't worth being concerned about.  It was developed in a closed
fashion by a single company (ON2), which was then acquired by Google, who
open-licensed it.

* Theora is old, and technically inferior.  It can encode video of the same
quality as h.264 or WebM, but it requires more than twice the bitrate to do
it[2].  Client support is poor.  Hardware decoders are less important
because the lower complexity means it decodes pretty quick.

Now, let's talk about the issues:

Licensing is an issue with h.264.  The ways we might be subject to license
terms are by serving content, and by distributing an encoder (as part of
Mediawiki)[3].  We can escape the second easily by not distributing the
actual encoder (libx264).  We would probably need to obtain a license for
serving video, but MPEG-LA has said that no-cost video distribution will be
royalty-free until at least 2015, possibly longer.

Licensing may or may not be an issue with WebM.  It's been alleged that
WebM infringes some of the h.264 patents.  This might be true, or it might
be MPEG-LA's butthurt hyperbole.  I'm not enough of an expert on codecs or
IP to know.  Google assures us that everything is fine, but they also have
a significant stake in everything being fine.  It's impossible to trust any
of the companies involved, so I go with Jason from [1] who says it may be
an issue.  Until this has been litigated, we should keep in mind that
things could change for WebM.

Theora is as patent-free as any other technology.  It's possible somebody's
patents cover it, but if we worry about Theora, we've forsaken the entire
idea of patent-freedom.  However, the bandwidth cost per video served with
Theora is much higher.  Let's be clear about that: Theora is currently the
only codec that actually costs us more money to use.

Here's what I think we should do:

Let's distribute h.264 for the next three years, alongside WebM and Theora.
 Use the free formats whenever possible, and switch to h.264 when necessary.

Let's not make the h.264 files readily downloadable.  Rather, include a
disclaimer explaining that redistribution could subject the user to
MPEG-LA's licensing requirements, and wouldn't you prefer this lovely WebM
file instead?

This gets us good video distribution now, which helps to fulfill our
primary goal: making knowledge available to everyone.

If MPEG-LA decides to start charging for Internet video in 2015, we can
turn off h.264 then.  People will lose access to video content, but they're
people who'd have never had that access before.  Also, it makes a statement
that people will be a lot more likely to notice.

Doing it this way will give the WebM infrastructure a bit more time to
catch up.  Hopefully by 2015 it'll be supported broadly enough that the
Internet won't be so dependent on h.264.

An argument can be made that our lack of h.264 support will drive WebM
adoption, but the mechanism there isn't clear to me.  While we're big, we
aren't much of a player in the streaming video space right now.  It seems
like we're facing a classic chicken-and-egg problem: without a broadly
supported codec, how do we collect and distribute videos, and without lots
of videos, how do we influence the codec market?  Note that YouTube is
still pushing lots of h.264.

The costs of doing it this way are:

* Additional encoding resources to make the h.264 files.
* Additional disk space for storing those files
* Reduced bandwidth costs when serving smaller files
* ... but increased bandwidth costs since more people will actually watch
videos, because they'll work.

As far as a plan goes, I agree with Michael: deploy TMH in the state it's
in (WebM and Theora), get the bugs in transcoding and serving video worked
out, then add in h.264 when that's done.

References:
1: "The first in-depth technical analysis of VP8"
http://x264dev.multimedia.cx/archives/377
2: "Video Encoder Comparison" http://keyj.emphy.de/video-encoder-comparison/
3: "Summary of AVC license terms"
http://www.mpegla.com/main/programs/avc/Documents/AVC_TermsSummary.pdf

-Ian

On Mon, Mar 19, 2012 at 6:24 PM, Brion Vibber <br...@pobox.com> wrote:

> As some may know, we've restricted videos on Wikimedia sites to the
> freely-licensed Ogg Theora codec for some years, with some intention to
> support other non-patent-encumbered formats like WebM.
>
> One of our partners in pushing for free formats was Mozilla; Fire fox's
> HTML5 video supports only Theora and WebM.
>
> The prime competing format, H.264, has potential patent issues - like other
> MPEG standards there's a patent pool and certain licensing rules. It's also
> nearly got an exclusive choke hold on mobile - so much so that Mozilla is
> considering ways to adopt H.264 support to avoid being left behind:
>
>
> http://blog.lizardwrangler.com/2012/03/18/video-user-experience-and-our-mission/
>
> Is it time for us to think about H.264 encoding on our own videos?
>
> Right now users of millions of mobile phones and tablets have no access to
> our audio and video content, and our old desktop fallback of using a Java
> applet is unavailable.
>
> In theory we can produce a configuration with TimedMediaHandler to produce
> both H.264 and Theora/WebM transcodes, bringing Commons media to life for
> mobile users and Apple and Microsoft browser users.
>
> What do we think about this? What are the pros and cons?
>
> -- brion
> _______________________________________________
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
>
_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to