Conversion between AMR (Adaptive Multi-rate Codec) file formats

Eric Woudenberg, Feb 2003


There appear to be [at least] two file formats for AMR codec data. These are:

  1. ".AMR" Files stored in "AMR File Storage Format". This is specified in draft-ietf-avt-rtp-amr-10.txt, Sec. 6.2, which is included with the Ericsson AMR converter tool. (The draft is an early form of RFC 3267). These are handled by the Ericsson AMR tool, as well as by Nokia Series 60 phones. They have a header of "#!AMR\n".

  2. ".COD" Files stored in "AMR Interface Format 2." This is specified in 3GPP TS 26.101, Appendix A. These are coded and decoded by the 3GPP TS 26.104 floating point reference codec source package.


To aid development work with these two formats (and to clarify their differences) I have written, a small Python program that converts between the two formats. Here is the Usage message:

This program converts between:
  .amr files [AMR File Storage Format (draft-ietf-avt-rtp-amr-10.txt, Sec. 6.2)]
  .cod files [AMR Interface Format 2 (3GPP TS 26.101, Annex A)]

Usage: filename.ext
        When .ext == '.amr' creates filename.ext.cod file
        When .ext == '.cod' creates filename.ext.amr file


".AMR" files: ".COD" files:

Other Convertors A person named Xabi has a created a AMR <-> IFS converter (in perl).