avbParser
Documentation and parser for Avids proprietary .avb file format
Background
Avid's video editing software stores projects as .avb files. These are proprietary, undocumented binary files. Avid software can also export common MXF (Media Exchange Format) files. However, some project information like locators are not exported to MXF. For a project we needed to get this info out of the .avb files (in fact, we later gave up on the idea and went another way). Thus, Max Maurer and I tried to reverse-engineer the .avb file format.Reverse engineering a .avb file
How do you start with reverse engineering a binary blob if you have never done this before? You open a hex editor, print out the first x bytes of the file and try to find patterns in it. Once you find them, you mark all occurences and try to make sense of them.Some stuff we found out:
- There are differences between files created on a Mac and on Windows. I assume that all Mac test files we had came from PowerPCs. Those are big-endian. PCs are little-endian. Thus, Mac files had frame identifiers (so we called them) like "RTTA", while PC files used "ATTR". Also, time stamps were reversed
- You can easily recognize Unix timestamps. They are 4 bytes long. If they represent a reasonably recent time the first byte is 0x47 or 0x48
- The frame identifiers were followed by additional bytes containing the length of the frame and its type.
avbParser - converting .avb to strange XML
Once we had some understanding of the file layout, Max modified a parser he had written for MP3 files to work with the .avb files. You can download the parser below. Source code is included in the Jar file. Parsing a file is done by callingjava -jar avbParser.jar file.avbThe code is quite clean. Thus, if you want to know the exact workings of the file format, please look into the code.
- avbParser.jar as of 04.12.2008
- sample .avb file (if you need larger files, just google them)
- output of parsing the sample file