2

Java’s Achilles heel

Posted by admin on Apr 20, 2008 in Apple & Mac OS X, Internet, Techno

Many aspects of the Java platform have improved tremendously over the past years. Sun has always focused a lot of energy around improving “business” features. Hopefully, they’ve recently diverted their focus on Desktop issues. In this regard, they’ve adressed performance (Hotspot compiler, refreshed OpenGL / DirectX based Java 2D pipelines), data binding (JSR-295), Swing Application Framework (JSR-296), new look-and-feel (Nimbus) etc… One area where most developers agree that Java is still lagging behind the hip / trendy frameworks (Flex, AIR, .NET 3.0, Silverlight…) is definitely video !

The way I see it, Java’s main advantage is the overall consistency and cleanliness of its APIs, which makes it an ideal academic language and encourages high quality object-oriented designs. After all, it’s not about the programming language itself… even though I generally find Java source code sexier than other languages.

Last summer, when I started working on the mini multitouch table project, I got up to speed with the state of video in Java. I realized that the Java Media Framework hasn’t been updated in ages and its APIs feel pretty old by today’s standards. On the Mac OS X platform, Apple willingly dropped support of the Quicktime for Java bindings, which currently forces Java developers to rely on very very old Quicktime interfaces, that do not benefit from the major Quicktime overhaul made in Tiger (10.4). I’m refering to full access to the features of newer codecs (H.264) and high performance capture interfaces (QTKit).

A few days ago, I attended a couple of the final project (projet synthèse) presentations by students of my university. A friend of mine, François Caron, presented his implementation of an error correcting codec for live H.264 broadcasting (such as live TV feed or mobile videoconferencing). Let me point out that it is a lot more challenging to do error correction in these contexts as you don’t have access to pixels in next frames when correcting the current frame…. unless you buffer the data, which is totally unacceptable for videoconferencing. François implemented a new optional feature available for RTP packets (RFC3984) which allows to specify the decoding order of the macroblocks (top-to-bottom order VS checkered pattern). The benefit is that if, for instance 50% of RTP packets are dropped (or delayed) you still have a lot more chance to have a nicely scattered set of pixels in the buffer. This allows you to apply bilinear interpolation between the macroblocks of the checkered pattern for spatial error correction. Also this increases chances to have more good pixels from previous frames when doing temporal error correction. As I’ve always wanted to experiment more with H.264 in general, I started looking for alternatives to JMF.

FFMpeg, GStreamer and VLC are pretty much de facto open source libraries for C/C++ video development. I was pleased to see that all of them have wrappers for Java: JVLC, FMJ/FFMpeg, GStreamer-Java. The level of support and quality of most of these abstraction is pretty crappy though….

Obviously there is still a lot of work to do and I hope that Sun and Apple will sort this out soon (hint: Java One 2008 is in two weeks). In the meantime, I’ll have to resume learning Objective C and refresh my C++… in any case it’ll be useful to do some more useful iPhone SDK hacking.

 
0

Jeux de génie 2008

Posted by admin on Apr 10, 2008 in Whatever

Au début de janvier dernier l’ÉTS était l’hôte des Jeux de génie 2008 et je faisais partie de l’équipe qui a organisé cet événement où plus de 450 étudiants en génie provenant de toutes les facultés de génie du Québec. Pour ma part, j’étais en charge de la compétition académique de Génie logiciel. Dans le cadre des jeux, les participants de chaque délégation devaient contribuer à la construction d’une éolienne. Ainsi, les étudiants de génie mécanique ont fabriqués les pales de l’éolienne, en génie de la construction ils ont fabriqués une base en béton pour soutenir l’éolienne, en génie électrique ils ont fabriqués un circuit pour réguler le courant, en génie de la production automatisée ils ont conçu un logiciel permettant le monitoring. De mon côté, je demandais aux étudiants un logiciel optimisant l’angle d’orientation de l’éolienne pour une période de temps donnée. Pour ce faire, ils devaient utiliser un faux service Web météo fournissant une carte des vents. J’avais également préparé un examen théorique de façon à occuper les 6 membres de chaque délégation pendant les 3 heures dédiées à la compétition. L’examen théorique couvrait un très large spectre de connaissances allant de l’analyse d’algorithmes, les design patterns OO, trouvez les failles de sécurité dans une mini application Web en PHP, déboguer et optimiser du code, analyser du code en Brainfuck, faire la cryptanalyse d’un crytopgramme simple, quelques questions de Geek culture, etc… C’était vraiment cool de préparer cet examen et de voir les étudiants se casser la tête à répondre aux questions.

D’autre part, tout au long de l’événement qui durait 4 jours, j’étais à la tête d’une équipe de 7 photographes et vidéastes. L’école nous a fourni 5 caméras DV professionnelles (Sony DSR-PD170). On filmait tout ce qui se passait (on a accumuler près de 60 heures de footage), on capturait les clips et on faisait le tri des cuts pour le montage à mesure. Ainsi, on a pu présenté un vidéo récapitulatif de 30 minutes au cours du dernier party dans la nuit de dimanche à lundi. Ce fut une expérience incroyable tant au niveau d’améliorer mes techniques de tournage que de montage. Dragan, le directeur du film, a été mon mentor.

Copyright © 2010 Edito.qc.ca All rights reserved. Theme by Laptop Geek.