Confusion about WAV max size

Help for Audacity on macOS.
Forum rules
ImageThis forum is for Audacity on macOS 10.4 and later.
Please state which version of macOS you are using,
and the exact three-section version number of Audacity from "Audacity menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
Post Reply
raj897
Posts: 2
Joined: Thu Jul 23, 2020 7:09 pm
Operating System: OS X 10.6 Snow Leopard or earlier

Confusion about WAV max size

Post by raj897 » Thu Jul 23, 2020 7:28 pm

Hi everyone,

TL;DR - I exported a bunch of audio files as WAVs on Audacity a couple of years ago, they range between 6 and 11 gigs, but now I have learned that supposedly the max size for a WAV is 4 gigs - trying to figure out what is going on.

I'm helping to build a digital archive for a university and was advised that, in order to be archival-quality audio, the files should be saved as 32 bit float WAV format. The recordings range from 1 to 6 hours. At the time, I was able to export each of the files in that format. The biggest ones ranged from between 6 and 11 gigs. I began working on this project a couple of years ago when I had access to top-of-the-line university media lab desktop Macs, but I don't know what OS or version of Audacity they were running.

Right now I'm working from home on a laptop running on OS X 10.10.5 and Audacity 2.4.1. Today I went to export a 2.5 hr recording and got the error that no WAV files could be exported above 4 gigs. Then I google and learn this is the technical limit for any WAV file. This came as a surprise since I am staring at three WAV files that are much larger than that.

So my questions are -

1) Is there something wrong with those bigger files? They sound fine, but I don't understand how they exist unless there was some sort of error that allowed them to be created.
2) Is there anything I can do to override the 4 gig size limit? Maybe something was enabled on the university computers that I didn't know about?

Going forward I can just cut the WAVs into multiple files, so I'm not too worried about #2. But definitely want to know what was going on with #1.

Thanks in advance for any insight!

kozikowski
Forum Staff
Posts: 68938
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Confusion about WAV max size

Post by kozikowski » Thu Jul 23, 2020 7:50 pm

They sound fine
They sound fine, but are they all there? The file assigns numbers to everything in the show. When it gets to the limit, some systems just start counting over without telling you. So when you tell the show to play from the beginning, it can either play to the limit and stop, or it can start at the limit and play the remainder, ignoring the first several hours of the show.

This can give you oddities such as a multi-GB sound file with fifteen minutes of show.

So you should check that. Many times, the data is still there and there are ways to bring a show back from this problem.

Koz

DVDdoug
Forum Crew
Posts: 9287
Joined: Fri Sep 10, 2010 11:30 pm
Operating System: Windows 10

Re: Confusion about WAV max size

Post by DVDdoug » Thu Jul 23, 2020 7:54 pm

In the WAV header there is a 32-bit "data size" field and you can only "count to" 4G* with 32-bits. Some applications will ignore that and open/play the whole file, and some applications will go-ahead and create an oversized file with an invalid data size.

The data-size field usually "rolls over" so it doesn't simply max-out at 4GB. i.e. If you if you go slightly-over the limit you loose the most significant bit and the application thinks you have a very-small file.

If you have a larger WAV file you can import it as raw data. You have to know (or guess) the format details (bit depth, sample rate, etc.) and you'll get a short glitch at the beginning where the header is converted to audio, but you'll get the whole file.
Is there anything I can do to override the 4 gig size limit? Maybe something was enabled on the university computers that I didn't know about?
Use a different format. FLAC has no "artificial" limit plus the files are smaller (compressed) but it doesn't support floating-point. Other options are RF64 or W64.


* With 32-bits unsigned you can count to 4,294,967,295.

steve
Site Admin
Posts: 80752
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Confusion about WAV max size

Post by steve » Thu Jul 23, 2020 7:54 pm

A "standard" Microsoft WAV file has a file size limit of 4 GB.

There are variations of the WAV format that may be greater than 4 GB, the two main ones being:
BWF: https://en.wikipedia.org/wiki/Broadcast_Wave_Format
RF64: https://en.wikipedia.org/wiki/RF64

Audacity supports RF64.
  1. "File menu > Export > Export Audio"
  2. Select "Other uncompressed formats"
  3. Header: RF64(Riff64)
  4. Encoding: Pick your preferred option
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

raj897
Posts: 2
Joined: Thu Jul 23, 2020 7:09 pm
Operating System: OS X 10.6 Snow Leopard or earlier

Re: Confusion about WAV max size

Post by raj897 » Tue Jul 28, 2020 3:09 pm

Thanks to all of you for your helpful replies!
DVDdoug wrote:
Thu Jul 23, 2020 7:54 pm
If you have a larger WAV file you can import it as raw data. You have to know (or guess) the format details (bit depth, sample rate, etc.) and you'll get a short glitch at the beginning where the header is converted to audio, but you'll get the whole file.
This turned out to be my saving grace, here - the raw data was intact when I imported the WAVs to Audacity so now I can just save them as something that will actually play. Thanks again.

Post Reply