DJWrap MPEG audio wrapping library v0.9.x (C) Copyright 2003 Oscar Sundbom Contents: 1. Copyright 2. Introduction 3. Differences to other formats 4. Features of the DJWrap format 5. Installation (read the file INSTALL) 6. Usage (read the file USAGE) 7. Where to get the latest version. COPYRIGHT Most parts of this library is released under the GNU Lesser Public License version 2.1. Some parts are, on the other hand, not. The MD5 code in md5.c and md5.h is released under a separate license which can be read in those files. That code is not created by me, but by L. Peter Deutsch and released under a very free license. The FORMAT document, and the DJWrap format which it describes, are released under a much more restrictive license, though its use is still free for all. For more information, see the FORMAT document itself. INTRODUCTION This library is a sort of reference implemetation of the DJWrap MPEG audio wrapping format described in the FORMAT file which is accompanying this distribution. That format, and this library, is an effort to create a free, open and good alternative to other, similar formats, such as AlbumWrap. Actually, this project has much further goals than just wrapping and unwrapping MPEG audio for ease of transport, or archiving purposes. The goal is to make the wrapped files more of extended MP3s than just means of storage and with the format and libraries being free, it's all possible. A DJWrapped file should not just be playable and seekable as an ordinary MP3. It should be possible, in a player, to jump between the tracks as if they were separate files and CD burning software should be able to burn just the tracks you choose, and as separate tracks, not just as a big dumb chunk of music. This will, of course, not happen on its own, but requires support in other software. Something I hope will happen in due time. DIFFERENCES "So, why create another format? There are a couple out there already and some of them seem to do what yours is supposed to do." is one of the questions I get most frequently. Well, actually, no, it isn't, but if I DID get questions pertaining to this project, I'm guessing this would be one of them. Well, firstly, the only major "competitor" is the AlbumWrap format, which is closed, and also one of the ugliest hacks I've seen for a long time. It's not hard to reverse engineer, and I've made a tool for it called ALBWtool. It is not extensible in a good way, since it's not made in a good way to begin with and, well, did I mention it's closed? That is, there is a very slim chance that one could get away with writing a wrapper for it without getting sued. Why anyone would want to write a wrapper for such a format is beyond me anyway. After discussing about Matteo Trotta, author of mp3wrap, I've realized I went a bit overboard in my critisism. There is now also an mp3wrap format spec. availible at the home page. Mp3Wrap and DJWrap are similar in many respects. They're both free, released under OSI approved licenses. They produce smaller indexes than AlbumWrap and can wrap non-MPEG files, though not in a very good way. As Matteo pointed out, users might (for some unexplainable reason) remove the ID3 tag of a DJWrapped file and that would render it useless, well, not really, but you wouldn't be able to unwrap it anymore. Mp3wrap solves this by putting the wrapping info outside the tag. Both methods have pros and cons. Software might/will have a harder time recognizing the file as an MP3 if it starts with invalid data. This may apply to both formats, depending on if the sofware supports, or at least knows about, ID3v2 tags. This also applies to software made for cleaning up MPEG streams by removing broken frames and erroneous data. DJWrap tries to improve on the security of the index data through a redundancy part being added at the end of the file, in a format very similar to an ID3v2 tag, but without really being an ID3v2 tag. Another difference between Mp3wrap and DJWrap is that Mp3Wrap can include path info. There is nothing in the format specification that stops DJWrap from doing that, but the library currently strips all path information from the file name before wrapping it out of several reasons: Firstly, paths are not represented the same way across all OS', so a standard format must be chosen. Secondly, there is a _small_ secturity risk in allowing path information, where files no where near your destination directory might be overwritten. Thirdly, the format's only designed for wrapping single albums and the example utility allows you to put the unwrapped files wherever you want, so it is not a high priority issue. Still, I'm looking into it. FEATURES So, except the differences mentioned above, what does DJWrap offer? Firstly, and I can't stress this enough, it's not just a tool, it's a format and a library, both of which are free to varying extents. I say varying extents because the format isn't open for anyone to mess with as they want. Then it wouldn't be a format anymore, but an uncontrollabe mass of data. The format, and the documentation describing it, may only be changed by the project maintainer but input is not only welcome, but encouraged. The library is free under the LGPL, meaning that anyone can use it in their programs as they wish, whether open, closed, free or non-free. If the LGPL- license for some reason doesn't work for you, or if the library just isn't working the way things must be in your software, you're fully free to create your own implementation, or, in the latter case, alter the library. The format itself is embedded in an ID3v2 tag in the beginning of each DJWrap file. You can remove it and the file will still play, but you'll have a hell of a time unwrapping it. Well, you can't. You can, however, alter the tag, by adding new frames or removing old, with exception to those pertaining to the DJWrap format. The file will still work fully, even if the tag changes size. Each entry in the format is stored in a separate General Encapsulated Object (GEOB) frame, and encoded in a way so it can never be interpreted as a valid MPEG header. This makes it as secret as is possible, without maybe adding the data into the actual MPEG stream as valid audio data. The format is also easily extendable and unknowing unwrappers will just deal with the information they know about (with warnings, hopefully). This isn't an issue yet, since there is only one version. Finally, the format implements a separate MD5 checksum generated for each of the substreams, making it possible to only re-transfer the broken part of a wrapped file, instead of the whole thing. INSTALLATION Well, read the file INSTALL. USAGE Check out the file USAGE. WHERE TO GET THE LATEST VERSION go to http://djwrap.sourceforge.net