M4A (.m4a, .mp4)


    MIME types: audio/mp4M4A is a digital audio format and stands for MPEG 4 Audio.
    A perception-based lossy compression scheme commonly used for storage, transfer and playback that can also be used on the web.
    Binary file format.
    Follows the ISO/IEC 13818-7 standard.
    Supports a few sampling frequencies from 8kHz to 96kHz.
    Supports up to 48 audio channels.

Import and Export

  • Import["file.m4a"] imports an M4A file, returning an audio object.
  • Import["file.m4a",elem] imports the specified element from an M4A file.
  • The import format can be specified with Import["file","M4A"] or Import["file",{"M4A",elem,}].
  • Export["file.m4a",expr] exports an audio or sound object to an M4A file.
  • Sound objects including notes are rasterized to sampled audio.
  • See the reference pages for full general information on Import and Export.
  • ImportString and ExportString support the M4A audio format.


  • General Import elements:
  • "Elements" list of elements and options available in this file
    "Rules"full list of rules for each element and option
    "Options"list of rules for options, properties and settings
  • Data representation elements:
  • "Audio"audio signal given as an Audio object
    "Data"raw audio samples, given as a list of real numbers, with each sublist representing an individual audio channel
    "SampledSoundList"audio signal given as a SampledSoundList object
    "Sound"audio signal given as a Sound object
  • Import uses the "Audio" element by default for M4A files.
  • Advanced Import element:
  • "AudioChannels"number of audio channels
    "BitRate"number of bits per second
    "Duration"duration of the audio given in seconds
    "Length"number of samples
    "SampleRate"number of amplitude samples per second and channel
  • Metadata elements:
  • "MetaInformation"interpreted as quantities, locations, dates, numbers, etc.
    "RawMetaInformation"uninterpreted as strings and numbers
  • Multiple channels are represented as an array of audio samples.



open allclose all

Basic Examples  (2)

Import an M4A file:

Click for copyable input

Generate an audio signal and export to M4A:

Click for copyable input
Click for copyable input

Scope  (3)

Import Elements  (14)

Import Options  (5)

Export Options  (5)

See Also

"MP3"  "OggVorbis"  "AIFF"  "AU"  "FLAC"  "SND"  "WAV"  "Wave64"

Introduced in 2017
| Updated in 2018