Media Codecs
Diago for now is only built for audio processing to target VOIP needs, but it may support video as well.
SDP negotiation
You can control codecs support with media conf and there order.
Checkout for diago.MediaConfig
which can be passed on creating diago.
If you need transcoding library for now supports this codecs:
- PCMU (ulaw)
- PCMA (alaw)
- opus
Opus
Library uses opus C binding and it is not enabled by default You need to have installed opus development files before compiling.
Example for linux:
Ubuntu:
sudo apt-get install pkg-config libopus-dev libopusfile-dev
Fedora:
sudo dnf install opus-devel opusfile-devel
Opus compile
To enable opus compile you need to place build tags.
go build -tags with_opus_c .
Make sure you have enabled opus with diago.MediaConfig
and passing sdp.FORMAT_TYPE_OPUS
. Example:
diago.MediaConfig{
Formats: []string(sdp.FORMAT_TYPE_OPUS, sdp.FORMAT_TYPE_ALAW, sdp.FORMAT_TYPE_ULAW),
}
For more on how to compile checkout this package https://github.com/hraban/opus