I'm trying to make an audio upload to S3 and I'm a little confused what I should declare my mime type as. My audio file is an m4a recorded on an iphone as kAudioFormatMPEG4AAC
. Would this be considered audio/m4a
or audio/mp4
? I'm seeing conflicting answers online.
The m4
in m4a
is short-hand for MPEG-4
, just like mp4
is short-hand for MPEG-4
.
In fact, m4a
, m4v
and mp4
files all have the same internal MPEG-4
atom structure. The difference between the files is their content (video files have video atoms as well as audio atoms.)
The codec of the audio can also be different despite using the same file extension, for example both alac
and AAC
formats use the MPEG-4
container format with the m4a
file extension.
So to answer your question, it really doesn't make much difference. My personal preference would be audio/mp4
since that is effectively saying
Audio data in MPEG-4 container
Whereas, audio/m4a
is like saying
Audio data in MPEG-4 container containing audio