Author Archives: Multimedia Mike

Novice Relations Department

The qualification tasks required of students in order to participate in FFmpeg’s Summer of Code program has finally afforded me the opportunity to create a “Small FFmpeg Tasks” page on the MultimediaWiki. Of course, the small tasks list was originally chartered to qualify students, but it need not be limited to that purpose. As I wrote on the page, it can be used for anyone who needs a good starting point for FFmpeg hacking. Further, it could be used for someone who has been away from the codebase and needs an exercise to motivate re-familiarization.

I have this — perhaps unfounded — vision that there are many lurkers out there, watching the FFmpeg project from a distance, on or off the notoriously abrasive mailing lists, hoping one day to get involved somehow, but not knowing exactly how to break in. The small tasks list is a great place to start. Maybe you don’t feel all that comfortable with what you have seen during your lurkings, perhaps because you can’t figure out what is meant with this whole “top-posting” thing for which n00bs are routinely savaged. If that’s you, you can always email me privately about getting started. I will (probably, depending on the day) be happy to tutor you on the basics for contributing some code. Email address is on the side bar.

Violated

FFmpeg is open source, licensed largely under the Lesser General Public License (LGPL), though certain parts, for various reasons, are General Public License (GPL), version 2. There are certain provisions about when you must provide source code if you use the program. Some programs do not follow these rules.

We have started tracking these violators in the FFmpeg Hall of Shame. Each violator is listed with a link to its case in the FFmpeg issue tracker. We’re actively trying to work with all violators to resolve these issues. The Hall of Shame seems to be reserved for particularly unresponsive violators.

Deadline Extension; GSoC Qualification Showcase #2

Today was supposed to be the the last day that students could apply to participate in Google’s 2008 Summer of Code. That deadline, however, along with all of the program’s deadlines, have been pushed back by a week. The new submission deadline is next Monday, April 7. The new deadline for the FFmpeg mentoring crew to pick students in April 18, so be sure to have your qualification code in SVN well before then in order to be considered for a project slot.

Regarding qualification tasks, 2 more students have qualified. First, the more graphically interesting: Eli Friedman completed an RPL/ARMovie demuxer and Escape-124 video decoder:


ffplay playing RPL/Escape-124 data

This is the container/codec combo that was seen in the first Tomb Raider PC game. ARMovie is a format that was apparently used on Acorn RISC PCs. If anyone happens to have any ARMovie files that don’t come from Eidos games, I would be interested it seeing them.

Next is a demuxer/decoder pair for the Amiga IFF format that supports the PCM and Fibonacci encodings, prepared by Jai Menon. No real graphics of course, so here’s ffplay’s graphical interpretation of the PCM amplitude:


ffplay playing an IFF/8svx file

There is still time to both apply for GSoC 2008 and work on a qualification task. I have been scavenging the MultimediaWiki for game-related formats that have long been documented but not re-implemented in FFmpeg. Hopefully, the supply will hold up for all the students who want to try their hand at FFmpeg.

Good FATE Housekeeping

The front page of FATE may not look all that different, save for some new tests every few days. But I assure you I am doing a lot of work on the backend to improve the whole thing. I finally deployed the optimizations outlined in this post. That put the brakes on the unrestrained growth of the database (2.5 GB in as many months). I also thought of another –ahem– groundbreaking optimization: If the client-side test script compresses the stdout or stderr for a build record and the compressed size is larger than 64K, there’s really no reason to send it over and store it in the database– the database won’t be able to decompress the data block anyway after it is truncated to 64K. This is the case for every single icc build. Intel’s C compiler insists on operating in a pedantic mode that I can’t seem to disable, despite the options documentation. Fortunately, I have been logging total stderr line count for for several weeks now (though I haven’t made it available via the web interface yet).

So what to do about this enormous database? At first, I suspected that all those specious icc stderr blobs had a significant impact. But no: that’s only occupying 13 MB. Still, that useless data is now gone.

The real space pigs are the cumulative stderr/stdout blobs logged prior to my space-saving epiphany:

mysql> SELECT 
  SUM(LENGTH(stdout)), 
  SUM(LENGTH(stderr)) 
  FROM test_result;
+---------------------+---------------------+
| SUM(LENGTH(stdout)) | SUM(LENGTH(stderr)) |
+---------------------+---------------------+
|          1337031227 |          1096300800 |
+---------------------+---------------------+

Whoa. So that’s where all the space went. That’s right: ~1.3 GB and ~1.1 GB, respectively. Getting rid of the stderr blobs is pretty straightforward. I don’t care about stderr if the test was successful:

mysql> UPDATE test_result
  SET stderr=NULL
  WHERE test_passed=1;

The stdout blobs are a bit trickier. If the test failed, the stdout is always a keeper, just like stderr. If the test succeeded, I still want the stdout data if the corresponding test spec listed the expected stdout as being NULL– that means the stdout is supposed to be retained for logging purpose. This is presently used for tracking the assorted binaries’ filesizes over time and I don’t want to drop that data. So it seems I need data from another table in order to make this query work. Sounds like a job for an JOIN operation, which didn’t seem to be possible per the raw syntax spec. I’m glad I turned out to be wrong as indicated by this blog post. So I cloned a small test table and went to work prototyping it backwards and forwards, lest I lose 3 months of precious filesize data.

mysql> UPDATE test_result result 
  INNER JOIN test_spec spec
  ON result.test_spec=spec.id
  SET result.stdout=NULL 
  WHERE result.test_passed=1
  AND spec.expected_stdout IS NOT NULL;

Things are a bit more manageable now and I’m happy to report that I have a fighting chance of implementing a regular, automated backup schedule for FATE:

+---------------------+---------------------+
| SUM(LENGTH(stdout)) | SUM(LENGTH(stderr)) |
+---------------------+---------------------+
|             2046425 |             4292739 |
+---------------------+---------------------+

I hope you have enjoyed yet another installment of The New Adventures Of The Amazingly Inept DBA.