M4A (.m4a, .mp4)

Background

    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.

Elements

  • 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
    "Duration"duration of the audio given in seconds
    "Length"number of samples
    "SampleRate"number of amplitude samples per second and channel
  • Multiple channels are represented as an array of audio samples.

Options

  • Import and Export option:
  • SampleRateAutomaticnumber of samples per second for each channel
  • Export options:
  • "AudioChannels"Automaticnumber of audio channels
    "BitRate"Automaticnumber of bits per second
  • Supported sample rates in Hz are 44100 and 48000.
  • Supported bit rates are 96000, 128000, 160000, 192000 bits per second.

Examples

open allclose all

Basic Examples  (2)

Import an M4A file:

In[1]:=
Click for copyable input
Out[1]=

Generate an audio signal and export to M4A:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Scope  (3)

Import Elements  (10)

Import Options  (1)

Export Options  (2)

See Also

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

Introduced in 2017
(11.1)