Log in

View Full Version : How to exceed the 4Gb file size limit in FAT32


ajmoss
16th March 2002, 16:03
Many people here don't use ATI Multimedia Centre 7.1 to capture AVI files, because it doesn't support Huffy compression on the fly. It doesn't use the standard Windows method for writing AVI files; instead, its proprietary software writes the data to disk and updates the FAT at the end of the recording. This is obviously helpful if you want to record close to the limit of your hard disk's data rate capacity, but it would make it impossible to use Avisynth to write two successive files without dropping any frames between them (that is, if MMC supports Avisynth at all).

Yesterday, I used MMC to record a 2.4Gb AVI file (quarter-resolution PAL, uncompressed, for eight minutes), which it did faultlessly. In fact, a few days ago I left MMC recording an MPEG for four hours; the file I ended up with was truncated at 203 minutes, when it hit the 4Gb limit, but the computer had continued to write data to disk throughout the four hours.

It wouldn't surprise me if I could recover all the data from a similar recording in Windows 98 - in effect, to record a file longer than 4Gb in FAT32. What would need to be done is:

1. Truncate the file to one cluster's length shorter than 4Gb. A file length stored as a 32 bit number can't be exactly 4Gb long; if you don't cut off the last cluster, you'll lose 32 bytes of data from the end of that cluster.

2. Use a disk editor to write the directory information for a new file - one with an appropriate name, and the correct file length and start cluster. Only insert information into the directory at this point.

3. Use a file unerase utility to create the FAT information for this file. It's easy enough for the utility to reconstruct your file, getting all the data in the right order, because new files are written to any unused clusters in order of increasing cluster number.