ZOOM MRS Data Compression

 ZOOM MRS compression/decompression batch v1.0


This zip file contains 4 batch files designed to use the free (for non commercial use) 'Optimfrog' lossless audio compression program to compress and decompress the .DAT audio files produced as part of a ZOOM MRS project, for archiving and backup purposes.

The Zoom. DAT files take up most of the disc-space used by an MRS project. There is one file per V-take for a mono audio track, and 2 per V-take for each stereo track or master track. Each file contain a ZOOM specific header, followed by the audio data in a 16 bit signed format.

I wrote these for my own use when backing up valuable projects to data CD or DVD. (I generally record a couple of full band rehearsals per week, and mix these down to CDs to give to each band member so we can listen to our playing between times and get to grips with new songs faster. While I would like to be able to save all the project data for each rehearsal :- I would need 2 or 3 DVDs to hold the .DAT files .. and that is too much. As a result I looked at ways to quickly use the excellent 'Optimfrog' compression utility to help.)

Optimfrog will give much better compression of audio data than a general compression utility, as it is solely designed to work with audio data. Optimfrog is one of the best lossless compression programs available.

The very important bit :-  Optimfrog is a
LOSSLESS compression program .. so produces a file from which the original .DAT file data can be reconstructed EXACTLY. This s NOT like encoding to MP3 where the compression is carried about by throwing away some information .. which may lead to audible differences. Optimfrog is more like a zip compression program especially designed to work with audio files.

Generally Optimfrog can compress a .WAV file by 40% its original size. When used with Zoom multitrack data however I find it works even better (as you might expect .. as each individual track is less complex that a full blown mixed track) I generally get a 3 times space reduction across a ZOOM project.

Compression with Optimfrog produces an .ofr file .. and it is these .ofr files I
archive to DVD in place of the original .DAT files when I back up a ZOOM project. Note that .ofr files can be played directly in winamp and some other PC sound players. This is sometimes useful so you can play the .ofr files of an archive directly to remind yourself what a particular song or track was. (You will hear a short burst of noise at the start however as the ZOOM .DAT file header is played as if it is audio data.)

Files in this zip file are :-

readme.txt- this file
encdatall.bat - call this batch file to encode (compress) all ZOOM audio files in the current directory and subdirectories
decdatall.bat - call this batch file to decode (uncompress) all compressed ZOOM audio files in the current directory and subdirectories back to Zoom format.
encdatall2.bat - a batch filed used by encdatall.bat
decdatall2.bat - a batch filed used by decdatall.bat
 

(I would not recommend trying to use these unless you are kind of confident working at a command prompt level on your PC .. but I'm sure some of the more PC-savy Zoom users you will find this useful.)

You will need to install the PC win32 console version of Optimfrog on your PC. First, get it from

http://www.losslessaudio.org/Download/OptimFROG_Win32.php

(These batch files have been tested with
Optimfrog 4.509 which was the stable release as of 26 September 2005)

You will then need to change the 3rd line of encdatall2.bat and decdatall2.bat to reflect the folder you installed Optimfrog in. (I have Optimfrog installed in 'c:\apps\optimfrog', so the batch files are currently set up for that.

Important points :-
 

Optimfrog should be installed in a folder who’s path does not contain any spaces or ‘wierd’ characters’. (DOS batch files get very confused by spaces etc in the middle of a filename.)


The batch files currently use Optimfrog in its most extreme compression setting so the compressed files are as small as possible. This (inevitably) means that compression and decompression take a long time.


If you find this too annoying, then you can change the compression level by changing the options passed to ofr.exe in encdatall2.bat. see http://www.losslessaudio.org for details.

Please please please don't use this on your only copy of important projects. I use the routines myself, and am happy they are safe and bullet proof, but I really don't want anyone to lose something valuable because I have messed up somewhere.
 

Also Please please please follow the terms of use for Optimfrog.

 

The stages for compression one or more ZOOM projects is as follows

1. Copy the project directories from the Zoom to your PC using USB interface (or on backup CD if you do not have a USB interface)

For the purposes of this example .. I suggest copying the projects to a directory called c:\zoombackups. If you copy a couple of projects you will then have a directory with 2 project subdirectories in it. For instance :-

PROJ000
PROJ003

2. Copy the batch files into the directory with the project files in
(c:\zoombackups in this case)

you should then have a directory with 6 files in it :-

PROJ000
PROJ003
encdatall.bat
encdatall2.bat
decdatall.bat
decdatall2.bat

(Note. the files 'encdatall.bat' and 'decdatall.bat' are the ones you should run. These in turn call the batch files 'encdatall2.bat' and 'decdatall2.bat' which must be present in the same directory.)

3. Run the batch file 'encdatall.bat.bat' to convert all the .DAT files in the projects to compressed .ofr files.

You can run the batch file just first starting a command prompt from the start menu, then in the command prompt window, type

cd c:\zoombackups

then just type

encdatall

to run the batch file.


You will see some screen output informing you of progress for each file
in each project, but once you see the command prompt back .. compression is finished. You can then move the project files to DAT CD/DVD/ or whatever storage system you like most.

To uncompress the files, just copy then back off your CD/DVD to the 'zoombackups' directory, and run the 'decdatall' to reverse the process.

This will change the compressed .ofr files back into ZOOM format .DAT files which are identical to the originals.
 

(You can also run the batch files by simply double clicking on 'encdatall.bat' to compress all ZOOM audio files in that folder or below it, or double clicking on 'decdatall.bat'to uncompressed them again. Double clicking doesn’t let you see what happens when the batch file fails immediately however, so is not ideal.)


As a final thought, while I have tested the scripts myself .. it is always
possible there is something I have overlooked. If so .. let me know and I will update things accordingly. As with all new things .. be careful .. I don't want anyone to lose anything precious by trying this .. and I certainly don't want to get the blame !)

For the future, it is possible to produce a simple 'all in one' GUI driven program incorporating Optimfrog for handling .DAT files directly without the need for batch files. I'll think about this if people think it would be of wide benefit (and if the nice Optimfrog people don’t mind.)

 

F.A.Q.

 

: Where do I get the batch files ?

Here

: How much is it?

Its free.

: It’s great/ it doesn’t work/ it’s rubbish. What do I do ?

Tell me about it to zoomcompression@howagent.co.uk

: how can one be sure that there will be ongoing support for the products? I would very concerned if the compressed backup data was rendered useless if it could not be de-compressed!

There can be no guarantees that Optimfrog will continue to be developed, as it is being run by an individual.


However, as of Sept 2005 it is still being actively worked on, and is available for Linux as well as windows.

As the program works under DOS, it is very self contained .. and does not rely on any features of windows which Microsoft might change other than DOS box compatibility.

It is possible that Microsoft might remove the ability to run DOS batch files from future releases .. but I can't image it being difficult in the next 10 years to find a windows XP machine to decompress ZOOM files on. (And probably before then storage will be so cheap that we can store all music uncompressed and not think twice about it !)


If you are really worried, it is of course easy to produce a bootable floppy (or CD) you can just stick in your PC which will take you into DOS where you can uncompress everything. It then doesn't matter what Microsoft or Linux changes may happen in the future.

The best way to safeguard yourself is to make sure you save copies of the batch files, documentation, and the linux and windows optimfrog distributions onto every compressed ZOOM CD or DVD you write. Then in years time everything you need will be together and available.
 

It appears that your batch files must be run from within the directory that you want to compress. Is itpossible to execute the batch file and then specify what directory you want to compress?


The batch file will compress or decompress multiple projects in different directories at once.

By default, the batch file searches all the directories below it.

I just have a directory called 'zoombackups' I hold the batch files in, and just copy each new ZOOM project in there as its produced, and rerun the compression code whenever I want to claim some pace back or write a backup CD/DVD.

If you want to hold the batch files somewhre else, you can just change the line

dir /s /b *.ofr > filelist

in encdatall and decdatall to

dir /s /b c:\insertyourpathhere\*.ofr > filelist
 

Can you verify that the compression gives absolutely NO loss?


Its easy enough to prove to yourself that there is no loss. Simply make a couple of copies of a ZOOM project onto your PC, compress and decompress one of them, and then do a binary comparison of the 2 sets of files until you get bored


The DOS command

fc /B

will do a binary comparison of 2 files for you.

(Do 'fc /?' to see all the options.)


Be assured that unless I was absolutely sure the uncompressed files were bit-identical to the originals, I would not be using these batch files myself, and would not be suggesting others try to ;-)
 

Enjoy

Chris Ratcliffe
Sept 2005