From .WEBM, .OGG, .MP3, .MP4 and more, there are many audio and video formats you can expect to come across as a developer handing audio / video content in your application. Like our last article on The Complete Image File Extension List for Developers, in this article, we delve into the different types of audio / video file types, and when to use which audio or video format for your application.
Video File Formats
Like the .WEBP image file, .WEBM was created by Google as an efficient means of disseminating media to a large audience. WEBM video files are relatively small in size, and as such are not as high in terms of quality as some of the other file types on this list. The WEBM video file format is used for HTML5 video streaming sites, such as YouTube.
.MPG, .MP2, .MPEG, .MPE, .MPV
.MPG, .MP2, .MPEG, .MPE, .MPV files can play audio/video media, or simply audio. They are low in file size but also relatively low in quality. They also have lossy compression, meaning their quality will degrade after being edited numerous times. .MPG, .MP2, .MPEG, .MPE, .MPV files are best used when video will be recorded once and never edited.
.OGG files are an open-source alternative to MPG files, and are used for high-quality videos to be streamed via the internet. Though OGG files are used for streaming, they are higher in quality than WEBM files – meaning they will take longer to be delivered to the end-user. Due to .OGG files being open sourced, they can be used in a variety of applications, including GPS receivers and media players (both desktop and portable).
.MP4, .M4P, .M4V
.MP4, .M4P, .M4V are similar to MPG files in that they can contain audio and video, or can simply be audio files. Their file formats are lossless, which makes them ideal for editing as they won’t lose quality through subsequent edits and file saves. .MP4, .M4P, .M4V are used for streaming video via the internet. They are generally higher in quality than WEBM files, but tend to be larger in file size. M4V files are proprietary iTunes files that share the same qualities of MP4 and M4P files. M4V files are DRM copy-protected.
Audio File Formats
.MP3 files are the most common audio file around. MP3s feature lossy compression, which means their quality will degrade over subsequent edits. MP3s are still relatively large in size when compared to other audio file formats on this list.
MP3 files can be encoded at a constant bit rate or variable bit rate. A constant bit rate ensures the same quality throughout the audio file, but results in a higher file size. Variable bit rate detracts from quality during silent or near-silent moments of a file, resulting in a smaller overall file size. Most smart phones and music players use the MP3 format.
.M4A is an Apple-based format that correspond to MPEG-4 video files. .M4A files feature lossless compression, allowing for multiple edits without a loss of quality. Compared to the other audio file formats on this list, M4A files have a similar quality, but are lower in file size. You will see .M4A files play audio on Apple products such as iPhones and iPods.
Like MP3s, Advanced Audio Coding (AAC) files are also lossy audio files. However, AAC files, in their original state, are much higher in quality than any of the other audio file formats on the list. AAC files are generally similar in size to MP3s, despite being a tad higher in quality.
They can also be created with a variable bit rate or constant bit rate. AAC files are also open-source, which means you don’t need to pay royalties to create and distribute them (unlike MP3 files).
.AAC files are most commonly associated with iTunes, though they can be used on other player devices and gaming consoles.
Similar to AAC files, .OGA files are open-source and utilize lossy compression. They use variable bit rate to cut down on file size. However, this doesn’t detract from overall sound quality. In fact, OGA files tend to be higher in quality than MP3s. OGA files aren’t supported by many programs – especially compared to the rather ubiquitous MP3.
In summary, the most common video file types are:
- .MPG, .MP2, .MPEG, .MPE, .MPV
- .MP4, .M4P, .M4V
And the most popular audio file types are:
There are certain times when it is best to use one file format over another, and often, you have to convert between file formats. To programmatically convert between audio or video file types, you can use Filestack’s audio transcoding API or video transcoding API. Filestack’s API also supports extracting audio files from video files, cropping or resizing video files, extracting thumbnails from videos, and more. Get started for free with Filestack today.
Read More →