When it comes to digital audio, bitrate and sample rate are two of the most important factors that determine both the quality and size of an audio file. Whether you’re streaming music, editing sound, or producing audio content, understanding these concepts will help you make informed decisions about the trade-offs between sound fidelity and file size.
In this article, we’ll explain what audio bitrate and sample rate are, how they impact audio quality and file size, and how to extract these details from an audio file. We’ll also dive into the mathematical meaning of these terms to give you a more technical understanding.
Before we dive in, checkout XConvert’s Audio compressor tool that allows you to change sample rate and bitrate of audio files such as .mp4 and .aac
What is Audio Bitrate?
Bitrate refers to the amount of data processed per second in an audio file and is usually measured in kilobits per second (kbps). In simple terms, it indicates how much information is stored or transmitted to represent audio. Higher bitrates typically mean better sound quality, but they also result in larger file sizes.
Types of Bitrates:
- Constant Bitrate (CBR): The bitrate stays the same throughout the entire audio file. While this ensures predictable file sizes, it doesn’t optimize for sections of silence or simple audio.
- Variable Bitrate (VBR): The bitrate adjusts dynamically depending on the complexity of the audio. It results in better compression efficiency, balancing quality and file size.
Impact on Audio Quality:
- Higher Bitrate (e.g., 320 kbps): More data per second, meaning the sound quality will be better because it retains more audio details. This is common in high-quality MP3s and WAV files.
- Lower Bitrate (e.g., 128 kbps): Less data is used, which can lead to a loss of audio detail. This is common in low-quality MP3s, where compression sacrifices quality for smaller file sizes.
Impact on File Size:
- Higher Bitrate results in a larger file size because more data is being stored every second.
- Lower Bitrate results in a smaller file size, but at the cost of reduced quality.
Mathematical Meaning of Bitrate:
Mathematically, bitrate is calculated as:
Bitrate = Sample Rate × Bit Depth × Number of Channels
- Sample Rate: Number of samples per second.
- Bit Depth: Number of bits used to represent each sample.
- Channels: Number of audio channels (e.g., 2 for stereo).
For example, an audio file with a sample rate of 44.1 kHz, 16-bit depth, and 2 channels (stereo) has a bitrate of:
44,100 samples/sec × 16 bits/sample × 2 channels = 1,411,200 bits/sec
This gives us a bitrate of 1,411 kbps, which is typical for uncompressed CD-quality audio.
What is Sample Rate?
Sample rate refers to the number of samples of audio captured per second, measured in Hertz (Hz) or kHz (kilohertz). It determines how frequently the audio signal is sampled, and higher sample rates result in a more accurate representation of the sound.
Common Sample Rates:
- 44.1 kHz (CD Quality): This is the standard sample rate for audio CDs and most digital music formats.
- 48 kHz (Studio Quality): This is common in video production and professional audio.
- 96 kHz and 192 kHz (High-Resolution Audio): These are often used in high-end audio recording and production, but their benefits are debatable for the average listener.
Impact on Audio Quality:
- Higher Sample Rate (e.g., 96 kHz): Theoretically, this results in better sound quality because more data points are captured, providing more accurate sound reproduction. However, most human ears can’t detect the difference above 44.1 kHz.
- Lower Sample Rate (e.g., 22 kHz): This reduces the audio fidelity because fewer samples are taken per second, which may result in a more distorted or “muddy” sound.
Impact on File Size:
- Higher Sample Rate increases the file size because more samples are stored per second.
- Lower Sample Rate decreases the file size, but the sound quality suffers.
Mathematical Meaning of Sample Rate:
The sample rate defines how many times per second the audio is sampled. For instance, a 44.1 kHz sample rate means that the audio is sampled 44,100 times per second.
According to Nyquist’s Theorem, to accurately capture a sound, the sample rate must be at least twice the frequency of the highest pitch we want to capture. Since the upper limit of human hearing is around 20 kHz, a 44.1 kHz sample rate ensures that all audible frequencies are captured.
How to Extract Bitrate and Sample Rate from an Audio File
Method 1: Using macOS Finder or Windows File Explorer
On both macOS and Windows, you can check the properties of an audio file to extract its bitrate and sample rate.
- On macOS:
- Right-click the audio file and select Get Info.
- You’ll see details like bitrate, sample rate, and audio format in the Info window.
- On Windows:
- Right-click the audio file and select Properties.
- Go to the Details tab, where you can see the bitrate, sample rate, and other audio properties.
Method 2: Using VLC Media Player
VLC is a free, cross-platform media player that can show detailed audio information.
- Open the audio file in VLC.
- Go to Tools > Media Information (or press
Command + I
on macOS,Ctrl + I
on Windows). - Under the Codec tab, you can see the bitrate, sample rate, and number of channels for the audio file.
Method 3: Using FFmpeg (Command-Line)
For more technical users, FFmpeg is a powerful tool to extract audio metadata.
- Install FFmpeg (available for macOS, Windows, and Linux).
- Use the following command to get audio details:
ffmpeg -i your-audio-file.mp3
This will display detailed information, including bitrate, sample rate, and the format of the audio file.
Bitrate and Sample Rate in Terms of Audio Quality and File Size
Audio Quality:
- Bitrate has a more direct effect on perceived audio quality than sample rate. A higher bitrate captures more data per second, which preserves more of the audio details, especially in complex passages of music or sound.
- Example: An audio file at 320 kbps (higher bitrate) will sound clearer and richer than one at 128 kbps.
- Sample Rate influences the frequency range captured by the audio. However, for most purposes, a sample rate of 44.1 kHz is sufficient, as the human ear can’t detect frequencies beyond 20 kHz. Higher sample rates like 96 kHz or 192 kHz are primarily useful in professional environments.
File Size:
- Bitrate has a significant impact on file size. A file with a bitrate of 128 kbps will be approximately half the size of a file with a bitrate of 256 kbps, assuming the same length of audio.
- Example: A 3-minute audio file at 128 kbps will be around 2.8 MB, while the same file at 320 kbps will be around 7 MB.
- Sample Rate also affects file size, but to a lesser extent compared to bitrate. Increasing the sample rate captures more samples per second, which slightly increases the file size. For example, a file recorded at 96 kHz will be larger than the same file recorded at 44.1 kHz, even if the bitrate remains the same.
Conclusion
Bitrate and sample rate are crucial factors that influence both the audio quality and file size of digital audio files. Bitrate determines how much data is used to represent the audio, directly affecting the file’s size and quality, while sample rate affects how accurately the audio is sampled. For most listeners, a bitrate of 256 kbps to 320 kbps and a sample rate of 44.1 kHz will provide excellent audio quality without unnecessary bloat in file size. However, higher bitrates and sample rates are important for professionals who need precise sound reproduction.
By understanding these concepts, you can make informed decisions when working with audio files, whether you’re compressing music, editing podcasts, or analyzing sound.
Featured photo by Kelly Sikkema on Unsplash