Sending audio to the IP Camera backchannel

Prev

Next

 




Sending audio to the IP Camera backchannel

Description

Note: this feature requires the Datastead RTSP/RTMP/HTTP/ONVIF Source filter version 9.2.4.4 or newer.

The filter includes a "Datastead Audio To Backchannel" sink filter, that receives uncompressed PCM audio from a DirectShow graph and forwards it to an IP camera or network speaker over the network.

The mode of operation is selected automatically from the URL scheme:

- rtsp://...: ONVIF audio backchannel (Hikvision, Dahua, Axis, and most ONVIF Profile T/Q cameras). The audio codec is auto-detected from the camera SDP.
E.g.: VideoGrabber.IPCameraURL := 'rtsp://user:password@192.168.1.40/Streaming/Channels/101>autoreconnect=1>volumelevel=-20000';

- sip://...: SIP UAC mode (Axis network speakers and any SIP-capable device). The audio codec is fixed: PCMU (G.711 ยต-law) at 8 kHz, mono.
E.g.:
VideoGrabber.IPCameraURL := 'sip://26@192.168.1.26>transport=tls>autoreconnect=1>volumelevel=-20000';

To send audio to the IP camera backchannel, use the following sample code (e.g. if the source if a webcam microphone):

E.g.:

VideoGrabber.VideoSource := vs_VideoCaptureDevice;

VideoGrabber.AudioDevice := VideoGrabber.AudioDeviceIndex ('Microphone (Logi C615 HD WebCam)');

VideoGrabber.AudioRenderer := VideoGrabber.AudioRendererIndex ('Datastead Audio To Backchannel');

VideoGrabber.IPCameraURL := 'rtsp://user:password@192.168.1.40/Streaming/Channels/101';

VideoGrabber.AudioDeviceRendering := true;

VideoGrabber.StartAudioRendering();


SIP URL syntax:
sip://[ID:password@]host[<sep>localip=x.x.x.x[<sep>port=5060][<sep>transport=tcp|udp|tls]]

The localip parameter is required, it is the LAN IP address of the PC that goes into the SDP offer sent to the camera. Without it, the camera does not know where to send the RTP stream back.

In SIP mode the user part of the URL is the dial ID (the speaker extension), e.g. "26" for an Axis SIP speaker. If the camera also requires a separate Digest username, set it through VideoGrabber.SetAuthentication (at_IPcamera, "user", "password");

Examples:

sip://26:secret@192.168.1.26?localip=192.168.1.10

sip://26:secret@192.168.1.26>localip=192.168.1.10>port=5060>transport=udp

sip://26@192.168.1.26!localip=192.168.1.10!transport=tls (then call SetCredentials)

Note: depending on the camera, the localip parameter may not be required.


Copyright (c) Datastead