File Stores more information than it's length

I have recorded a full day out(About ten hours) on my phone. the recording software seems to be a bit wonky, because the file came out as 3 hours long. when im using the recording app, i can go past that three hour limit, and hear the rest of the file. When i export it, it stays the same size.

What i think is up:
the file has the stored data of 10 hours, but the length in its properties is only three hours. I think maybe import raw could help, but it resulted in a ten hour long recording full of random noise. thanks in advance

If it’s not a WAV file, raw won’t work because compression is a lot like encryption (and you’ll always get junk-noise), but since you’re getting the full 10 hours, it’s probably not compressed.

If it’s a WAV file there is a 4GB limit.

That’s because of a 32-bit size field in the header. Depending on the software, that field can roll-over, reset to zero, and start counting again which tells the player software that it’s a smaller file (or that there is less audio data in the file).

If it’s a WAV you have to guess the parameters correctly.

Try a different offset. If it’s 16-bits an offset of 0 or 1 should work. If it’s 24-bits, try 0, 1,or 2. That’s not the correct offset but one of those should get the bytes re-assembled correctly.

The encoding also has to be correct as well as big or little endinness.

If the sample rate is wrong it will simply play at the wrong speed. Getting mono-stereo wrong can also get the wrong speed. But if the speed is wrong the 10-hour length will also be wrong.

its a WAV file, 11 Gigabytes.
can i still import it, even though its larger than the size limit?
It does seem like an integer limit error, because in the recorder app, it says the recording is 3 hours, 4 minutes, and 44 seconds long, and if i skip to the end, it rolls into negative seconds

it has 24 bit PCM(although the app has “float” next to it?), stereo, 41.1 kHz
i dont know the endiness, but i am experimenting

Oh and the imported attempts are more like 13 hours which is strange
im almost sure my file is supposed to be about 9:50

Really, WAV has a size limitation? Don’t you confuse this with the limitation of the FAT32 file system?

Next time, don’t use WAV. :stuck_out_tongue: As far as I know it’s the only format with an artificial limit.

The offset for a normal WAV should be 44 bytes. That’s where the header ends and the audio begins. There are 8-bits in a byte so 3-bytes in a 24-bit sample. If you start in the wrong place (or if the byte order/endianness is wrong) the bytes won’t be re-assembled correctly and you’ll get noise. But you should only have to check 3 offsets in a row, (0, 1, 2 or 44, 45, 46, etc.). If you start at (or near) zero the header will be treated as sound and you’ll get a little click or glitch in the beginning, which you can edit-out.

And one minor thing… The left & right channels alternate so the wrong offset can also switch the left & right channels.

Hopefully that’s wrong because 24-bit float is non-standard.

Oops! I missed that! It might be 32-bit float.

Some quick spreadsheet work:

24-bits is 3 bytes per sample x 2 for stereo x 44.1K samples per second = 265kB per second.

10 hours is 36,000 seconds so that works out to 9.5GB (at 24-bits)

32-bits would be 12.7GB (9.8 hours should be 12.4GB).

I don’t know what to make of that…

In that case it can be re-recorded… Of course it will take 10-hours!

If your phone has an analog headphone-out you can plug-into line-in (blue) on regular soundcard, or assuming you have a laptop with no line-in you can get a USB audio interface with line-inputs. (The Behringer UCA202 is popular and relatively inexpensive.)

If your phone only has USB, you’d need a headphone adapter.

Yes, really! (WAV header) The “file size” field is 32-bits (bytes 41-44 at the end of the header). Technically, it’s the size of the audio data “chunk”, not the whole file.

It seems that trying a bunch of different options has taken a lot of memory

i have somehow filled up 400 gigabytes and filled the entire C drive?

Ill clear things up and try to record again. how to i prevent the files from doing the same thing next time? should i use mp3 instead?

Thank you so much for all the help <3

It depends. First, does your recording application support MP3? How about FLAC?

As you may know, MP3 is lossy compression. Data is thrown-away to make a smaller file. It’s not necessarily terrible and a high-bitrate MP3 can often sound identical to the uncompressed original, but it’s “imperfect”.

When you open an MP3 in Audacity (or any normal audio editor) it gets decompressed. If you re-export as MP3 you are going through another generation of lossy compression and some “damage” accumulates. Again, it’s not necessarily something you’ll notice, but ideally, if you want MP3 you should compress ONCE as the last step.

For voice, or if the sound quality isn’t super-important, or if you are recording in a noisy environment where you can’t get good quality anyway, MP3 should be OK. I’d guess you aren’t recording 10 hours of high quality music! :wink:

FLAC is lossless compression and you get a file about half the size of a WAV.

AAC (M4A / MP4) is lossy but it’s immune to accumulated damage with multiple generations of re-compression.

An operating system (whether it is a phone or a desktop), does not like to scan all the way from the beginning of the file to the end to see how long it is every time you look at the directory. So sound files have a place where that length is stored, and the operating system uses that without actually checking. If the length was generated wrong, saved wrong, or got corrupted, the operating system won’t know this.

Thats what i thought had happened. my question was how to change this, because i couldnt figure it out

ogg was the default, i changed it along with the sample rate and a few other things because the audio quality was terrible

i think ill use .flac, if that means the issue probably wont happen again, cause quality is important to me

I really appreciate all the time you have dedicated to my question :slight_smile:

Try opening the file in OCENaudio (free). It’s usually much quicker and uses much less memory than Audacity.

This topic was automatically closed after 30 days. New replies are no longer allowed.