The 2GB Wav-limit!? |
![]() ![]() |
The 2GB Wav-limit!? |
Mar 17 2005, 00:51
Post
#1
|
|
|
Group: Members Posts: 18 Joined: 25-February 05 Member No.: 20150 |
Hello everybody,
I just wanted to know if there is by any chance a program which can record wav-files larger than 2GB. The Wavelab-lite version I'm using right know stops any recording which is exceeding that limit. Thanks for your help! |
|
|
|
Mar 17 2005, 02:32
Post
#2
|
|
![]() Administrator Group: Admin Posts: 2372 Joined: 22-September 01 Member No.: 3 |
There are a number of programs that have problems with files larger than 2 GB. The WAV format itself is officially limited to 2 GB.
You could use a program that records to a lossy format on-the-fly, like Messer, that can record to MP3. Or you cut the recording in between... i mean, 2 GB, that's over 3 hours in one piece... |
|
|
|
Mar 17 2005, 03:40
Post
#3
|
|
![]() Group: Members Posts: 439 Joined: 9-February 05 From: county down Member No.: 19713 |
The common wav header can only allocate 4 bytes to state the total wav length in bytes which will be why there's a two Gig limit. That detail could be depreciated (make -1 = read till the end of file) -would be nice, might crash old players hmmm...
Since Linco.exe can write a raw PCM file (wav file without any headers) it may not have its own restriction on length. That would allow a continuous recording, then have to reencode or chop up and format the raw. -------------------- no conscience > no custom
|
|
|
|
Mar 17 2005, 09:15
Post
#4
|
|
![]() Group: Members Posts: 410 Joined: 20-October 04 From: UK Member No.: 17750 |
QUOTE (Quantos @ Mar 16 2005, 11:51 PM) Hello everybody, I just wanted to know if there is by any chance a program which can record wav-files larger than 2GB. The Wavelab-lite version I'm using right know stops any recording which is exceeding that limit. Thanks for your help! Audacity can. And it's free... and very good. -------------------- http://www.health4ni.com/
|
|
|
|
Mar 17 2005, 10:35
Post
#5
|
|
|
WaveRepair developer Group: Developer Posts: 774 Joined: 28-July 04 Member No.: 15845 |
QUOTE (ChiGung @ Mar 17 2005, 03:40 AM) The common wav header can only allocate 4 bytes to state the total wav length in bytes which will be why there's a two Gig limit. This isn't quite correct. It is true that the file length in the WAV header is a 4 byte integer, but it's an *unsigned* number, which means that the maximum size of a WAV file is actually 4GB, not 2GB. Some audio programs get this wrong, and interpret the file length as a signed number, thus imposing a 2GB limit. I can confirm that Wave Repair supports WAV files up to 4GB, and if used just for recording it's free. And I see someone else has pointed out that Audacity (also free) will also go above 2GB. |
|
|
|
Mar 17 2005, 16:50
Post
#6
|
|
![]() Group: Members Posts: 439 Joined: 9-February 05 From: county down Member No.: 19713 |
QUOTE (cliveb @ Mar 17 2005, 09:35 AM) QUOTE (ChiGung @ Mar 17 2005, 03:40 AM) The common wav header can only allocate 4 bytes to state the total wav length in bytes which will be why there's a two Gig limit. This isn't quite correct. It is true that the file length in the WAV header is a 4 byte integer, but it's an *unsigned* number, which means that the maximum size of a WAV file is actually 4GB, not 2GB. Theres no need to correct to clarify Wether the number is read as signed or not only becomes an an issue beyond 2g. The 'actual' maximum size neednt have a limit if handled ideally. -------------------- no conscience > no custom
|
|
|
|
Mar 17 2005, 17:11
Post
#7
|
|
![]() Group: Members Posts: 2525 Joined: 25-July 02 From: South Korea Member No.: 2782 |
... which begs the question, how do you overcome the 4GB limit?
Using -1? -------------------- http://blacksun.ivyro.net/vorbis/vorbisfaq.htm
|
|
|
|
Mar 17 2005, 17:21
Post
#8
|
|
![]() Group: Members Posts: 3621 Joined: 14-May 03 From: Bad Herrenalb Member No.: 6613 |
QUOTE (kjoonlee @ Mar 17 2005, 05:11 PM) No, because -1 is signed and the size descriptor in the Wave header is unsigned. -1 would be 0xff 0xff 0xff 0xff which already stands for the unsigned 4294967295. I guess there is no way, since it is a limitation of the format. You could use raw PCM and wrap it into a Matroska container (if supported). If I am not mistaken, the WAV container was invented by Microsoft and at that time, FAT16 was the only HDD file system supported by Windows - which by design has a file size limitation of 2 or 4 GB (not exactly sure). -------------------- http://listening-tests.hydrogenaudio.org/sebastian/
|
|
|
|
Mar 17 2005, 17:55
Post
#9
|
|
![]() Group: Members Posts: 439 Joined: 9-February 05 From: county down Member No.: 19713 |
QUOTE (Sebastian Mares @ Mar 17 2005, 04:21 PM) QUOTE (kjoonlee @ Mar 17 2005, 05:11 PM) No, because -1 is signed and the size descriptor in the Wave header is unsigned. -1 would be 0xff 0xff 0xff 0xff which already stands for the unsigned 4294967295. If a program wont read over 2gigs, the size descriptor never gets to have a sign because the msb is never used. Data has no sign or specific meaning - theres what maybe it should mean, what it can, and what it usualy does... By -1 i meant 0xffffffff to be used as an escape value. QUOTE I guess there is no way, since it is a limitation of the format. Its a limit of how the format is usualy read. An ideal wav reading routine can read to the end of file or use filesize-headersize to compute the PCM length. QUOTE You could use raw PCM and wrap it into a Matroska container (if supported). If I am not mistaken, the WAV container was invented by Microsoft and at that time, FAT16 was the only HDD file system supported by Windows - which by design has a file size limitation of 2 or 4 GB (not exactly sure). The wav format was invented - heh like monkey poke stick in log pickup ants -------------------- no conscience > no custom
|
|
|
|
Mar 17 2005, 18:10
Post
#10
|
|
|
WaveRepair developer Group: Developer Posts: 774 Joined: 28-July 04 Member No.: 15845 |
QUOTE (ChiGung @ Mar 17 2005, 05:55 PM) QUOTE I guess there is no way, since it is a limitation of the format. Its a limit of how the format is usualy read. An ideal wav reading routine can read to the end of file or use filesize-headersize to compute the PCM length. Actually, this won't work. A WAV file is free to have arbitrary non-PCM data at the end, and some audio processing programs do in fact place proprietory information there. As well as the file length near the front of the RIFF header, there's also a "chunk length" (another unsigned 4 byte number) at the front of the data chunk. Nothing beyond the defined length of the data chunk should be interpreted as PCM data. QUOTE If I am not mistaken, the WAV container was invented by Microsoft and at that time, FAT16 was the only HDD file system supported by Windows - which by design has a file size limitation of 2 or 4 GB (not exactly sure). FAT32 also has a file size limit of 4GB. Even if the WAV standard was changed to support longer files, they would only be possible on NTFS partitions. Lots of people still use FAT32, so it's simplest to just accept that 4GB is the limit. |
|
|
|
Mar 17 2005, 18:38
Post
#11
|
|
![]() Group: Members Posts: 1394 Joined: 20-December 01 From: seattle Member No.: 693 |
http://www.uwsg.iu.edu/hypermail/linux/ker...912.3/0009.html
anyways, audacity supports >2/4GB thanx to filesystems in linux > kernel 2.2 (or with LFS patch). see http://linuxreviews.org/sysadmin/filesystems/ later -------------------- RareWares/Debian :: http://www.rarewares.org/debian.html
|
|
|
|
Mar 17 2005, 18:39
Post
#12
|
|
![]() Group: Members Posts: 439 Joined: 9-February 05 From: county down Member No.: 19713 |
QUOTE (cliveb @ Mar 17 2005, 05:10 PM) QUOTE (ChiGung @ Mar 17 2005, 05:55 PM) Its a limit of how the format is usualy read. An ideal wav reading routine can read to the end of file or use filesize-headersize to compute the PCM length. Actually, this won't work. A WAV file is free to have arbitrary non-PCM data at the end, and some audio processing programs do in fact place proprietory information there. Thats a point - but it is also free not too eh? To expand the wav format, make some very unlikely filesize like max-3 equal an escape value which implies a PCM size 'overflow'. -a proprietory deviation from the not so common compliancy ~? QUOTE As well as the file length near the front of the RIFF header, there's also a "chunk length" (another unsigned 4 byte number) at the front of the data chunk. Nothing beyond the defined length of the data chunk should be interpreted as PCM data. FAT32 also has a file size limit of 4GB. Even if the WAV standard was changed to support longer files, they would only be possible on NTFS partitions. Lots of people still use FAT32, so it's simplest to just accept that 4GB is the limit. Nice and comfy for programmers to keep the format capped. This post has been edited by ChiGung: Mar 17 2005, 18:41 -------------------- no conscience > no custom
|
|
|
|
Mar 17 2005, 20:00
Post
#13
|
|
|
Neutrino G-RSA developer Group: Developer Posts: 852 Joined: 8-May 02 From: Geneva Member No.: 2002 |
QUOTE (ChiGung @ Mar 17 2005, 06:39 PM) Well, that's how it goes by Microsoft standards. They're designed to sell well, not to be future-proof. Most modern formats use variable-length encoding for integers: - you actually gain bits when dealing with small files - you have virtually no limit on file size. The wav format is so simple, that it would be better to just use something else when dealing with big files, instead of adding ugly special-cases that will work in 10% of players, and will make people believe their files are corrupt. What will happen when a user creates a long WAV file for a family video, and it won't play in Windows media player ? Even worse, if you use this kind of hack with a legacy audio editor, it will truncate your audio without warning ! Good standards deserve to last, but IMHO, this ain't one of them. -------------------- Try Leeloo Chat at http://leeloo.webhop.net
|
|
|
|
Mar 17 2005, 20:56
Post
#14
|
|
![]() Group: Members Posts: 439 Joined: 9-February 05 From: county down Member No.: 19713 |
QUOTE (NumLOCK @ Mar 17 2005, 07:00 PM) ..... What will happen when a user creates a long WAV file for a family video, and it won't play in Windows media player ? Even worse, if you use this kind of hack with a legacy audio editor, it will truncate your audio without warning ! The max-3 escape 'implication' i mention could only possibly misinterprate PCM files of exact size max-3 (highly improbable length and impossible with 16bit or stereo) -which have also postfixed metadata.* QUOTE Its so common, for a container of PCM I think it should evolve rather than be ditched and replaced. Its a choice between k.i.s.s for the programmers or the users edit* -or just fail to read because of the filesize i admit - this happens already... This post has been edited by ChiGung: Mar 17 2005, 21:00 -------------------- no conscience > no custom
|
|
|
|
Mar 18 2005, 00:06
Post
#15
|
|
|
Neutrino G-RSA developer Group: Developer Posts: 852 Joined: 8-May 02 From: Geneva Member No.: 2002 |
I completely agree: more things should evolve instead of getting replaced every few years, that would prevent much useless re-development...
But wave ? I mean, if you do anything than switching between sample formats, you need to rewrite all applications that read or write wave files... The problem is that, in the first place, there was not much design to evolve from. This page sums it up pretty well: http://www.borg.com/~jglatt/tech/wave.htm The format cannot be improved much, without breaking compatibility with most existing programs. So when new features are needed, why not use the better alternatives ? -------------------- Try Leeloo Chat at http://leeloo.webhop.net
|
|
|
|
Mar 18 2005, 00:56
Post
#16
|
|
![]() Group: Members Posts: 1195 Joined: 3-September 03 From: Bergen, Norway Member No.: 8667 |
I think I read somewhere that aiff does not have this restriction. Is this correct?
-------------------- "ONLY THOSE WHO ATTEMPT THE IMPOSSIBLE WILL ACHIEVE THE ABSURD"
- Oceania Association of Autonomous Astronauts |
|
|
|
Mar 18 2005, 01:32
Post
#17
|
|
![]() Group: Members Posts: 439 Joined: 9-February 05 From: county down Member No.: 19713 |
QUOTE (NumLOCK @ Mar 17 2005, 11:06 PM) I completely agree: more things should evolve instead of getting replaced every few years, that would prevent much useless re-development... But wave ? I mean, if you do anything than switching between sample formats, you need to rewrite all applications that read or write wave files... Not if the 'simple' form PCM size specifier is escaped for file sizes over 4 gig. Old players wouldnt play files that needed to use the escape, old editors couldnt work with the files or convert them to their own format, but they couldnt anyway cause the file is just too big. Its backward compatibilty for all the files which dont use the extended feature. Maybe its too much fuss, but its not a hard limitation of the format that it cant be extended past 4gig. In practice i guess theres enough work to do if many wav openers misinterpret the 4byte addresser as signed. QUOTE QUOTE ("webpage") A Bastardized Standard The WAVE format is sort of a bastardized standard that was concocted by too many "cooks" who didn't properly coordinate the addition of "ingredients" to the "soup". Unlike with the AIFF standard which was mostly designed by a small, coordinated group, the WAVE format has had all manner of much-too-independent, uncoordinated aberrations inflicted upon it. I could have my stance skewed by my embryonic experiments in wav file handling but the Articles comments: 'much-too-independent'- is irrelevant, probably owing to an unrelated interest of the Authors; p (fine page though thankyou) - If one wishes to inflict aberrations on a format, that is impossible to do independantly. If a format can be worked within to include prefered capabilities without breaking its compatibilty (less the capabilities) -thats a programmers perogitive. Good stuff should eventually get coordinated into the format The common standard for packing chunks of pcm data could just accomodate simple wav formats with escape values to quirky ones. I dont see a point just now in sticking to origional limitations... hmm.. -------------------- no conscience > no custom
|
|
|
|
Mar 18 2005, 09:35
Post
#18
|
|
|
Neutrino G-RSA developer Group: Developer Posts: 852 Joined: 8-May 02 From: Geneva Member No.: 2002 |
CODE typedef struct { ID chunkID; long chunkSize; short wFormatTag; unsigned short wChannels; unsigned long dwSamplesPerSec; unsigned long dwAvgBytesPerSec; unsigned short wBlockAlign; unsigned short wBitsPerSample; /* Note: there may be additional fields here, depending upon wFormatTag. */ } FormatChunk; CODE typedef struct { ID chunkID; long chunkSize; unsigned char waveformData[]; } DataChunk; You could always define wFormatTag=1, as if audio data were compressed, set chunkSize to 0xFFFFFFFF, and then store the actual size in the compressed file info. But then, you could not store the real size in DataChunk, because there's not enough room. Or you could use a spacial value of wFormatTag, that would trigger various changes in the format. Anyway, none of these changes would be compatible with existing apps Then, instead of redefining two data structures in an incompatible way, why not use mka ? This post has been edited by NumLOCK: Mar 18 2005, 09:41 -------------------- Try Leeloo Chat at http://leeloo.webhop.net
|
|
|
|
Mar 18 2005, 10:33
Post
#19
|
|
|
WaveRepair developer Group: Developer Posts: 774 Joined: 28-July 04 Member No.: 15845 |
QUOTE (NumLOCK @ Mar 18 2005, 09:35 AM) You could always define wFormatTag=1, as if audio data were compressed, set chunkSize to 0xFFFFFFFF, and then store the actual size in the compressed file info. formatTag=1 means *un*compressed. (I take it this is a typo, and that's what you meant). It could work, because it's impossible for a chunk to have a size as large as xFFFFFFFF. QUOTE (NumLOCK @ Mar 18 2005, 09:35 AM) But then, you could not store the real size in DataChunk, because there's not enough room. Or you could use a spacial value of wFormatTag, that would trigger various changes in the format. Anyway, none of these changes would be compatible with existing apps Let me first say that I feel the WAV format shouldn't be messed around with. 4GB gives you over 6 hours of 44.1/16, which seems quite a long time. The only reason for having bigger files strikes me as being able to make very long unattended recordings. The obvious solution is for the recording program to produce multiple WAV files. However, if what people are trying to arrive at is a way to support single WAV files longer than 4GB while remaining compatible with existing programs, then the most straightforward approach seems to be: 1. Put the first 4GB of samples (minus however many bytes are required for headers) into the data chunk. 2. Put the rest into multiple proprietory chunks (let's call them "more" chunks) after the data chunk. Each chunk has a maximum length of 4GB (because its length field must be an unsigned 32 bit integer, so that these chunks can be ignored by compliant programs). 3. Include an additional proprietory chunk before the data chunk that indicates the presence (and number) of "more" chunks. Each pointer to a "more" chunk could include a file offset as large as we like (eg. using a 64 bit integer). 4. Leave the file_length field in the RIFF header set to *exclude* the "more" chunks. (It couldn't include them anyway, because the file is longer than 4GB). This means that compliant programs which don't know about "more" chunks will still work provided they ignore unknown proprietory chunks (albeit processing only the first set of samples, in the data chunk). But in summary, here is not the place to be making off-the-cuff design extensions to a mature standard which actually works suprisingly well. |
|
|
|
Mar 18 2005, 11:07
Post
#20
|
|
|
Neutrino G-RSA developer Group: Developer Posts: 852 Joined: 8-May 02 From: Geneva Member No.: 2002 |
QUOTE (cliveb @ Mar 18 2005, 10:33 AM) formatTag=1 means *un*compressed. (I take it this is a typo, and that's what you meant). Oops.. indeed -- and it proves my lack of practice with wav QUOTE (cliveb @ Mar 18 2005, 10:33 AM) 3. Include an additional proprietory chunk before the data chunk that indicates the presence (and number) of "more" chunks. Each pointer to a "more" chunk could include a file offset as large as we like (eg. using a 64 bit integer). Wouldn't this cause problems with some badly written, unmaintained programs ? I've seen some "optimized" programs which don't... umm.. parse everything QUOTE (cliveb @ Mar 18 2005, 10:33 AM) But in summary, here is not the place to be making off-the-cuff design extensions to a mature standard which actually works suprisingly well. Agreed (was trying to discourage him a bit, actually) -------------------- Try Leeloo Chat at http://leeloo.webhop.net
|
|
|
|
Mar 18 2005, 11:35
Post
#21
|
|
![]() Group: Members Posts: 16 Joined: 16-November 03 From: Syracuse, NY Member No.: 9864 |
QUOTE (Mr_Rabid_Teddybear @ Mar 17 2005, 07:56 PM) No, this is incorrect. AIFFs have a maximum size of about 2 GB, for the chunk size field in the chunk header is a 32-bit signed integer. Moreover, each AIFF can only have 1 sound data chunk. http://www.tsp.ece.mcgill.ca/MMSP/Document.../AIFF/AIFF.html -------------------- When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute--and it’s longer than any hour. That’s relativity.
-- Albert Einstein |
|
|
|
Mar 18 2005, 13:29
Post
#22
|
|
|
WaveRepair developer Group: Developer Posts: 774 Joined: 28-July 04 Member No.: 15845 |
QUOTE (NumLOCK @ Mar 18 2005, 11:07 AM) QUOTE (cliveb @ Mar 18 2005, 10:33 AM) 3. Include an additional proprietory chunk before the data chunk that indicates the presence (and number) of "more" chunks. Each pointer to a "more" chunk could include a file offset as large as we like (eg. using a 64 bit integer). Wouldn't this cause problems with some badly written, unmaintained programs ? I've seen some "optimized" programs which don't... umm.. parse everything All bets are off with regard to badly written programs. But all WAV processing programs really should at the very least ignore any chunks they don't recognise. So this extra chunk (which will contain the required 4 byte integer defining its size) should just be skipped. The very large offsets to other chunks that it contains would never be seen. Actually, come to think of it, this additional chunk before the data chunk isn't necessary: a program using the extra "more" chunks could just notice that they are present and process them. Other programs will ignore them. And even badly written programs that assume the data chunk always comes right after the fmt chunk would still work. (Question to self: why am I even thinking about this, when my opinion is that it shouldn't happen???!!) |
|
|
|
Mar 18 2005, 16:39
Post
#23
|
|
|
Neutrino G-RSA developer Group: Developer Posts: 852 Joined: 8-May 02 From: Geneva Member No.: 2002 |
Ah, ok. Good idea..
Then the first, legacy chunk could perhaps be dummy (ie: of zero length), so that legacy programs (buggy or not) will see nothing at all, unless they are upgraded ? But then, when opening one of these new wave files with an old program and saving it, all newer chunks would get destroyed This post has been edited by NumLOCK: Mar 18 2005, 16:40 -------------------- Try Leeloo Chat at http://leeloo.webhop.net
|
|
|
|
Mar 18 2005, 19:44
Post
#24
|
|
![]() Group: Members Posts: 439 Joined: 9-February 05 From: county down Member No.: 19713 |
QUOTE (cliveb @ Mar 18 2005, 09:33 AM) But in summary, here is not the place to be making off-the-cuff design extensions to a mature standard which actually works suprisingly well. well, i just find it interesting to *try* and point out possibilities, the replies help my interests. cheers This post has been edited by ChiGung: Mar 18 2005, 19:53 -------------------- no conscience > no custom
|
|
|
|
Mar 18 2005, 20:12
Post
#25
|
|
|
Group: Members Posts: 38 Joined: 8-December 04 Member No.: 18568 |
You could always use Adobe's Audition in the multitrack mode. When the temp file reaches the 4 gig limit, it creates another one. You can keep recording untill your hard drive is filled up. Saving the file will be an issue but you could always save several 4 gig chnks that make up the whole recording session or save as mp3 as someone else mentioned earlier.
|
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th June 2013 - 09:46 |