Only seeing 25 minutes out of a 7 hour .WAV [SOLVED]

I have recorded a 7 hour stream in WAV (default settings, except 44.1KHz, not 48) in Audacity 2.1.0. I exported the wav to disk. The file is 4.25GB. When I open it, it only shows the first 25 minutes. It displays the same in several other media players and audio apps.

I recored this sorta thing all the time without any problems. Usually a 4 hour stream saves to a file of about 3GB. I think this is the first time I have broken the 4GB barrier. My disk is NTFS formatted.

I assume that the file is corrupted. Is there anything I can do to salvage it? Or is there some cached version of the original stream hiding somewhere?

Secondarily, is there any explanation of why this would have happened (e.g. filesize limitations) so I can prevent reocurrence.


Win10 Home ver1703 build 15063.540
Disc: 128GB partition on at 256GB NTFS SSD with >10GB free.
Audacity 2.1.0 build Mar 23 2015 from .exe

The maximum size of a normal WAV file is 4GB

The size of a WAV file can be calculated (in bytes) as:

Number of bytes per sample x
Number of samples per second x
Duration in seconds x
Number of audio channels.

7 hours = 7 x 60 x 60 seconds = 25200 seconds

Assuming that you exported as “16-bit” wav, that has 16 bits per sample, which is 2 bytes (1 byte = 8 bits).
Assuming that you exported a stereo track, that is 2 channels.

So that gives you

2 (bytes per sample) x 44100 (samples per second) x 25200 (seconds) x 2 (channels) = 4445280000 bytes.

When dealing with file size:
1 KB = 1024 bytes
1 MB = 1024 KB
1 GB = 1024 MB

4445280000 bytes = 4445280000 / (1024 × 1024 × 1024) = 4.14 GB which is invalid and will be irreversibly corrupted.

If you saved the Audacity project, then you could either export the recording in sections to produce 2 or more WAV files that are smaller than 4 GB, or export in a different format such as MP3 or FLAC.

aaaah. Thanks for that. Lesson learned.

just a thought - it might be worth adding a note in the Audacity wiki about that. I know, it’s not a limitation of Audacity, but it might be useful to some people to be informed/reminded of the limitation in the WAV format.

I think there is a note somewhere, perhaps even in the manual, but the problem is that we can’t make every potential pitfall prominent. Similarly we can only list a few “frequently asked questions” before the FAQ becomes too long to be useful.

A solution has been suggested, which I think is a good idea and hope will be implemented at some time, which is that when exporting WAV, Audacity could calculate the size of the file before starting the export, so it would be possible for Audacity to detect the problem before it happens, and refuse to export as WAV if the file size will be too big (with an informative error message to explain what the problem is).

Cool. Thanks again.