You have 30 seconds audio file sampled at a rate of 44.1 KHz and quantized using 8 bits ; calculate the bit rate and the size of mono and stereo versions of this file ؟؟
How to calculate audio file size?
Asked Answered
What kind of calculation have you tried? –
Decemvir
kHz = "1000 per second", bitrate = "bits per second" - the math is rather obvious. –
Valida
file size mono 30 * 44.1 = 1323 K stereo 30 * 44.1 * 2 =2646k --------------------------------------- bit rate = filesize / seconds ------------------------------ but my problem with this line "and quantized using 8 bits " how it will affect the math ??? –
Embowed
@OsamaAl-far "quantized using 8 bits" is fairly meaningless. Can you better describe what you are trying to do? Surely you mean that the audio is sampled at 8 bits per sample? –
Kaleena
@Kaleena BUT AT THE QUESTION IT ASK TO CALCULATE THE BIT RATE , IS IT EQUAL TO 8 ?? –
Embowed
@OsamaAl-far, Your bit rate is the number of bits per second. Read my answer. –
Kaleena
The bitrate is the number of bits per second.
bitrate = bitsPerSample * samplesPerSecond * channels
So in this case for stereo the bitrate is 8 * 44100 * 2 = 705,600kbps
To get the file size, multiply the bitrate by the duration (in seconds), and divide by 8 (to get from bits to bytes):
fileSize = (bitsPerSample * samplesPerSecond * channels * duration) / 8;
So in this case 30 seconds of stereo will take up (8 * 44100 * 2 * 30) / 8 = 2,646,000 bytes
You saved my exam! –
Incautious
I'm pretty sure the units is wrong here for the bit rate calculation? Are you sure you don't mean 705,600 bits per second not 705,600 kilo bits per second...? –
Dumas
Assuming uncompressed PCM audio...
time * sampleRate * bitsPerSample * channelCount
For 30 seconds mono audio at 44.1kHz, 8bps, that's 1,323,000 bytes. For stereo, that's two channels, so double it.
30 * 44.1 * 8 = 10584 . HOW DID YOU CALCULATE 1,323,000 bytes. ? –
Embowed
44.1k = 44100, not 44.1, so 30*44100*8. –
Karilynn
@OsamaAl-far to get from bits to bytes you must divide by 8 –
Fervid
Formula = Sample rate x sample bit x # of channels x time in seconds / 8x1024
CD Quality (Sample Rate) = 44.1Khz
Size of mono = (44 100 x 8 x 1 x 30) / 8 x 1024
= 1291.99KB
= 1.26 MB
Size of Stereo = (44 100 x 8 x 2 x 30) / 8 x 1024
= 2583.98 KB
= 2.52 MB
≈ 2.5 MB
Don't forget that CD quality is indeed 44.1khz, but 16bits, not 8. Even if the question is asking for 8 bits, this might be a bit confusing to read. –
Cupidity
© 2022 - 2024 — McMap. All rights reserved.