• Status: Solved
• Priority: Medium
• Security: Public
• Views: 194

resulting SIZE of audio file based on encoding followed by compression

I wish to know if I have a correct understanding of how the way in which audio is encoded and then compressed determines the size of the resulting compressed file.  Here is an example of what I think occurs.

Suppose a 240 second song is encoded digitally with a sampling rate of 44.1kHz.  Then suppose that 16 bits are used to encode each "frame".  This would result in 44,100 x 16 x 240 / 8 = 21,168,000 bytes of data.  Thus this example song would require 21.168 mb uncompressed when stored on an audio CD.

Next compress the roughly 21 mb file using a bitrate (assumed constant) of 128 kbits per second.  This will be a function of the 240 seconds and the bitrate only, ignoring the size of the uncompressed file.  I.e, I assume the 16 bits used for each "frame" during the encoding as well as the sampling rate are transparent to the compression process.  So, the compressed file's size will be 240 x 128,000 bits / 8 = 3,840,000 bytes.  Then this 3.84 mb is a typical file size for, say, an mp3 file holding a 4 minute song.

If I am correct with this example, great.  If not, I would appreciate finding where I misunderstand this.

thanks,
whr

0
richarwi
• 2
1 Solution

Commented:
The operative word here is "audio CD". They don't use wave files, they use PCM. And you can't mess with the compression or the bitrate in any way on the Red Book audio standard for CDs. The standard is 44.1K 16bit 2 channel PCM.
0

Author Commented:
Sorry,

I am a "beginner".  I don't understand the response.

Perhaps I should point out that I wasn't suggesting that my encoding scenario was correct in the sense that this is the way it is actually done in a studio.  I just want to know if this would be a correct determination of the final file size for a hypothetical song after encoding and then compressing using these hypothetical parameters.

thanks,
whr
0

Commented:
Probably best to wade through the Wikipedia for a technical analysis of the terms:
Bitrate
Sampling Rate
Red Book Audio
Compression Ratio
etc...

0

Featured Post

• 2
Tackle projects and never again get stuck behind a technical roadblock.