10

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 ؟؟

Osama Al-far
  • 259
  • 3
  • 6
  • 17
  • 1
    What kind of calculation have you tried? – hyde Nov 25 '12 at 22:35
  • kHz = "1000 per second", bitrate = "bits per second" - the math is rather obvious. – peterph Nov 25 '12 at 22:39
  • 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 ??? – Osama Al-far Nov 25 '12 at 22:43
  • @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? – Brad Nov 25 '12 at 22:43
  • @Brad BUT AT THE QUESTION IT ASK TO CALCULATE THE BIT RATE , IS IT EQUAL TO 8 ?? – Osama Al-far Nov 25 '12 at 22:50
  • @OsamaAl-far, Your bit rate is the number of bits per second. Read my answer. – Brad Nov 25 '12 at 23:32

3 Answers3

29

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

Wai Ha Lee
  • 7,664
  • 52
  • 54
  • 80
Mark Heath
  • 45,254
  • 26
  • 128
  • 188
7

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.

Brad
  • 146,404
  • 44
  • 300
  • 476
3

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 
Community
  • 1
  • 1
vZurai
  • 31
  • 1
  • 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. – Gabriel Morin Sep 23 '16 at 07:20