Category Archives: Open Source Multimedia

News regarding open source multimedia projects.

Basic FFmpeg Hacking

A few more people have expressed interest in writing file demuxers and audio/video decoders for the FFmpeg project. I present herewith a brief guide to creating both demuxers and decoders for that project.

Start with the demuxer:

  • copy one of the simpler formats (libavformat/idcin.c or idroq.c) to a new file and start modifying the key parts
  • edit libavformat/allformats.c and libavformat/avformat.h and add the proper _init() function
  • edit libavformat/Makefile and add the new file to the end of the OBJS list

You should be able to build the new demuxer module into the project now. Check ‘ffmpeg -formats’ to make sure. You can use printf()’s or gdb along with the ffmpeg for debugging.

Next is the video decoder:

  • copy one of the simpler video decoders (libavcodec/msrle.c or msvideo1.c) to a new file and start modifying the key parts
  • edit libavcodec/avcodec.h and add a new CODEC_ID; also add the new data structure declared at the end of the new file
  • edit libavcodec/allcodecs.c and add the new data structure there as well
  • edit libavcodec/Makefile and add the new file to the end of the OBJS list

It helps to recompile the entire project after adding a new CODEC_ID just to make sure it “takes”. ‘ffmpeg -formats’ should now report the new format. Proceed with development and debugging. Note that in libavcodec, printf()s are forbidden. Use av_log(NULL, AV_LOG_INFO, …) instead.

Mad Dog McCree And TTA

I finally got up out of my chair, ambled across the room to my big CD-ROM folder, got out the Mad Dog McCree disc, unpacked the LIB GRAF file, so that I could finally test and commit Peter Ross’ ALG-MM playback system for FFmpeg. If you have any of the very early multimedia titles by American Laser Games you should be able to use the latest CVS version of FFmpeg to play the cheesy, low-resolution, low-framerate multimedia. Further, I have placed some select samples here.


Mad Dog McCree

Also, Alex has submitted a native FFmpeg playback system for the True Audio (TTA) lossless format. Next up: Kostya is working on a native decoder for a format I had not heard of yet called ZMBV which is apparently an open source codec used to capture video in the DOSBOX application.

VOC Support

Thanks to Aurelien Jacobs for the new FFmpeg VOC subsystem. I want to express my particular gratitude that he did everything right in the process:

For the uninitiated, the VOC format was a.k.a. the Creative Voice file format which was tied to specific multimedia hardware, as was the case with so many old multimedia formats. This format was tied to the original line of Creative Labs’ Sound Blaster audio cards, so much so that the format actually stored the Sound Blaster DAC frequency divisor for PCM data. VOC files originally stored PCM or any of the custom ADPCM formats that SB hardware apparently supported, including a 2.6-bit format. Details of these custom formats are unknown.

MultimediaWiki Documentation

No matter how ambitious I get I can not stay ahead of the rest of the multimedia hacking community. I thought it was a lofty goal when I set out the re-categorize and expand upon a bunch of the information maintained at the FOURCC list using a Wiki. But I got suggestions to go further and incorporate the technical documents into the Wiki as well so that anyone can edit them.

And so it begins: I have entered the first few tech docs into Wiki format:

Much more to come.