MIDI-controlled Text Zoom in Quartz Composer

To end my series of experimentations with Quartz Composer that I started 2 months ago, here is my last patch:

It’s based on the previous one and is also driven by a Berhinger BCF-2000 MIDI controller. The purpose of this composition is to zoom a piece of text, give it some kind of velocity and change its color. Again, nothing fancy here: it’s just a simple patch, which source is available for download.

As for the last time, I recorded a little demo to pratice my new videomaking skills (and to find a justification for buying more video gear ;) ):

The audio part is Dream by Paolo Lunardi (from his album Essential). I found it on Jamendo under a Creative Common BY-SA v3.0 license.

Quartz Composer & Behringer BCF-2000 MIDI controller tests

A year ago I explored visual control by plugging a generic Behringer BCF2000 MIDI controller in Apple’s Quartz Composer. My initial intention was to drive some animations and visuals during Cool Cavemen‘s live concerts. Now that’s I’ve abandonned the idea of using Quartz Composer, it’s time to share these stuff with you.

So here is my MIDI playground:

Nothing exceptionnal to see here. It’s just a bunch of dumb patches to control the color of the background screen and its intensity. The latter can be modulated by pulses with different profiles, and also by the sound captured by the MacBook‘s microphone. The source composition is downloadable.

Just for the sake of it, I’ve recorded a quick and dirty demo with my Canon 7D (set to 1080p, 25 fps and 1/50 shutter speed) and the fantastic Tokina 11-16mm f/2.8:

Here is the video, which I edited with Kdenlive:

The audio is sourced from Jamendo. It’s the track One Year written by Paolo Lunardi for his album Essential, and released under a Creative Common BY-SA v3.0 license (thus making my video subject to the same license).

Comment supprimer des comptes mails secondaires @free.fr

Ça fait maintenant 10 ans que je suis client chez Free. Durant mes premières années de fréquentation du web, j’avais décidé de créer autant de comptes mails @free.fr que de variations possibles avec mon nom et prénom. Ne riez pas. Je l’ai vraiment fait. J’avais même poussé le vice jusqu’à doubler les variations avec le préfixe www. Pourquoi ? Pour avoir des espaces d’hébergement associés (Pages Perso) avec une jolie URL du type http://www.kevin.deldycke.free.fr.

Résultat: cela fait maintenant 10 ans que je traîne plus d’une vingtaine de comptes mails chez Free. J’ai eu mal le jour ou j’ai changé de crémerie pour aller chez Google. Pour continuer à recevoir tous les mails envoyés chez Free, j’ai mis en place une arborescence de comptes Gmail. C’était la seule solution pour contourner les limites de l’outil de récupération des messages, qui est limité à 5 comptes externes.

Il est temps de mettre fin à cette folie furieuse et de faire le ménage.

La procédure de suppression de ces comptes mails chez Free n’est pas compliqué. La première chose à faire, si ce n’est pas déjà fait, consiste à rattacher ses comptes mails à son compte principal. Facile, ça se fait dans l’interface d’administration du compte:

Ensuite, il faut se rendre sur la page d’assistance par mail. Là, il suffit d’écrire un message poli et précis, en choisissant bien Gestion des comptes de messagerie comme destinataire:

Et pour les paresseux, voici le modèle à copier/coller:

Bonjour,

Je possède de nombreux comptes mails secondaires. La grande majorité de ceux ci sont obsolètes et abandonnés. Aussi je souhaiterais les supprimer, ainsi que toutes les données qui leurs sont associées (listes de diffusions, comptes mails, pages personnelles, bases de données SQL, statistiques, livres d’or, …).

Voici la liste des comptes mails secondaires:
* compte1@free.fr
* compte2@free.fr
* compte3@free.fr
* compte4@free.fr
* compte5@free.fr

Pour information, tous ces comptes mails secondaires sont attachés à mon compte principal (ADSL) dont l’identifiant est “0123456789″ et le mot de passe “XXXXXXXX”.

Deux choses importante à noter:

  • Il faut préciser son mot de passe. Ben oui, c’est comme ça. Ça fait partie de la procédure de vérification.
  • Les opérateurs prenant en charge votre demande ne peuvent pas supprimer plus de 5 comptes mails à la fois. Donc si comme moi vous en avez beaucoup, il faudra faire plusieurs demandes. Et comme on ne peut pas faire plusieurs demandes en parallèle, il faudra s’armer de patience.

Une fois sur deux, votre demande va être immédiatement prise en charge, et vous recevrez la confirmation suivante:

Madame, Monsieur,

Nous prenons connaissance de votre eMail.

Tout d’abord permettez moi de vous remercier, pour avoir respecté la procédure concernant la suppression des comptes.

Celle-ci vient d’être en effet, traitée à l’instant.

Ces comptes seront réellement effacés de notre serveur principal dans 48 heures, temps qu’il faudra à tous les autres serveurs pour synchroniser leurs bases.

Nous vous remercions, de votre confiance.

En espérant que notre réponse vous apportera une entière satisfaction, nous restons à votre disposition pour tout éventuel complément d’information.

Au nom de toute l’équipe Free, nous vous prions de recevoir, Madame, Monsieur, nos sincères salutations.

L’autre moitié du temps, si votre compte à été créé avec une ligne Free Haut Débit, on vous enverra une demande de confirmation:

Madame, Monsieur,

Nous prenons connaissance de votre eMail.

Je vous remercie pour votre message, vous l’avez adressé au bon service.

IMPORTANT :
———-

NE RAJOUTEZ PAS LES COMPTES SUPPLEMENTAIRES NON DESIGNES A LA SUPPRESSION.

SI CEUX-CI SONT MENTIONNES, VOTRE DEMANDE NE SERA PAS TRAITEE.

C’est un compte qui a été créé sur FREE HAUT DEBIT.

La demande du mot de passe fait partie de la procédure, de suppression des comptes, par mesure de sécurité.

Sans cette information la suppression ne peut se faire.

Lorsque vous supprimez un compte, vous n’aurez plus accès aux services liés à ce compte (connexion RTC liée, e-mail, pages persos,).

Pour la suppression de votre ou vos comptes e-mail créé sur FREE HAUT DEBIT, nous vous serions gré de bien vouloir nous communiquer :
- Votre identifiant (numéro de téléphone)
- le mot de passe qui lui est rattaché.
- le login du ou des comptes supplémentaires à supprimer UNIQUEMENT.
- POUR QU’IL N’Y AIT PAS DE CONFUSION POSSIBLE, SI LE CAS EXISTE, SIGNALEZ MOI LES COMPTES AYANT UN LOGIN APPROCHANT AVEC CEUX A SUPPRIMER EXEMPLE : “VICTOIRES” & “VICTOIRE” MERCI !

Un login appartenant à un compte secondaire qui a été supprimé, ne pourra être repris ultérieurement pour création d’un nouveau compte, et ceci définitivement.

Je vous remercie.

En espérant que notre réponse vous apportera une entière satisfaction, nous restons à votre disposition pour tout éventuel complément d’information.

Au nom de toute l’équipe Free, nous vous prions de recevoir, Madame, Monsieur, nos sincères salutations.

Dans ce dernier cas, renvoyez un message de ce type pour relancer la procédure:

Bonjour, et merci pour cette demande de confirmation.

J’ai lu attentivement vos explications et vos mises en garde. Je comprends très bien ce que ma demande implique (suppression définitive des données et impossibilité de recréation des logins).

Aussi je vous confirme bien ma demande, à savoir la suppression des comptes suivants:
* compte1@free.fr
* compte2@free.fr
* compte3@free.fr
* compte4@free.fr
* compte5@free.fr

Pour information, tous ces comptes mails secondaires sont attachés à mon compte principal (ADSL) dont l’identifiant est “01234567890″ et le mot de passe “XXXXXXXX”.

Merci pour votre prévenance.

Et voila comment, après plusieurs semaines d’échanges avec le support de Free, j’ai simplifié ma vie ! ;) Dommage que la procédure ne soit pas automatisée…

Automate Trac instance deployment with Buildout

Recently, I started to contribute to pbp.recipe.trac, a Buildout recipe aimed to simplify the management and configuration of Trac instances.

I’ve taken interest in this piece of code the day I realized the Trac instance we used at work was still running on the old 0.10.x series. Even if we spend the majority of our time there, nobody has taken care of our little Trac: it was not updated for 3 years. If you add to this a sudden need for multi-repository support (as our team is adopting other internal projects), you have enough incentives to upgrade our Trac and automate its maintenance.

So here is how I migrated our legacy Trac 0.10 instance to a brand new 0.12 thanks to Buildout and pbp.recipe.trac.

First, let’s install all system dependencies using your distribution package management tool. My target server is running an RHEL 5.4, so I’ll invoke Yum:

$ sudo yum install subversion subversion-python sqlite-devel cyrus-sasl-lib cyrus-sasl-md5 mercurial

On Debian/Ubuntu, equivalent packages should be installed with apt-get:

$ sudo apt-get install subversion python-subversion libsqlite-dev cyrus-sasl-lib cyrus-sasl-md5 mercurial

Now we create an empty structure that will host our Trac instance:

$ mkdir ~/trac-home
$ cd ~/trac-home
$ touch ./buildout.cfg

It’s time to edit the file at the core of the process: buildout.cfg. Here is my version:

[buildout]
extensions = buildout.bootstrap
parts = my-trac
deploy-server = trac.example.net

[my-trac]
recipe = pbp.recipe.trac
project-name = My Trac instance
project-description = This is my stand-alone Trac instance hosting my devlopment activities.
project-url = http://${buildout:deploy-server}:8000/my-trac
repos = my-repo-1 | svn | ${buildout:directory}/repos/my-repo-1 | svn://${buildout:deploy-server}:3690/my-repo-1
        my-repo-2 | svn | ${buildout:directory}/repos/my-repo-2 | svn://${buildout:deploy-server}:3690/my-repo-2
        my-repo-3 | svn | ${buildout:directory}/repos/my-repo-3 | svn://${buildout:deploy-server}:3690/my-repo-3
default-repo = my-repo-1
force-instance-upgrade = True
force-repos-resync = True
wiki-doc-upgrade = True
stats-plugin = enabled
permissions = anonymous | STATS_VIEW
header-logo = ${buildout:directory}/my_trac_logo.png
smtp-enabled = true
smtp-server = localhost
smtp-port = 25
smtp-from = trac@example.net
smtp-replyto = no-reply@example.net
smtp-always-cc = kevin@example.net bob@example.net
additional-menu-items = Buildbot | http://${buildout:deploy-server}:9080/console
trac-ini-additional = attachment   | max_size               | 26214400
                      browser      | downloadable_paths     | /*/trunk, /*/branches/*, /*/tags/*
                      notification | always_notify_owner    | true
                      notification | always_notify_reporter | true
                      timeline     | ticket_show_details    | true
                      wiki         | ignore_missing_pages   | true
                      svn          | branches               | /*/trunk, /*/branches/*
                      svn          | tags                   | /*/tags/*

I now encourage you to use my buildout.cfg above as a template and customize it to your needs. Please read pbp.recipe.trac documentation carefully to set the recipe options to values you like.

Before going further, we need a bootstrap.py script. This script will take care of all stuff required by a bare Python interpreter to handle a Buildout project from scratch. Let’s download the latest version:

$ wget http://svn.zope.org/repos/main/zc.buildout/trunk/bootstrap/bootstrap.py

Now we can initialize our Buildout environment. The --distribute option here is necessary to get something more modern than the abandoned setuptools:

$ python ./bootstrap.py --distribute

And then we can ask Buildout to construct our the instance:

$ ./bin/buildout

Now that we have an empty Trac 0.12 instance, we will migrate there our legacy Subversion repositories:

$ svnadmin create ./repos/my-repo-1
$ svnadmin create ./repos/my-repo-2
$ svnadmin create ./repos/my-repo-3
$ ssh -C root@legacy.example.net "svnadmin dump /software/svn/repo1" | svnadmin load ./repos/my-repo-1
$ ssh -C root@legacy.example.net "svnadmin dump /software/svn/repo2" | svnadmin load ./repos/my-repo-2
$ svnadmin load ./repos/my-repo-3 < ~/svn_repo3_20100612.dmp

Note that in this case my first two subversion repositories are still running on my legacy server, and I already have a local dump of the third.

Let’s copy the data from our legacy Trac instance. By studying the differences between a default Trac instance and the legacy one I was working on, I came to the conclusion that I only needed to move attachments and the main database. Of course this is my personal case and your’s may be a little bit different:

$ scp -rC root@legacy.example.net:/software/trac/project/attachments ./parts/my-trac/
$ scp -rC root@legacy.example.net:/software/trac/project/db/trac.db  ./parts/my-trac/db/

We need to call Buildout a second time to update our the project with all the data we’ve just migrated:

$ ./bin/buildout

Now we’ll activate and configure SASL-based authentication in all Subversion repositories:

$ sed -i 's/# use-sasl = true/use-sasl = true/' ./repos/my-repo-1/conf/svnserve.conf
$ sed -i 's/# use-sasl = true/use-sasl = true/' ./repos/my-repo-2/conf/svnserve.conf
$ sed -i 's/# use-sasl = true/use-sasl = true/' ./repos/my-repo-3/conf/svnserve.conf
$ sed -i 's/# realm = My First Repository/realm = svn/' ./repos/my-repo-1/conf/svnserve.conf
$ sed -i 's/# realm = My First Repository/realm = svn/' ./repos/my-repo-2/conf/svnserve.conf
$ sed -i 's/# realm = My First Repository/realm = svn/' ./repos/my-repo-3/conf/svnserve.conf

Create a password database with our users:

$ saslpasswd2 -f sasl.db -u svn kevin
$ saslpasswd2 -f sasl.db -u svn bob
$ ...

Setup SASL authentication on the system (please change the sasl.conf location below according your file structure):

$ touch ./sasl.conf
$ sudo ln -s /home/kevin/trac-home/sasl.conf /etc/sasl2/svn.conf

And put the following content in the sasl.conf file we just created above (don’t forget to update the sasl.db location):

pwcheck_method: auxprop
auxprop_plugin: sasldb
sasldb_path: /home/kevin/trac-home/sasl.db
mech_list: ANONYMOUS CRAM-MD5 DIGEST-MD5

It’s time to create and populate the password file used by Trac, with all the users we created 3 steps above:

$ touch ./htdigest
$ htdigest ./htdigest trac kevin
$ htdigest ./htdigest trac bob
$ ...

And now we can start the Subversion server in the background:

$ svnserve --daemon --listen-port 3690 --root ./repos/

Last step, we launch Trac’s standalone webserver:

$ ./bin/tracd --port 8000 --single-env --auth="*,htdigest,trac" ./parts/my-trac

You can now reach Trac from your browser, on the following URL:


http://trac.example.net:8000/my-trac

A final test consist in getting some code from Subversion:

$ svn co svn://trac.example.net:3690/my-repo-1

From now on, and that’s where the fun begins, each time a new Trac version is released on PyPi, I just have to:

  1. stop both Trac and Subversion standalone servers,
  2. run ./bin/buildout, and
  3. restart both Subversion and Trac servers.

That’s enough to upgrade my instance.

Now you can clearly see how it’s important to invest time in automation to save on maintenance costs and prevent code rotting… :)

Using latest stable Kdenlive with a development version of MLT

Today I stumble upon a bug in the Kdenlive 0.7.8 running on my Kubuntu 10.10: the crop filter was messing with the display ratio of my video clips. Digging the web I found a bug report that was really close to my problem. According to the comments, this issue was fixed in the upcoming version of MLT. Is that bug the one I encountered ? The only way to find out was to install the development version of MLT. Here is how I did it…

First, make sure to use the latest stable Kdenlive stack for you system. For me, the Sunab’s alternative repository for Kubuntu 10.10 was the ultimate source:

sudo apt-get update && sudo apt-get install kdenlive

The idea is to keep the version of Kdenlive installed above, and replace the pre-packaged MLT on our system with a custom development version of our choice.

But first, we’ll install all the libraries required to build MLT from sources:

sudo apt-get install libavdevice-dev libswscale-dev libvorbis-dev libsox-dev libsamplerate-dev frei0r-plugins-dev libdv-dev libavformat-dev libquicktime-dev libxml2-dev libsdl-dev libsdl-image1.2-dev

Let’s now remove the installed MLT. If we use apt-get or KPackageKit, this will remove Kdenlive. So we’ll use the following command to remove MLT while ignoring all the dependencies:

sudo dpkg --remove --force-depends libmlt2 libmlt++3 libmlt-data melt

At this point, and every time we try to use it, apt will complain of broken Kdenlive dependencies, and will try to remove it. This mean we can’t upgrade other packages on the system.

To avoid this issue, I tried to freeze the state in which Kdenlive and MLT are, by setting the hold flag on kdenlive, kdenlive-data, libmlt2, libmlt++3, libmlt-data and melt packages. I tried with both dpkg and aptitude, but unfortunately it doesn’t work as expected. So we’ll continue our hack anyway…

Let’s get MLT sources:

git clone git://mltframework.org/mlt.git

The command above will give you the latest development version. But if you target a particular revision (like commit 21a3f68 in my case), you have to use this additional command:

git checkout 21a3f68

We can now follow the procedure detailed in the Kdenlive manual:

cd mlt
./configure --prefix=/usr --enable-gpl
make clean
make
sudo make install

That’s it ! Now you can launch Kdenlive, and if you run the wizard, you’ll see that the MLT version on your system is the latest:

Oh, and by the way, it fixed my problem with the crop filter ! :)

Finally, if you want to revert the mess we created on the system, you have to remove the MLT we built in place:

sudo rm -rf /usr/lib/libmlt*
sudo rm -rf /usr/lib/mlt*
sudo rm -rf /usr/lib/pkgconfig/mlt*
sudo rm -rf /usr/include/mlt*
sudo rm -rf /usr/share/mlt*

I came with the list above by searching my system with the following command:

sudo find / -path "/home" -prune -or -iname "*mlt*" -print -or -iname "*melt*" -print

Then, we can let apt handle Kdenlive and MLT properly and get back to the pre-packaged binaries:

sudo apt-get remove kdenlive && sudo apt-get update && sudo apt-get install kdenlive