Страница 1 из 1

ogg vorbis и opus

СообщениеДобавлено: 09 сен 2019, 18:04
maxxx.sudb
freepbx*CLI> module show like codec_opus.so
Module Description Use Count Status Support Level
codec_opus.so OPUS Coder/Decoder 0 Running extended
1 modules loaded


freepbx*CLI> module show like format_ogg_vorbis.so
Module Description Use Count Status Support Level
format_ogg_vorbis.so OGG/Vorbis audio 0 Running core
1 modules loaded
freepbx*CLI>


При попытке Playback:
2019-09-09 14:02:22] ERROR[14309]: format_ogg_vorbis.c:121 ogg_vorbis_open: Error opening Ogg/Vorbis file stream.
[2019-09-09 14:02:22] WARNING[14309]: file.c:473 fn_wrapper: Unable to open format ogg_vorbis


или

[2019-09-09 14:03:35] WARNING[14309]: file.c:473 fn_wrapper: Unable to open format ogg_opus

Как его уговорить читать эти файлы?

Re: ogg vorbis и opus

СообщениеДобавлено: 09 сен 2019, 18:18
ded
*CLI> core show codecs
увидите много форматов. Но
Disclaimer: this command is for informational purposes only.
It does not indicate anything about your configuration.

Это не значит, что он умеет все их читать. И таблица трансляции об этом же скажет -
*CLI> core show translation

Audio Support
.....
Ogg Vorbis Codec(NO) Format(YES)
.....
https://wiki.asterisk.org/wiki/display/ ... pabilities

Limit the maximum playback rate of any endpoint that allow "opus" and don't include any forward error correction.
Код: выделить все
[opus]
type=opus
max_playback_rate=8000 ; Limit the bandwidth on the encoder to narrow band
fec=no ; Do not include in-band forward error correction data


Limit endpoints that allow "myopus" to wide band and use a constant bit rate:
Код: выделить все
[myopus]
type=opus
bitrate=16000 ; Maximum encoded bit rate used
cbr=yes ; The encoder will use a constant bit rate

https://wiki.asterisk.org/wiki/display/AST/Codec+Opus

Re: ogg vorbis и opus

СообщениеДобавлено: 09 сен 2019, 18:28
maxxx.sudb
Ded, как сделать кодек YES?
По ссылке сходил, понял ты прав, но зачем формат йес и кодек ноу - для меня лютая загадка.
И как исправить))?

Re: ogg vorbis и opus

СообщениеДобавлено: 09 сен 2019, 18:42
ded
Отгадка: не все в мире кодеки поставляются вместе с Астериском.
Долгие годы так было с G.723 & G.729
Теперь примерно так же развивается ситуация.
Искать, читать, пробовать. Скорее всего ваш кодек кривой (ненастроенный, под другую платформу, нужное подчеркнуть).
Там и вторая ссылка есть.

Новомодные развития в области транскодинга - любой кодек декодируют до serial linear (slin) с заданным битрейтом, чтобы синхронизировать при записи разговоров.

*CLI> core show file formats
Format Name Extensions
slin ogg_vorbis ogg
1 file format registered.

In this state it can’t play anything other than ogg. Asterisk will still work, but will give the error on playing any audio files that aren’t ogg.

The situation can be much improved by disabling some codecs. For example, to disable speex and lpc10 do this in modules.conf:
noload => codec_speex.so
noload => codec_lpc10.so

You should see the startup time much imporved.

Re: ogg vorbis и opus

СообщениеДобавлено: 09 сен 2019, 18:59
maxxx.sudb
wget http://downloads.digium.com/pub/telepho ... _64.tar.gz>/tmp/codec_opus-16.0_current-x86_64.tar.gz
Разархивируем и закидыванием в cp *.so /usr/lib64/asterisk/modules/
Вроде эти же кодеки?

yum install asterisk16-ogg.x86_64
yum install asterisk16-opus.x86_64
Так тоже не помогает...

Re: ogg vorbis и opus

СообщениеДобавлено: 09 сен 2019, 19:08
ded
Я не знаю.
Если инсталлированы, надо ещё и загрузить, типа
CLI> module load codec_как_он_там_называется.so
и чтобы не ругалсяпри загрузке.

Re: ogg vorbis и opus

СообщениеДобавлено: 09 сен 2019, 20:15
maxxx.sudb
Загружено уже говорит, как то так.
freepbx*CLI> module load codec_opus.so
Unable to load module codec_opus.so
Command 'module load codec_opus.so' failed.
[2019-09-09 16:12:32] WARNING[26824]: loader.c:1631 load_resource: Module 'codec_opus.so' already loaded and running.
freepbx*CLI> module load format_ogg_opus.so
Unable to load module format_ogg_opus.so
Command 'module load format_ogg_opus.so' failed.
[2019-09-09 16:13:37] WARNING[26824]: loader.c:1631 load_resource: Module 'format_ogg_opus.so' already loaded and running.

Ded спасибо за подсказку, буду искать дальше. Если найду -отпишусь, вдруг кому пригодится.
Понимаю что наверное достал, но можешь еще подсказать - мне нужно логику маршрутизации вынести из астериска наружу полностью.
Пытался через ARI - так там не нашел как работать с транком, два экстеншна соединить могу, а на транк нужный мне направить соединение с нужными параметрами не могу.
CLI - тоже не нашел
Чем копать?

Re: ogg vorbis и opus

СообщениеДобавлено: 09 сен 2019, 20:17
ded
CLI> module unload....
CLI> module load ....

А у вас точно 16-й астериск?

Re: ogg vorbis и opus

СообщениеДобавлено: 09 сен 2019, 20:22
maxxx.sudb
freepbx*CLI> core show version
Asterisk 16.3.0 built by mockbuild @ jenkins7 on a x86_64 running Linux on 2019-04-17 16:33:59 UTC

Полагаю, да.