TeamTalk 5 C-API DLL  Version 5.1C
Audio and Video Codecs

This section explains how to configure audio and video codecs. More...

Classes

struct  SpeexCodec
 Speex audio codec settings for Constant Bitrate mode (CBR). More...
 
struct  SpeexVBRCodec
 Speex audio codec settings for Variable Bitrate mode (VBR). More...
 
struct  OpusCodec
 OPUS audio codec settings. For detailed information about the OPUS codec check out http://www.opus-codec.org. More...
 
struct  SpeexDSP
 Speex DSP is used for specifying how recorded audio from a sound input device should be preprocessed before transmission. More...
 
struct  WebMVP8Codec
 WebM video codec settings. More...
 
struct  AudioCodec
 Struct used for specifying which audio codec a channel uses. More...
 
struct  AudioConfig
 Audio configuration for clients in a channel. More...
 
struct  VideoCodec
 Struct used for specifying the video codec to use. More...
 

Macros

#define SPEEX_NB_MIN_BITRATE   2150
 The minimum bitrate for Speex codec in 8 KHz mode. Bandmode = 0. More...
 
#define SPEEX_NB_MAX_BITRATE   24600
 The maximum bitrate for Speex codec in 8 KHz mode. Bandmode = 0. More...
 
#define SPEEX_WB_MIN_BITRATE   3950
 The minimum bitrate for Speex codec in 16 KHz mode. Bandmode = 1. More...
 
#define SPEEX_WB_MAX_BITRATE   42200
 The maximum bitrate for Speex codec in 16 KHz mode. Bandmode = 1. More...
 
#define SPEEX_UWB_MIN_BITRATE   4150
 The minimum bitrate for Speex codec in 32 KHz mode. Bandmode = 2. More...
 
#define SPEEX_UWB_MAX_BITRATE   44000
 The maximum bitrate for Speex codec in 32 KHz mode. Bandmode = 2. More...
 
#define OPUS_APPLICATION_VOIP   2048
 Audio encoding is for VoIP. This value should be set as nApplicaton in OpusCodec. More...
 
#define OPUS_APPLICATION_AUDIO   2049
 Audio encoding is for music. This value should be set as nApplicaton in OpusCodec. More...
 
#define OPUS_MIN_BITRATE   6000
 The minimum bitrate for OPUS codec. Checkout nBitRate of OpusCodec. More...
 
#define OPUS_MAX_BITRATE   510000
 The maximum bitrate for OPUS codec. Checkout nBitRate of OpusCodec. More...
 

Typedefs

typedef struct SpeexCodec SpeexCodec
 Speex audio codec settings for Constant Bitrate mode (CBR). More...
 
typedef struct SpeexVBRCodec SpeexVBRCodec
 Speex audio codec settings for Variable Bitrate mode (VBR). More...
 
typedef struct OpusCodec OpusCodec
 OPUS audio codec settings. For detailed information about the OPUS codec check out http://www.opus-codec.org. More...
 
typedef struct SpeexDSP SpeexDSP
 Speex DSP is used for specifying how recorded audio from a sound input device should be preprocessed before transmission. More...
 
typedef struct WebMVP8Codec WebMVP8Codec
 WebM video codec settings. More...
 
typedef enum Codec Codec
 The codecs supported. More...
 
typedef struct AudioCodec AudioCodec
 Struct used for specifying which audio codec a channel uses. More...
 
typedef struct AudioConfig AudioConfig
 Audio configuration for clients in a channel. More...
 
typedef struct VideoCodec VideoCodec
 Struct used for specifying the video codec to use. More...
 

Enumerations

enum  Codec {
  NO_CODEC = 0, SPEEX_CODEC = 1, SPEEX_VBR_CODEC = 2, OPUS_CODEC = 3,
  WEBM_VP8_CODEC = 128
}
 The codecs supported. More...
 

Detailed Description

This section explains how to configure audio and video codecs.

The client is able to encode audio in Speex and OPUS format whereas video can be encoded in WebM format. OPUS is recommended for audio encoding, both for voice and music.

Choosing the right codec settings in an end-user application is very important and proper settings depend entirely on the user scenario. Always ensure that the codec settings do not require too much bandwidth and thereby resulting in packetloss causing inaudible conversations and poor video quality. Detecting packetloss can be done using UserStatistics and ClientStatistics.

Every channel must configure which audio codec to use in order for users to be able to talk to each other. The audiocodec member of Channel specifies which audio codec (AudioCodec) should be used. A channel does not restrict the video codec (VideoCodec) users are using.

Macro Definition Documentation

#define SPEEX_NB_MIN_BITRATE   2150

The minimum bitrate for Speex codec in 8 KHz mode. Bandmode = 0.

#define SPEEX_NB_MAX_BITRATE   24600

The maximum bitrate for Speex codec in 8 KHz mode. Bandmode = 0.

#define SPEEX_WB_MIN_BITRATE   3950

The minimum bitrate for Speex codec in 16 KHz mode. Bandmode = 1.

#define SPEEX_WB_MAX_BITRATE   42200

The maximum bitrate for Speex codec in 16 KHz mode. Bandmode = 1.

#define SPEEX_UWB_MIN_BITRATE   4150

The minimum bitrate for Speex codec in 32 KHz mode. Bandmode = 2.

#define SPEEX_UWB_MAX_BITRATE   44000

The maximum bitrate for Speex codec in 32 KHz mode. Bandmode = 2.

#define OPUS_APPLICATION_VOIP   2048

Audio encoding is for VoIP. This value should be set as nApplicaton in OpusCodec.

#define OPUS_APPLICATION_AUDIO   2049

Audio encoding is for music. This value should be set as nApplicaton in OpusCodec.

#define OPUS_MIN_BITRATE   6000

The minimum bitrate for OPUS codec. Checkout nBitRate of OpusCodec.

#define OPUS_MAX_BITRATE   510000

The maximum bitrate for OPUS codec. Checkout nBitRate of OpusCodec.

Typedef Documentation

typedef struct SpeexCodec SpeexCodec

Speex audio codec settings for Constant Bitrate mode (CBR).

See also
SpeexVBRCodec
typedef struct SpeexVBRCodec SpeexVBRCodec

Speex audio codec settings for Variable Bitrate mode (VBR).

typedef struct OpusCodec OpusCodec

OPUS audio codec settings. For detailed information about the OPUS codec check out http://www.opus-codec.org.

typedef struct SpeexDSP SpeexDSP

Speex DSP is used for specifying how recorded audio from a sound input device should be preprocessed before transmission.

Users' audio levels may be diffent due to how their microphone is configured in their OS. Automatic Gain Control (AGC) can be used to ensure all users in the same channel have the same audio level.

Enable the preprocessing configuration by calling TT_SetSoundInputPreprocess().

When joining a Channel and bEnableGainControl of AudioConfig is enabled in the channel then enable sound input preprocessing by setting bEnableAGC to TRUE and nGainLevel of SpeexDSP to the nGainLevel of AudioConfig.

typedef enum Codec Codec

The codecs supported.

See also
AudioCodec
VideoCodec
typedef struct AudioCodec AudioCodec

Struct used for specifying which audio codec a channel uses.

typedef struct AudioConfig AudioConfig

Audio configuration for clients in a channel.

An audio configuration can be used to set common audio properties for all users in a channel. Checkout audiocfg of Channel.

The audio configuration only supports same audio level for all users by manually converting the values to the SpeexDSP preprocessor.

See also
TT_SetSoundInputPreprocess()
TT_DoMakeChannel()
TT_DoJoinChannel()
typedef struct VideoCodec VideoCodec

Struct used for specifying the video codec to use.

Enumeration Type Documentation

enum Codec

The codecs supported.

See also
AudioCodec
VideoCodec
Enumerator
NO_CODEC 

No codec specified.

SPEEX_CODEC 

Speex audio codec, http://www.speex.org.

See also
SpeexCodec
SPEEX_VBR_CODEC 

Speex audio codec in VBR mode, http://www.speex.org.

See also
SpeexVBRCodec
OPUS_CODEC 

OPUS audio codec.

See also
OpusCodec
WEBM_VP8_CODEC 

WebM video codec.

See also
WebMVP8Codec