Our most highly-read blog post in years was Video Formats Uncovered which explained the ins and outs of video files and the details behind them.
With the successful launch of Music Converter and Music Converter Pro behind us, we thought it was time to give music files the same treatment.
Let's begin by looking at the creation of digital audio, because this will help us to understand the terms that we so often encounter, both on the web, and in software like iTunes and our own Music Converters.
When you create a digital audio file from a 'real-world' piece of music or sound you have to decide on a couple of things:
- how often to take a sample of the sound wave to create the digital file. This is referred to as the Sample Rate; and
- how precisely you represent each of those samples. This is referred to as the Sample Size.
These two factors combined go a long way to determining the quality of the resulting digital sound file, and also its file size.
So the sample rate is how frequently a sample is taken of the sound wave to create the digital file.
You can think of sample rate as being similar to the frame rate on a movie. Low frame rates result in 'jumpy' videos. High frame rates give you a smooth playing video.
Sample rates are usually stated in kilohertz (kHz), which means one thousand samples per second of audio. A typical sample rate (for CD quality music) is 44.1 kHz, which means that every second of audio is sampled 44,100 times when creating the digital file for the CD.
Another common sample rate is 48 kHz, which is often used for movie soundtracks. Higher sample rates, such as 96 kHz and even 192 kHz are sometimes used to satisfy very high quality audio requirements.
When the audio file is sampled, all of the 'samples' are stored within the digital file, and the size of the data (in bits) used to store each sample is the Sample Size. If you like, this is the preciseness or granularity of each stored sample.
You can think of the sample size as being akin to the number of megapixels used to store a digital image - the more there are, the better the quality.
Commonly used sample sizes are 16 and 24 bit. A digital file with a 16 bit sample size means that each sample (yes, each of the 44,100 samples per second of audio) is represented using 16 bits of data.
Image here showing comparison.
So the higher the sample size, the higher the quality of each stored sample - more bits means higher quality.
The word codec is shorthand for the term coder/decoder.
A codec is the file format and compression technique used to turn a real-world audio signal into a digital file or stream of data.
A codec relates only to the actual audio streams within an audio file, not the file format itself.
What About Bit Rate?
In audio files, the bit rate is a derived value. Files aren't recorded at a bit rate. Files end up with a bit rate, based on the sampling frequency and the sample size used.
Let's look at a common audio recording. Let's say the audio was recorded at 44.1 kHz with a 24 bit sample size. This would give us 44,100 x 24 bits per second, which is 1,058,400 bits per second or about 1,000 kilobits per second (that's 1,000k). This is only one channel, so to get a stereo recording we need two channels. That gives us a total bit rate of about 2,000k.
Your iPod or iPhone can handle up to 320k only, so how does this work? The answer is compression! MP3 and AAC are compressed formats which reduce the size considerably. That brings us to encoding types.
The first type of encoding that we will look at is No Compression. This means that no mathematical compression algorithm is applied to the digitally encoded audio stream.
Uncompressed audio is recorded using a technique call PCM (Pulse Code Modulation) and stored in file types such as WAV and AIFF. More on these later, but for now just be aware audio files don't necessarily get compressed at all in some cases.
When audio data is compressed, there are two types of compression - lossless and lossy.
Lossless compression is a compression type where the original data can be completely recovered from the compressed data. Data compression is a complex topic of its own, but here's an idea of what goes on.
Let's say we have an original piece of data that contains 100 bits in a row, all set to "1". The raw form of this data would take up 100 bits of space. This data could be compressed into far fewer bits using a compression technique. The technique could involve recording the number 100 and the bit "1". The number 100 can be recorded using 7 bits of space. Hey presto, you've compressed 100 bits into 8!
This is a lossless compression technique because we can take our 8 bits of data and, knowing the compression algorithm used, can re-construct the original data.
Examples of lossless audio compression codecs include FLAC and Apple Lossless (ALAC).
Lossy compression techniques take the compression even further to the point that the original data cannot be fully recovered. While you would never use a lossy compression technique for data files, it can be applied to audio since many devices (and humans!) can't tell the difference when the audio is downgraded slightly.
Examples of lossy audio compression codecs include MP3 and AAC.
Why would you use a lossy compression technique? Lossy compression codecs create smaller files.
Audio files include a file container, metadata and data streams.
Unlike video files, audio files usually have a one-to-one alignment between codecs and file formats. For example, the MP3 audio codec also has a corresponding MP3 file format.
Common file formats include:
- MP3 - Moving Picture Expert Group Layer 3. The most popular codec and file format in use today.
- M4A - Apple's file format for audio. This is really a Quicktime container containing audio only. This can contain AAC or ALAC audio./
- FLAC - Free Lossless Audio Codec. A popular open source codec and file format for lossless audio. Often used for high quality recordings.
- AIFF - Audio Interchange File Format. Apple's implementation of uncompressed audio. Audio data is uncompressed PCM in this case.
An audio file container is usually aligned to the codec it contains. The MP3 file format contains MP3 audio (two channels maximum) and some metadata.
Apple's M4A file container is a Quicktime container that can contain almost any media stream. The file container is the same as is used for Quicktime movies (MOV file extensions).
Apart from the Apple M4A file format, audio file formats generally match the codec which they contain.
Metadata is an important part of any digital media file. Audio files include a chunk of metadata which tells you things like the artist, album, track name and so on.
MP3 files often include metadata in an ID3 metadata block. ID3 is a defacto-standard for the storage of metadata in a audio file.
Apple's M4A format holds metadata in tags called 'atoms'. Again, this is the same technique used in Quicktime movie files.
FLAC uses the Vorbis comment metadata approach. This is a series of name/value pairs about the file, e.g. Artist=Green Day, Album=American Idiot, etc.
An audio file will include a number of streams encoded using the required codec. Different file formats and codecs support different numbers of audio channels.
MP3 support only two channels of audio, which means that MP3 is good for stereo, but won't do surround sound which needs at least 6 channels.
FLAC, ALAC, AAC and most other popular codecs support multi-channel audio streams.
Bringing it all together
Now you know all about sample rates, sample sizes, codecs, bit rates compression and what's inside an audio file.
We hope this will help you understand more about audio files how to best look after your music library.
Cosmos version 2.3.0 is out now on the Mac App Store and Shedworx.com.
We've been working hard on the iOS and Mac versions of Cosmos over the past couple of months and this update is a big step towards the final product.
We have one more update to both Cosmos for Mac and Cosmos for iOS on the way. These two final updates (for now) will complete the transformation of Cosmos into a fully fledged photo sharing service for you and your friends!
This upgrade focuses on adding full CloudSync support to Cosmos for Mac. We've also re-worked the entire CloudSync function in Cosmos making it more reliable and easier to use.
Cosmos for Mac 2.3.0 includes the following changes:
- Major upgrade to the Cosmos CloudSync engine.
- Ability to connect to an existing Cosmos CloudSync account.
- Ability to create a CloudSync account directly from Cosmos for Mac.
- Multiple minor bug fixes.
If you've been using Cosmos on your iPhone or iPad, this update is for you! You can now fully manage all the photos you take on your iPhone using Cosmos, back on your Mac.
Music Converter and Music Converter Pro version 1.3 are now out on the Mac App Store and Shedworx.com.
This is a bug fix update mainly focused on preserving track numbers when converting from MP3 and FLAC to AAC. This will help everyone using Music Converter to import libraries of music into iTunes.
The other new feature that we've added to Music Converter Pro is support for converting to the True Audio codec. True Audio is an open source lossless audio codec which supports the encoding of raw audio into a lossless but highly compressed format.
This release is for the audiophiles, and anyone who wants the best quality music out of their iPod and iPhone!
Music Converter and Music Converter Pro now support conversions to AAC and MP3 up to 320k bit rate.
This means that Music Converter and Music Converter Pro now support audio conversions up to the maximum quality playable by Apple devices.
We hope you like it!
The Full Story
We received a LOT of feedback about the quality settings that we had chosen for our audio conversions.
We initially designed Music Converter and Music Converter Pro to convert for iTunes (and MP3) at the relatively low bit rate of 192k. This was also the maximum that we allowed for custom conversions in Music Converter Pro.
Whats the bit rate? This is simply the quality of the audio file.
192k is what iTunes used to use for music that you purchased. They have since bumped up to 256k.
iPods, iPhones and iPads can play music at up to 320k.
It turns out that there are a lot of you out there who have high quality original music files that you want to convert onto your iPods and iPhones. The default conversion of Music Converter at 192k just didn't cut it.
You spoke, we listened.
Based on your feedback, we decided to completely redevelop the conversion process for AAC audio in order to support 320k bit rate output. This will result in better music quality all round.
We've also increased the output bit rate for MP3, now going up to 320k also.
Finally, we also fixed a few minor bugs, including preservation of metadata for FLAC files.
As always, Music Converter and Music Converter Pro share the same conversion engine. The basic iTunes, AAC and MP3 conversions in Music Converter are full quality.
After much arguing about colours, user interface design and the size of the Shedworx speakers, Music Converter is now live on the Mac App Store.
And it's FREE.
Music Converter gives you all this for FREE:
- Simple to use - drag, drop and click convert - Music Converter Pro looks after the rest.
- Supports 100's of media formats and converts for all your favourite devices and file types.
- Convert from - MP3, FLAC, WAV, WMA, M4A, AIFF, FLV and many more.
- Convert to - MP3, AAC, M4A (Apple Lossless), M4R (iPhone Ringtone), FLAC, WAV and more.
- Video Support - convert your video soundtracks.
- Ringtones - create iPhone ringtones from your favourite music.
- Track Information Editing - edit album, artist and track information.
- iTunes Savvy - auto imports your converted music to iTunes.
Music Converter is following in the footsteps of the super-successful Smart Converter, giving people a top quality free converter with the ability to upgrade to the Pro version for extra features.
Music Converter has already broken into the Top Ten list for free Music apps all over the world, so we're off to a good start.
So do yourself a favour and install Music Converter now!
iCloud Questions and Answers
As far as buzz words go, they don't come much more fashionable then the "Cloud", then along came Apple and upped the anti by throwing their customary little i prefix and voila we have a new winner. iCloud is coming, and Apple have started spruiking it already. So here at Shedworx, we thought we'd ask some of the basic questions and see what answers we could come up with.