Desgrange.net

Aller au contenu | Aller au menu | Aller à la recherche

lundi, février 1 2010

<video>, H.264, Theora, Firefox and patents

Some quick thoughts…

In HTML5 there is is new video tag allowing to embed a video in a web page as we do for a picture. As for the img tag (for pictures), the W3C (who defines HTML) does not say which format should be used for the content itself. So in a img tag you can put PNG, BMP, JPEG, GIF… whatever you want, as soon as it is recognized by web browsers.

Internet Explorer does not support video, Firefox supports it but reads only videos encoded in the Theora format, Chrome and Safari support the tag but read only H.264 encoded videos.

Technically, for the moment H.264 seems to be better than Theora. But Theora is an open format while H.264 is crippled with patents and using it requires paying huge royalties (depends of what kind of license but some people are talking about 5 million dollars).

I don’t remember seeing any “official” position from Mozilla why they do not support H.264 in Firefox, but from people working at Mozilla, they usually provide good arguments like:

  • the web is based on open, free and patent-free standards (this is very important, changing that will fragment the web)
  • they would prefer doing more useful stuff with 5 M$ than paying for a codec
  • supporting H.264 is not a good idea since it will be valid only for the version distributed by Mozilla, not the one embedded in your Linux distribution for example

I completely agree with that.

I wonder why lots of people on the internet would like Mozilla to support H.264 while they don’t ask Google and Apple to support Theora. For images, they are all able to read different formats, while should they be limited to only one video format? Google and Apple have nothing to pay in order to support Theora (except their developers to include it).

The other thing, why MPEG LA (licensing H.264) does not make H.264 a patent/royalty-free codec? OK, because MPEG LA was created to collect fees for patents covering MPEG technologies.

And the nasty idea, why Mozilla does not make a Firefox Europe Edition? In Europe, software patents are not allowed (kind of, it’s not really clear, it looks like quite often software patents are granted while they are not respecting european legislation). Doing a Firefox version including H.264 but distributed only in countries that do not allow software patents could be interesting. First in Europe, it may clarify what the status of software patents is, then it will hassle the MPEG LA and finally it may show to the US and US companies that they are not dominating the world and imposing their rules everywhere (and maybe make them change their patents laws (yes, sometimes I’m overly optimistic ;-))).

lundi, juin 22 2009

Open Instant Messaging

Email protocols history

A long time ago there was several protocols to send a message from a computer to an other one. There was a protocol per network (the internet was not really born at that time). Those protocols were not compatible between each others. So for instance, if you were using FidoNet, you were not able to send emails to people using BITNET. Hopefully some people created some gateways to transfer emails from a network to an other one (but it looks like it was quite a nightmare). At some point in time, ARPANET and its email protocol became the standard and other protocols started vanishing. People were now able to communicate with each other easily.

Instant messaging

Instant messaging (IM) appeared much more recently (email started in the late 60s, late 80s for IM). Personal IM became very well known in 1996 with ICQ (I still have my ICQ account! (but nobody to talk to on it anymore)). Then several other protocols appeared:

Of course you can't chat with somebody using MSN Messenger if you use Yahoo! Messenger. ICQ was bought by AOL, AOL created AIM (AOL Instant Messenger) based on ICQ protocol. At some point people using ICQ were able to speak with people using AIM.

In 2004, XMPP, the protocol used by Jabber, became the official IETF instant messaging standard (IETF is the group defining the internet standards (like HTTP for the web, SMTP for emails, FTP for file transfer…)).

Jabber/XMPP

XMPP as been the standard for 5 years now, but still, most of my contacts are using MSN Messenger. Why? Because they also use a Microsoft Windows based computer and Microsoft MSN Messenger is the default instant messaging software installed on those computers.

XMPP allows creating gateways to other protocols (like MSN, Yahoo!, ICQ…). The situation looks a bit like the email status in the old days. But the email standard imposed itself as the killer application of ARPANET. So, what will be the thing that will wipe out all proprietary protocols and impose the XMPP open standard?

The problem with standards is that it take time to be developed. History as shown that new versions of a standard are not implemented by all software vendors quickly, nor they are deployed as fast as possible. So changes to the standard must not happen everyday and having it quite right at version 1.0 take time.

In the meantime, other protocols evolve faster because vendors have a captive market and a better control on how the software is distributed/used (and they don't have to wait for others to implement changes).

While XMPP was on the way to be standardized, other protocols got voice then video functionalities. I had a lot of hope in 1995 when Google released it's own IM software Google Talk. GTalk is based on XMPP and add some voice extension and video extension later.

Then AOL started an experiment to allow XMPP connections to its network, Yahoo announced that they were interested by XMPP too. The chat in Facebook uses XMPP (but the network is closed, you can only talk to Facebook users), several other community websites do the same.

Nowadays

Last week, the specifications for voice/video in XMPP were released. The biggest missing features making people stay with their proprietary IM is going to be old story soon. But I'm not sure it will be enough to see a big migration to XMPP.

Those last few years, XMPP interest increased a lot and nearly all IM vendors are now looking at XMPP… except Microsoft. It looks like you will soon have the choice between speaking to nearly everybody except MSN Messenger users or speaking only to MSN Messenger users.

Of course there are lots of softwares allowing you to use several accounts at the same time (so being connected to MSN, Yahoo! and Jabber at the same time). I also have several emails account. The difference is that from my professional email account I can send emails to everybody, same for my personal email. I'm choosing the email account I'm using depending on what my "role" is. If I want to send a message to a colleague, I will use my professional email address.

In IM, you can't do that, except if you open several accounts on each protocol you use. Having a professional and a personal account on MSN, on Yahoo!, on AIM, on Jabber… With all those protocols I currently have 9 accounts. And you know what? I like keeping things simple. For my email addresses I have started closing several accounts, keeping only the mandatory ones (my personal email address and the ones I have to use for my job). And I would really like doing the same for IM but you know what? Here I can't do what I want. Why? Because if I close my MSN account, I will lose contact with a lot of people.

I feel a bit like in jail. Worse, I feel like my friends are in jail too but they are saying "Where do you see a jail? There's only walls and fences".

Anyway, lots of people are using GMail now, and there is a chat embedded in GMail. Of course this chat uses Google Talk so it uses XMPP. Even if I don't really like GMail, I prefer having my friends using GMail/Google Talk than Hotmail/MSN Messenger (or whatever the name of those services are this week).

ejabberd

Since XMPP is an open protocol, anybody can implement it. There are several XMPP clients (Pidgin, Adium, Kopete, Trillian, iChat…) and there are also several servers.

In XMPP servers there is well-known one: ejabberd. This server is open source and written in Erlang. Ejabberd use the power of Erlang to be fault-tolerant, redundant, scalable, <add here any cool property a server should have>.

And since XMPP is a decentralized system, I can install my own server (as I did for my email server for instance).

Installing ejabberd on debian is as easy as usual:

$ sudo apt-get install ejabberd

To configure it, you just need to change the domain name to serve in /etc/ejabberd/ejabberd.cfg. If your domain name is example.org change the following:

%% Hostname
{hosts, ["example.org"]}.

And set the admin user:

%% Admin user
{acl, admin, {user, "admin_user_name", "example.org"}}.

Add a user with the following command:

$ sudo ejabberdctl register user_name example.org password

Restart the server. Done.

Of course there are a lot more parameters to change if you want to fine tune it. You may also need to create a SRV entry in your DNS if your server is not the one serving "example.org" (but "im.example.org" for example).

lundi, juin 15 2009

Killing Flash

No, not that one:

flash_character.jpg (Photo from Cryptonaut used under CC license)

I'm talking about Adobe's Flash.

Like a lot of people, I don't like that technology at all (for building internet websites). It's a proprietary software with all the usual drawbacks (you don't know what the software does, you are not allowed to find out what it does, you can't use an alternative software for playing Flash content, you are tight to Adobe's fate…). You should know that Flash is installed on something like 99% of computers, much more than Microsoft Windows, so it's a very interesting target for pirates, a security flaw in Flash player (and it already happens) is a very good opportunity for a cross-platform virus/malware.

So it has nothing to do on an open web. Read more about this in this article: When you see Flash, duck and cover.

But unfortunately, Flash is used a lot, especially for playing audio and video on a website. Have a look at Youtube or Dailymotion.

Even on my blog I have used it for playing videos and songs (for instance in my Roomba and OpenBSD posts).

For a long time I was hearing about new "audio" and "video" tags in HTML 5 specifications. Sounds interesting for building websites using open standards and not depending on Adobe's Flash anymore for this usage.

Those of you knowing a bit the world of video/audio codecs may wonder how we can have an "open standard" about audio and video. In fact codecs are crippled with patents (a lot of them). Even on HTML 5 specs it's written that the codecs situation is problematic.

So replacing a closed proprietary technology with patented codecs is not really an improvement.

You might be interesting reading why we need open video.

Fortunately, there are some good open source, patent free codecs. On xiph.org you can find ogg multimedia container, the vorbis audio codec and the theora video codec. Vorbis and theora are high quality codecs, but yes, you can find better video codecs than theora, but they all use some patented algorithms.

Few weeks ago mozilla released a beta version of Firefox handling those new tags for vorbis and theora content. One of the most used web browser will now be able to play videos that way. The question is "Will people (webmasters) use this technology?". The answer seems to be "YES".

Dailymotion is trying a version of its website using the new HTML5 tags and vorbis and theora codecs. If you have installed Firefox 3.5, you can try it on Dailymotion demo video or even using Dailymotion openvideo website.

This is very good news for web's future.

jeudi, mars 12 2009

Stop IE6

As you know, the web is based on standards, those standards give us the ability to access all the data on the web whatever our browser and/or operating system are.

But Microsoft didn't care much about web standards when they were building their own web browser: internet explorer. IE had more than 90 % market shares for a long time but nowadays it's less than 70 %, because of new browsers (more secure, faster, more standard compliant, etc.).

So Microsoft updated it's web browser with IE 7, which is a bit more standard compliant but far away compared to other browsers like Chrome, Konqueror, Firefox, Opera or Safari.

Unfortunately, lots of web sites were developed to be usable with IE 6 (which still have nearly 18 % market share), and IE 6 is so buggy that's a real pain to have a good website being usable with IE 6.

Web standards give us the power to create wonderful websites, web applications, but we usually can't because we have to take IE 6 users in account.

The content of my blog should not attract IE users ;-) but here are the usage:

  • Firefox: 52 %
  • IE: 21 % (IE 6: 45 %, IE 7: 50 %)
  • Safari: 10%

Somebody had the great idea to start a campaign against IE 6 (I hope, if the goal is met, he is going to create a new campaign for IE 7 which is not a lot better):

stopie6.jpg

The goal is obviously to wipe out IE 6 by telling people still using IE 6 (or older!) to switch to a newer browser (you can add a little script on your website warning IE 6 users that they should update their browser).

mardi, septembre 23 2008

Seconde intercalaire

Cette année encore, une seconde intercalaire (leap second) va être ajoutée fin décembre. Petite explication de ce qu'est une seconde intercalaire et pourquoi nous les utilisons.

Seconde

La seconde est l'unité de mesure du temps (dans le Système International).

La définition de la seconde a changée au court du temps, elle fut défini comme 1/86400ème d'un jour solaire terrestre moyen (24 h = 86400 s). Mais la Terre tourne de façon irrégulière, et une unité de mesure se doit d'être constante. En 1960 la seconde a alors été définie comme 1/31 556 925,9747ème de l'année 1900 pour ainsi utiliser une référence fixe. En 1967 la définition de la seconde a encore changé pour cette fois-ci refléter une propriété inhérente de la matière : elle devient la durée de 9 192 631 770 périodes de l'onde émise par un atome de césium 133 lorsqu'un de ses électrons change de niveau d'énergie.

Références temporelles et calendriers

Le calendrier communément utilisé est le calendrier grégorien qui en gros défini une année de 365 jours de 24 heures de 60 minutes de 60 secondes. Comme la Terre ne fait pas tout à fait le tour du Soleil en 365 jours, le calendrier grégorien défini un jour intercalaire tous les 4 ans (années bissextiles, le 29 février, sauf si c'est une année de siècle non divisible par 400).

Secondes intercalaires

De même que la Terre ne prend pas exactement 365 jours pour faire le tour du Soleil, la Terre ne prend pas exactement 24 heures pour faire un tour complet sur elle-même.

Si on respecte la définition de la seconde, au bout de quelques années, le jour apparent se décale par rapport aux heures mesurées (la Terre prend un peu peu plus de 24 heures pour faire une révolution alors que nous délimitons nos jours à exactement 24 heures).

Plusieurs échelles de mesures existent :

  • UT1 : le temps universel (UT) représente l'heure à la position apparente du soleil observée depuis le méridien de Greenwich. Le temps universel est donc très dépendant des mouvements de la Terre. L'échelle UT1 est l'échelle UT corrigée du mouvement des pôles.
  • TAI : cette échelle est basée sur des horloges atomiques, donc respectant la définition de la seconde. Cette échelle a été synchronisée avec l'échelle UT1 le 1er janvier 1958.
  • UTC : l'échelle UTC est basée sur l'échelle TAI pour disposer de la précision et de la régularité des horloges atomiques mais elle est régulièrement réajustée pour être calée avec UT1. Ce réajustement se fait en… ajoutant une seconde intercalaire lorsque la différence entre UTC et UT1 devient trop importante (0,9 s).

La seconde intercalaire peut être ajoutée le 31 juin (23h59m60s) ou le 31 décembre (même heure). En France, à cause du décalage horaire, cette seconde se trouve donc rajoutée le jour suivant vers 1h du matin.

L'heure TAI a actuellement 33 secondes d'avance sur UTC.

Les satellites GPS utilisent aussi des horloges atomiques, synchronisées avec UT1 le 6 janvier 1980. L'heure indiquée par un GPS est donc en avance de 14 secondes sur UTC.

La seconde intercalaire est donc une seconde que l'on rajoute pour garder synchronisées l'heure mesurée par les horloges atomiques avec la nature (et ses caprices au niveau de la rotation terrestre).

Notes : Wikipedia est une énorme source d'informations (vu le nombre de liens vers wikipedia dans cette page). Pour plus d'informations sur le sujet vous pouvez aussi consulter les liens suivants :

jeudi, septembre 18 2008

Préfixes

Petit récapitulatif de l’utilisation des préfixes en informatique.

Il y a une confusion assez généralisée sur l’utilisation des préfixes en informatique et je pense qu’il est bon de rappeler une fois de plus ce que disent les standards.

Le Système International défini les unités des grandeurs physiques (comme le mètre ou la seconde) mais aussi les préfixes que l’on peut y appliquer.

Les préfixes sont par exemple le “kilo” qui est un multiplicateur de valeur mille. Le but des préfixes est de simplifier l’utilisation des unités, par exemple :

  • “la lune a une masse de 73 zetta grammes” au lieu de :
  • “la lune est super lourde a une masse de 73 000 000 000 000 000 000 000 grammes” ou encore :
  • “la lune a une masse de 73 sextillions/trilliards de grammes (suivant l’échelle utilisée)”.

Ces préfixes sont des multiplicateurs ou des diviseurs à base de puissances de 10, quelques exemples :

  • 103 = 1 000 = mille = kilo (k)
  • 106 = 1 000 000 = 1 million = méga (M)
  • 109 = 1 000 000 000 = 1 milliard = giga (G)
  • 10-3 = 0,001 = 1 millième = milli (m)
  • 10-6 = 0,000 001 = 1 millionième = micro (μ)
  • 10-9 = 0,000 000 001 = 1 milliardième = nano (n)

Voilà pour les préfixes de la vie de tous les jours, où l’homme compte en base 10 (système décimal). Mais voilà, l’informaticien travail sur des machines binaires qui comptent en base 2 (système binaire)

L’informaticien aussi veut pouvoir se simplifier la vie avec des préfixes, mais ses préfixes sont en puissances de 2 au lieu de puissances de 10. Voici quelques exemples de préfixes binaires :

  • 210 = 1 024 = kibi (Ki)
  • 220 = 1 048 576 = mébi (Mi)
  • 230 = 1 073 741 824 = gibi (Gi)

Exemple d’utilisation : 12 Mio = 12 mébi octets = 12 * 1024 kibi octets = 12 * 1 048 576 octets

Ces préfixes binaires ne font pas encore parti du Système International mais ont déjà été normalisés : CEI 60027-2, IEEE 1541, EN 60027-2:2007

J’espère qu’un jour les systèmes d’exploitation afficheront les tailles de mémoires dans les bonnes unités et que les procès contres les sociétés affichant les caractéristiques de leurs disques dur correctement arrêtent (ces procès ont lieu aux états-unis, un des rares pays n’utilisant toujours pas le Système International)