Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1025165: No opus transcoding available after asterisk install

56 views
Skip to first unread message

IB Development Team

unread,
Nov 30, 2022, 10:40:04 AM11/30/22
to
Package: asterisk
Version: 1:16.28.0~dfsg-0+deb10u1

In clean Debian 10 after

    apt-get install asterisk

internal opus codec seems to be available in 'core show codecs' but not
in 'core show translation' and transcoding with opus does not work; same
in Debian 11 and asterisk 1:16.28.0~dfsg-0+deb11u1.

Example from Debian 11:

# asterisk -rx 'core show translation'
         Translation times between formats (in microseconds) for one
second of data
          Source Format (Rows) Destination Format (Columns)

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

# asterisk -rx 'core show codecs'
Disclaimer: this command is for informational purposes only.
        It does not indicate anything about your configuration.
      ID TYPE  NAME         FORMAT           DESCRIPTION
------------------------------------------------------------------------------------------------
      33 image png          png              (PNG Image)
       8 audio g726         g726             (G.726 RFC3551)
       6 audio alaw         alaw             (G.711 a-law)
       4 audio g723         g723             (G.723.1)
      22 audio speex        speex            (SpeeX)
      23 audio speex        speex16          (SpeeX 16khz)
      24 audio speex        speex32          (SpeeX 32khz)
      26 audio g722         g722             (G722)
      27 audio siren7       siren7           (ITU G.722.1 (Siren7,
licensed from Polycom))
      34 video h261         h261             (H.261 video)
      35 video h263         h263             (H.263 video)
      10 audio adpcm        adpcm            (Dialogic ADPCM)
      38 video h265         h265             (H.265 video)
      46 audio silk         silk8            (SILK Codec (8 KHz))
      47 audio silk         silk12           (SILK Codec (12 KHz))
      48 audio silk         silk16           (SILK Codec (16 KHz))
      49 audio silk         silk24           (SILK Codec (24 KHz))
      30 audio g719         g719             (ITU G.719)
      36 video h263p        h263p            (H.263+ video)
      37 video h264         h264             (H.264 video)
      21 audio g729         g729             (G.729A)
      11 audio slin         slin             (16 bit Signed Linear PCM)
      12 audio slin         slin12           (16 bit Signed Linear PCM
(12kHz))
      13 audio slin         slin16           (16 bit Signed Linear PCM
(16kHz))
      14 audio slin         slin24           (16 bit Signed Linear PCM
(24kHz))
      15 audio slin         slin32           (16 bit Signed Linear PCM
(32kHz))
      16 audio slin         slin44           (16 bit Signed Linear PCM
(44kHz))
      17 audio slin         slin48           (16 bit Signed Linear PCM
(48kHz))
      18 audio slin         slin96           (16 bit Signed Linear PCM
(96kHz))
      19 audio slin         slin192          (16 bit Signed Linear PCM
(192kHz))
       5 audio ulaw         ulaw             (G.711 u-law)
      20 audio lpc10        lpc10            (LPC10)
      29 audio testlaw      testlaw          (G.711 test-law)
      45 audio none         none             (<Null> codec)
      44 image t38          t38              (T.38 UDPTL Fax)
       1 audio amr          amr              (AMR)
       2 audio amrwb        amrwb            (AMR-WB)
      41 video vp9          vp9              (VP9 video)
      40 video vp8          vp8              (VP8 video)
       7 audio gsm          gsm              (GSM)
      39 video mpeg4        mpeg4            (MPEG4 video)
      25 audio ilbc         ilbc             (iLBC)
      42 text  red          red              (T.140 Realtime Text with
redundancy)
      43 text  t140         t140             (Passthrough T.140
Realtime Text)
      31 audio opus         opus             (Opus Codec)
      32 image jpeg         jpeg             (JPEG image)
       9 audio g726aal2     g726aal2         (G.726 AAL2)
       3 audio codec2       codec2           (Codec 2)
      28 audio siren14      siren14          (ITU G.722.1 Annex C,
(Siren14, licensed from Polycom))

--

Regards,
Paweł Bogusławski

IB Development Team
E:d...@ib.pl

Faidon Liambotis

unread,
May 4, 2023, 6:52:02 AM5/4/23
to
Control: found -1 1:20.2.1~dfsg+~cs6.13.40431413-1
Control: tags -1 patch

On Wed, Nov 30, 2022 at 04:18:24PM +0100, IB Development Team wrote:
> Package: asterisk
> Version: 1:16.28.0~dfsg-0+deb10u1
>
> In clean Debian 10 after
>
>     apt-get install asterisk
>
> internal opus codec seems to be available in 'core show codecs' but not in
> 'core show translation' and transcoding with opus does not work; same in
> Debian 11 and asterisk 1:16.28.0~dfsg-0+deb11u1.

I believe the reason is that codec_opus_open_source.so is not shipped,
due to it not being built.

Adding "ADDONS_ENABLE += codec_opus_open_source" to debian/rules (e.g.
near the other ADDONS_ENABLE lines) addresses this issue. I've verified
that "core show translation" shows opus in the matrix after that. I'm
not sure why menuselect doesn't enable it by default.

Separately, it looks like there is a patch (2015_opus.patch) to add
libopusenc detection, used conditionally -if found- by the module
format_ogg_opus_open_source. However, libopusenc-dev is not in
Build-Depends. I've verified that the (already patched) build system
picks it up if I add it, and shlibs etc. are added.

Thanks,
Faidon

Faidon Liambotis

unread,
Aug 7, 2023, 9:10:05 AM8/7/23
to
Hi Jonas,
I saw you've made a couple of uploads since my response, so it looks
like the package is maintained (which is great news - thanks for that!).

It may not have been clear from the verbosity of my response, but the
fix for this bug is one line in debian/rules, and optionally another one
line (an addition to Build-Depends) for the related format_ogg issue.

would it be possible for you to have a quick look at this and thus
resolve this bug?

Thanks!
Faidon

Athos Ribeiro

unread,
Nov 27, 2023, 3:00:05 PM11/27/23
to
> > Adding "ADDONS_ENABLE += codec_opus_open_source" to debian/rules (e.g.
> > near the other ADDONS_ENABLE lines) addresses this issue. I've verified
> > that "core show translation" shows opus in the matrix after that. I'm
> > not sure why menuselect doesn't enable it by default.

This same issue was reported in Ubuntu at https://bugs.launchpad.net/debian/+source/asterisk/+bug/2044135.

However, I see the following entry in debian/changelog:

* stop set obsolete menuselect option codec_opus_open_source

from version 1:16.23.0~dfsg+~2.10-1.

I wonder what the story behind the removal is.

Moreover, the upstream readme file, at under Xopus/README.md in the
source package says that "Opus is not only supported for pass-through
but can be transcoded as well. This allows you to translate to/from
other audio codecs [...] This can be achieved by enabling codec_opus via
make menuselect".

So I wonder if that is the actual identifier to be enabled (i.e.,
s/codec_opus_open_source/codec_opus/).

--
Athos Ribeiro
0 new messages