Running id3v2 -l file.m4a didn't find any tags, but displaying it in rhythmbox did. Is there another command-line program for working with tags that works on .m4a files?

I'm running precise 12.04.

Note: See Wikipedia's page for .m4a, .mp4, MPEG-4 Part 14 file format background, and note that as discussed at Spec for MP4 and M4A tags - Hydrogenaudio Forums, Apple considers the tags used by iTunes to be proprietary; hence there is no official spec for them available.

This, like other Apple/iTunes polices has caused no end of frustration for users working with audio encoded as AAC!



Mutagen is a Python module to handle audio metadata. It supports ASF, FLAC, M4A, Monkey's Audio, MP3, Musepack, Ogg Opus, Ogg FLAC, Ogg Speex, Ogg Theora, Ogg Vorbis, True Audio, WavPack and OptimFROG audio files. All versions of ID3v2 are supported, and all standard ID3v2.4 frames are parsed. It can read Xing headers to accurately calculate the bitrate and length of MP3s. ID3 and APEv2 tags can be edited regardless of audio format. It can also manipulate Ogg streams on an individual packet/page level.

There isn't (yet) an Ubuntu package for it, but you can install it via

pip install mutagen

You'll need to install pip if you don't have it already. You can install it using virtualenvwrapper if you want to avoid the need for sudo and avoid possible confusion with the standard Ubuntu package mechanism when it comes to security updates, versions of dependencies etc.

Or you can download and install mutagen manually from here. It's a .tar.gz file (here how to). See also the README file form inside the archive.

  • Thanks! Is there an Ubuntu or Debian package, or something that pip or easy_install can handle? – nealmcb Oct 23 '13 at 14:39
  • @nealmcb I think that this it simple enough. See README file form inside the archive. – Radu Rădeanu Oct 23 '13 at 14:44
  • @nealmcb After you install it. all you need to run is mutagen-inspect file.m4a from inside of tools directory. – Radu Rădeanu Oct 23 '13 at 14:52
  • 1
    The python-mutagen package is now available on Ubuntu – James Roth Mar 14 '16 at 12:33

You can do this with the TagEditor project:

tageditor -gf 'kind of sometimes maybe 128k aac.m4a'


Tag information for "kind of sometimes maybe 128k aac.m4a":
MP4/iTunes tag
 Title             Kind Of... Sometimes... Maybe
 Album             Tough Love
 Artist            Jessie Ware
 Year              2014-10-06
 Record label      PMR Records

AtomicParsley seems to do quite a good job of it. It's available for Ubuntu, and besides reading it also allows for setting tags in a m4a file (see manual page for it).

AtomicParsley file.m4a --textdata

or to see a structure of the tags

AtomicParsley file.m4a --test

Exiftool by Phil Harvey is an excellent (and still maintained) resource. Instructions below to install using apt. If you prefer manual installation from source, I suggest you visit his site and not GitHub, to be certain you get the official version.

apt install exiftool

OR (depending on your distro)

apt install libimage-exiftool-perl

Viewing with human-readable tag context:

exiftool -a <filename.ext>

or if you want to view data with frame ID context:

exiftool -s <filename.ext>

Supported file types: Below is a list of file types and meta information formats currently supported by ExifTool (r = read, w = write, c = create):

File Types
3FR   r     | DSS   r     | JP2   r/w   | OFR   r     | RTF   r
3G2   r/w   | DV    r     | JPEG  r/w   | OGG   r     | RW2   r/w
3GP   r/w   | DVB   r/w   | JSON  r     | OGV   r     | RWL   r/w
A     r     | DVR-MS r    | K25   r     | OPUS  r     | RWZ   r
AA    r     | DYLIB r     | KDC   r     | ORF   r/w   | RM    r
AAE   r     | EIP   r     | KEY   r     | OTF   r     | SEQ   r
AAX   r/w   | EPS   r/w   | LA    r     | PAC   r     | SKETCH r
ACR   r     | EPUB  r     | LFP   r     | PAGES r     | SO    r
AFM   r     | ERF   r/w   | LNK   r     | PBM   r/w   | SR2   r/w
AI    r/w   | EXE   r     | M2TS  r     | PCD   r     | SRF   r
AIFF  r     | EXIF  r/w/c | M4A/V r/w   | PCX   r     | SRW   r/w
APE   r     | EXR   r     | MAX   r     | PDB   r     | SVG   r
ARQ   r/w   | EXV   r/w/c | MEF   r/w   | PDF   r/w   | SWF   r
ARW   r/w   | F4A/V r/w   | MIE   r/w/c | PEF   r/w   | THM   r/w
ASF   r     | FFF   r/w   | MIFF  r     | PFA   r     | TIFF  r/w
AVI   r     | FLA   r     | MKA   r     | PFB   r     | TORRENT r
AZW   r     | FLAC  r     | MKS   r     | PFM   r     | TTC   r
BMP   r     | FLIF  r/w   | MKV   r     | PGF   r     | TTF   r
BPG   r     | FLV   r     | MNG   r/w   | PGM   r/w   | VCF   r
BTF   r     | FPF   r     | MOBI  r     | PLIST r     | VRD   r/w/c
CHM   r     | FPX   r     | MODD  r     | PICT  r     | VSD   r
COS   r     | GIF   r/w   | MOI   r     | PMP   r     | WAV   r
CR2   r/w   | GPR   r/w   | MOS   r/w   | PNG   r/w   | WDP   r/w
CR3   r/w   | GZ    r     | MOV   r/w   | PPM   r/w   | WEBP  r
CRM   r/w   | HDP   r/w   | MP3   r     | PPT   r     | WEBM  r
CRW   r/w   | HDR   r     | MP4   r/w   | PPTX  r     | WMA   r
CS1   r/w   | HEIC  r     | MPC   r     | PS    r/w   | WMV   r
DCM   r     | HEIF  r     | MPG   r     | PSB   r/w   | WTV   r
DCP   r/w   | HTML  r     | MPO   r/w   | PSD   r/w   | WV    r
DCR   r     | ICC   r/w/c | MQV   r/w   | PSP   r     | X3F   r/w
DFONT r     | ICS   r     | MRW   r/w   | QTIF  r/w   | XCF   r
DIVX  r     | IDML  r     | MXF   r     | R3D   r     | XLS   r
DJVU  r     | IIQ   r/w   | NEF   r/w   | RA    r     | XLSX  r
DLL   r     | IND   r/w   | NRW   r/w   | RAF   r/w   | XMP   r/w/c
DNG   r/w   | INX   r     | NUMBERS r   | RAM   r     | ZIP   r
DOC   r     | ISO   r     | O     r     | RAR   r     |
DOCX  r     | ITC   r     | ODP   r     | RAW   r/w   |
DPX   r     | J2C   r     | ODS   r     | RIFF  r     |
DR4   r/w/c | JNG   r/w   | ODT   r     | RSRC  r     |

Meta Information
EXIF           r/w/c  |  CIFF           r/w  |  Ricoh RMETA    r
GPS            r/w/c  |  AFCP           r/w  |  Picture Info   r
IPTC           r/w/c  |  Kodak Meta     r/w  |  Adobe APP14    r
XMP            r/w/c  |  FotoStation    r/w  |  MPF            r
MakerNotes     r/w/c  |  PhotoMechanic  r/w  |  Stim           r
Photoshop IRB  r/w/c  |  JPEG 2000      r    |  DPX            r
ICC Profile    r/w/c  |  DICOM          r    |  APE            r
MIE            r/w/c  |  Flash          r    |  Vorbis         r
JFIF           r/w/c  |  FlashPix       r    |  SPIFF          r
Ducky APP12    r/w/c  |  QuickTime      r    |  DjVu           r
PDF            r/w/c  |  Matroska       r    |  M2TS           r
PNG            r/w/c  |  MXF            r    |  PE/COFF        r
Canon VRD      r/w/c  |  PrintIM        r    |  AVCHD          r
Nikon Capture  r/w/c  |  FLAC           r    |  ZIP            r
GeoTIFF        r/w/c  |  ID3            r    |  (and more)<br>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.