node-av / webrtc / RTPStreamOptions
Interface: RTPStreamOptions
Defined in: src/api/rtp-stream.ts:26
Options for configuring RTP streaming.
Properties
audio?
optionalaudio?:object
Defined in: src/api/rtp-stream.ts:95
Audio stream configuration.
channels?
optionalchannels?:number
encoderOptions?
optionalencoderOptions?:UnknownEncoderOptions
mtu?
optionalmtu?:number
payloadType?
optionalpayloadType?:number
sampleFormat?
optionalsampleFormat?:AVSampleFormat
sampleRate?
optionalsampleRate?:number
ssrc?
optionalssrc?:number
hardware?
optionalhardware?:"auto"| {device?:string;deviceType:FFHWDeviceType|AVHWDeviceType;options?:Record<string,string>; }
Defined in: src/api/rtp-stream.ts:72
Hardware acceleration configuration.
'auto'- Automatically detect and use available hardware acceleration- Object with deviceType - Manually specify hardware acceleration type
Default
{ deviceType: AV_HWDEVICE_TYPE_NONE }inputOptions?
optionalinputOptions?:DemuxerOptions<string&object|DemuxerFormat>
Defined in: src/api/rtp-stream.ts:77
Input media options passed to Demuxer.
onAudioPacket?
optionalonAudioPacket?: (packet) =>void
Defined in: src/api/rtp-stream.ts:41
Callback invoked for each audio RTP packet. Use this to send packets to your RTP implementation.
Parameters
packet
Serialized RTP packet ready for transmission
Returns
void
onClose?
optionalonClose?: (error?) =>void
Defined in: src/api/rtp-stream.ts:48
Callback invoked when the stream is closed or encounters an error.
Parameters
error?
Error
Optional error if stream closed due to an error
Returns
void
onVideoPacket?
optionalonVideoPacket?: (packet) =>void
Defined in: src/api/rtp-stream.ts:33
Callback invoked for each video RTP packet. Use this to send packets to your RTP implementation.
Parameters
packet
Serialized RTP packet ready for transmission
Returns
void
signal?
optionalsignal?:AbortSignal
Defined in: src/api/rtp-stream.ts:111
AbortSignal for cancellation.
When aborted, the stream stops gracefully, equivalent to calling stop(). If already aborted when start() is called, throws AbortError.
supportedAudioCodecs?
optionalsupportedAudioCodecs?: (AVCodecID|FFAudioEncoder)[]
Defined in: src/api/rtp-stream.ts:62
Supported audio codec IDs for transcoding decisions. If not provided or empty, all audio codecs are supported (passthrough only, no transcoding). If provided, only the specified codecs are supported and transcoding will be performed if needed.
supportedVideoCodecs?
optionalsupportedVideoCodecs?: (AVCodecID|FFVideoEncoder)[]
Defined in: src/api/rtp-stream.ts:55
Supported video codec IDs for transcoding decisions. If not provided or empty, all video codecs are supported (passthrough only, no transcoding). If provided, only the specified codecs are supported and transcoding will be performed if needed.
video?
optionalvideo?:object
Defined in: src/api/rtp-stream.ts:82
Video stream configuration.
encoderOptions?
optionalencoderOptions?:UnknownEncoderOptions
fps?
optionalfps?:number
height?
optionalheight?:number
mtu?
optionalmtu?:number
payloadType?
optionalpayloadType?:number
ssrc?
optionalssrc?:number
width?
optionalwidth?:number
