Dramatically reducing file size of a WAV for an online game

Effects, Recipes, Interfacing with other software, etc.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
BillyBiggtime
Posts: 26
Joined: Wed Oct 02, 2013 11:07 am
Operating System: Please select

Re: Dramatically reducing file size of a WAV for an online g

Post by BillyBiggtime » Thu Oct 03, 2013 4:19 pm

steve wrote:The music is very repetitive, so perhaps they are sequencing a series of short audio clips., one for the bass, one for the bell, a couple for the vocal, etc. As a normal 16 bit 44.1 kHz mono WAV file the track would be about 22.7 MB (it's total duration before repeating is 4:17.385).

Perhaps they don't want to replace their music. :?
What I've been told so far is that they 'bought' a piece of library music for it, which they are very happy to have replaced. I assumed it was shorted than 4 mins, but didn't listen carefully to find out. I don't think it's playing as short repeated clips of different parts from what I've been told. But I have no idea how that can be a 400Kb file either...

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

Re: Dramatically reducing file size of a WAV for an online g

Post by steve » Thu Oct 03, 2013 6:04 pm

For uncompressed audio formats, the file size is easy to calculate:

(bits per sample) x (samples per second) x (channels) x (length in seconds) = number of bits.
number of bits / 8 = number of bytes.

Apart from RAW there is also a little to add on for the "header" and any included metadata.

For example, 4 minutes at 16 bit 44100 samples per second mono:
16 x 44100 x 1 (4 x 60) = 169344000 bits
169344000 / 8 = 21168000 bytes
21168000 bytes is about 20 MB.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

BillyBiggtime
Posts: 26
Joined: Wed Oct 02, 2013 11:07 am
Operating System: Please select

Re: Dramatically reducing file size of a WAV for an online g

Post by BillyBiggtime » Fri Oct 04, 2013 10:56 am

Still no further details on the file used, but my contact is adamant that they are using a WAV file that is only 400KB for their game, and that the whole game compiles to 4MB in total. I'm genuinely at a bit of a loss as to how this can be achieved, especially now that someone on here has timed the existing music and reckons it to be close to 4mins in length. That means they've managed to produce good quality sound at 100KB per minute, and allegedly still in WAV format. I don't think even the best compression formats could equal that, let alone whilst still in WAV. I'm genuinely mystified!

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

Re: Dramatically reducing file size of a WAV for an online g

Post by steve » Fri Oct 04, 2013 11:44 am

BillyBiggtime wrote: my contact is adamant that they are using a WAV file that is only 400KB for their game
I don't suppose there is any chance that we could see that file?
Analyzing the file with MediaInfo should be able to shed some light on the question.

During my student days I wrote a 4 hour composition that fitted onto a 1.44 MB floppy disk. It was written as a "Tracker" file, and included a "mod player" so that it could be played on any Windows computer with no additional software requirements.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

BillyBiggtime
Posts: 26
Joined: Wed Oct 02, 2013 11:07 am
Operating System: Please select

Re: Dramatically reducing file size of a WAV for an online g

Post by BillyBiggtime » Fri Oct 04, 2013 1:34 pm

If I can get hold of it Steve, I'll definitely share! I've heard about trackers but never tried that approach myself. I'm not sure their piece of music sounds like it was put together that way - they're saying they got it from a stock library, I think.

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

Re: Dramatically reducing file size of a WAV for an online g

Post by kozikowski » Fri Oct 04, 2013 5:27 pm

I'm genuinely mystified!
I'm not. I've had people give me an "MP3 Wave file."

People get this stuff turned around all the time, and while it is remotely possible that someone in the gaming community has developed an earth-shaking new technology, those don't come around very often, and when they do, they remain unsupported niche players for a long time.

MP3 is part of the MPEG1 video standard made available to the public... in 1992. Development started in 1988.

We'll see.

Koz

Robert J. H.
Posts: 3633
Joined: Thu May 31, 2012 8:33 am
Operating System: Windows 10

Re: Dramatically reducing file size of a WAV for an online g

Post by Robert J. H. » Fri Oct 04, 2013 8:07 pm

In comparison, AIFF and RIFF support instruments, markers and loop points in there headers, so no problem to encode sample based sequences. I don't know what's all possible with *.wav however.
Audacity seems to make usage of repeating patterns (blocks) too.
However, 400 kB is really too short a file for a whole song.
Has anyone recorded the song and looked on which sample rate the audio is based?

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

Re: Dramatically reducing file size of a WAV for an online g

Post by kozikowski » Fri Oct 04, 2013 11:29 pm

We are waiting for the Poster and the Client to provide a sample file.
I will put many free cups of coffee that either it's not a WAV, or there's something else very, very different about it. On the face of it, this job is impossible.

Koz

BillyBiggtime
Posts: 26
Joined: Wed Oct 02, 2013 11:07 am
Operating System: Please select

Re: Dramatically reducing file size of a WAV for an online g

Post by BillyBiggtime » Tue Oct 15, 2013 8:52 am

Thanks Koz. I'm with you on that. I'm still waiting to hear more - at the moment no details, just adamant assertions that the file is 400KB and total game size is 800KB. I agree that it may well be an MP3 in disguise. Even then, I'd struggle to get a good quality MP3 of 2-3 minutes of music (someone on here has suggested the current game music file is about 4mins) down to 400KB.

BillyBiggtime
Posts: 26
Joined: Wed Oct 02, 2013 11:07 am
Operating System: Please select

Re: Dramatically reducing file size of a WAV for an online g

Post by BillyBiggtime » Sun Oct 20, 2013 5:59 pm

Finally, here we go guys, here's the link to the piece they've used: http://www.premiumbeat.com/royalty_free ... itual-walk
What do we think? Have they maybe used the 'loops set' version to make it work somehow, programmed to play in repeated sequences to create a longer track from smaller files, resulting in a much smaller overall file size than if it were one continuous loop?

Post Reply