@seydx/rtsp / BackchannelInfo
Interface: BackchannelInfo
Defined in: types.ts:151
Describes the upstream's talkback (ONVIF backchannel) audio format.
Present only when the upstream accepts audio sent back to it (for example an RTSP camera that exposes an ONVIF backchannel). The codec and clock fields describe exactly what the upstream expects to receive, so a sink can encode or repackage viewer audio into a compatible stream before forwarding it.
Example
import { Source, supportsBackchannel } from '@seydx/rtsp';
if (supportsBackchannel(source) && source.backchannel) {
const { codec, clockRate, channels } = source.backchannel;
console.log(`talkback expects ${codec} @ ${clockRate}Hz x${channels}`);
}See
BackchannelSource For the source capability that exposes this
Properties
channels
channels:
number
Defined in: types.ts:198
Number of audio channels in the backchannel.
Typically 1 for the mono talkback streams cameras expect.
clockRate
clockRate:
number
Defined in: types.ts:191
RTP clock rate of the backchannel, in Hz.
Used to compute RTP timestamps for outbound packets at the rate the upstream expects (e.g. 8000 for G.711, 48000 for Opus).
codec
codec:
string
Defined in: types.ts:166
Lower-case codec name expected by the upstream.
Examples include pcm_mulaw, pcm_alaw, and aac. Reported in the canonical FFmpeg short-name form.
codecId?
optionalcodecId?:AVCodecID
Defined in: types.ts:175
node-av AVCodecID for the backchannel codec.
Provided so a transcoder can construct a matching encoder when the viewer audio must be converted into the upstream's expected format. Absent when the id is not available.
payloadType
payloadType:
number
Defined in: types.ts:183
RTP payload type advertised for the backchannel.
The dynamic or static payload type number that must be stamped on outbound RTP packets so the upstream associates them with the backchannel stream.
streamIndex
streamIndex:
number
Defined in: types.ts:158
Upstream stream index used to send packets back.
Identifies the backchannel stream on the upstream connection (e.g. the RTSP track to which outbound RTP packets are written).