QUOTE(Sunhillow @ Feb 21 2007, 05:36)

QUOTE(cabbagerat @ Feb 20 2007, 18:24)

It's much better, and easier, to run two lame threads in parallel. This can be done on windows with EAC, or on linux with a shell script.
But this can result in heavily fragmented files, because the encoder cannot reserve space for the whole file when it starts to write.
Actually, it's not impossible for an encoder to do this, though I believe most, if not all, do not.
Yes, starting small and continually extending the file can result in heavily fragmented files, assuming the filesystem/filesystem-driver isn't designed to resist fragmentation. So, with FAT32, yes. With ext3, however, the filesystem is designed to avoid heavy fragmentation in this instance.
An encoder could take advantage of the pre-allocation feature of some filesystems, such as NTFS (using appropriate createfile flags and assuming a filesystem that is not nearly full), by allocating enough space for a worse-case-scenario file size at the start of encoding, and then trim the unused end of the file off at the end of encoding. Worse case scenario would depend on the encoder, however: e.g. for a lossy encoder, it would depend on the bit rate settings/strategy, but for a lossless encoder would be the entire size of the WAV PCM data plus a bit more for header and maximum metadata size.
In this scenario NTFS, for example, would look for a contiguous space to create the entire file even before you started writing to it.
Whether or not this would result in any real-world improvement is left as an exercise to the reader.

I don't think there would be a direct performance benefit to doing so right out of the box, but the fragmentation avoidance would be useful, say, in a program designed for a ripping company.
-brendan