# Understanding codec translations

**URL:** <https://community.asterisk.org/t/understanding-codec-translations/102604>\
**Category:** Asterisk Support\
**Created:** [May 22, 2024, 7:23pm UTC](https://community.asterisk.org/t/understanding-codec-translations/102604 "2024-05-22T19:23:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dovi5988](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/dovi5988/32/7320_2.png) [@dovi5988](https://community.asterisk.org/u/dovi5988)\
**Post date:** [May 22, 2024, 7:23pm UTC](https://community.asterisk.org/t/understanding-codec-translations/102604/1 "2024-05-22T19:23:28Z")

</div>

Hi,

Looking at the output of `core show translation`

```auto
         Translation times between formats (in microseconds) for one second of data
          Source Format (Rows) Destination Format (Columns)

          codec2 ulaw alaw gsm g726 g726aal2 adpcm slin8 slin12 slin16 slin24 slin32 slin44 slin48 slin96 slin192 lpc10 speex8 speex16 speex32 ilbc g722 opus
   codec2 - 15000 15000 15000 15000 15000 15000 9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 23000 23000 15000 17250 23000
     ulaw 15000 - 9150 15000 15000 15000 15000 9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 23000 23000 15000 17250 23000
     alaw 15000 9150 - 15000 15000 15000 15000 9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 23000 23000 15000 17250 23000
      gsm 15000 15000 15000 - 15000 15000 15000 9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 23000 23000 15000 17250 23000
     g726 15000 15000 15000 15000 - 15000 15000 9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 23000 23000 15000 17250 23000
 g726aal2 15000 15000 15000 15000 15000 - 15000 9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 23000 23000 15000 17250 23000
    adpcm 15000 15000 15000 15000 15000 15000 - 9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 23000 23000 15000 17250 23000
    slin8 6000 6000 6000 6000 6000 6000 6000 - 8000 8000 8000 8000 8000 8000 8000 8000 6000 6000 14000 14000 6000 8250 14000
   slin12 14500 14500 14500 14500 14500 14500 14500 8500 - 8000 8000 8000 8000 8000 8000 8000 14500 14500 14000 14000 14500 14000 14000
   slin16 14500 14500 14500 14500 14500 14500 14500 8500 8500 - 8000 8000 8000 8000 8000 8000 14500 14500 6000 14000 14500 6000 14000
   slin24 14500 14500 14500 14500 14500 14500 14500 8500 8500 8500 - 8000 8000 8000 8000 8000 14500 14500 14500 14000 14500 14500 14000
   slin32 14500 14500 14500 14500 14500 14500 14500 8500 8500 8500 8500 - 8000 8000 8000 8000 14500 14500 14500 6000 14500 14500 14000
   slin44 14500 14500 14500 14500 14500 14500 14500 8500 8500 8500 8500 8500 - 8000 8000 8000 14500 14500 14500 14500 14500 14500 14000
   slin48 14500 14500 14500 14500 14500 14500 14500 8500 8500 8500 8500 8500 8500 - 8000 8000 14500 14500 14500 14500 14500 14500 6000
   slin96 14500 14500 14500 14500 14500 14500 14500 8500 8500 8500 8500 8500 8500 8500 - 8000 14500 14500 14500 14500 14500 14500 14500
  slin192 14500 14500 14500 14500 14500 14500 14500 8500 8500 8500 8500 8500 8500 8500 8500 - 14500 14500 14500 14500 14500 14500 14500
    lpc10 15000 15000 15000 15000 15000 15000 15000 9000 17000 17000 17000 17000 17000 17000 17000 17000 - 15000 23000 23000 15000 17250 23000
   speex8 15000 15000 15000 15000 15000 15000 15000 9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 - 23000 23000 15000 17250 23000
  speex16 23500 23500 23500 23500 23500 23500 23500 17500 17500 9000 17000 17000 17000 17000 17000 17000 23500 23500 - 23000 23500 15000 23000
  speex32 23500 23500 23500 23500 23500 23500 23500 17500 17500 17500 17500 9000 17000 17000 17000 17000 23500 23500 23500 - 23500 23500 23000
     ilbc 15000 15000 15000 15000 15000 15000 15000 9000 17000 17000 17000 17000 17000 17000 17000 17000 15000 15000 23000 23000 - 17250 23000
     g722 15600 15600 15600 15600 15600 15600 15600 9600 17500 9000 17000 17000 17000 17000 17000 17000 15600 15600 15000 23000 15600 - 23000
     opus 23500 23500 23500 23500 23500 23500 23500 17500 17500 17500 17500 17500 17500 9000 17000 17000 23500 23500 23500 23500 23500 23500 -

```

is it accurate to say that if I am using ulaw for my codec on the call and the files are stored in opus format instead of say slin8 that the CPU cost will be roughly 3x? Is that a fair statement?

---

<div class="post-metadata">

**Author:** ![penguinpbx](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/penguinpbx/32/8856_2.png) [@penguinpbx](https://community.asterisk.org/u/penguinpbx)\
**Post date:** [June 21, 2024, 5:17pm UTC](https://community.asterisk.org/t/understanding-codec-translations/102604/2 "2024-06-21T17:17:18Z")

</div>

23000 / 9000 = 2.555 so yes about 3x, agreed.

Any real-world data since the post to back up the theory ?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [July 21, 2024, 5:17pm UTC](https://community.asterisk.org/t/understanding-codec-translations/102604/3 "2024-07-21T17:17:32Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
