RTSP Audio Backchannel (ONVIF) - How to implement

Viewed 964

My objective is to implement RTSP audio backchannel with ONVIF, i.e, without using any camera SDK.

My expectations from this thread are -

  1. To verify my understandings
  2. Get an idea about how to do this
  3. Find out different alternatives

1. Understandings

I shall record audio from the microphone and send audio packets (wrapped with RTP headers) to the Camera using TCP/UDP. Call flow will be like this :

DESCRIBE rtsp://backchannel_url RTSP/1.0
CSeq: 1
Accept: application/sdp
User-Agent: xxxclient
Bandwidth: 384000
Require: www.onvif.org/ver20/backchannel

SETUP rtsp://backchannel_url/trackID=5 
RTSP/1.0
CSeq: 2
User-Agent: xxxclient
Transport: RTP/AVP;unicast;client_port=19746-19747
Require: www.onvif.org/ver20/backchannel

With the response of SETUP, the RTSP server is expected to send the server port like this:

RTSP/1.0 200 OK
CSeq: 2
Session: 1066942051;timeout=60
Transport: RTP/AVP/UDP;unicast;client_port=19746-19747;server_port=38890-38891;ssrc=02A8AAB0
x-Dynamic-Rate: 1

Then I shall call the PLAY and simultaneously send RTP packets(with audio frames inside) to the camera. And, if any Audio Out is connected to the camera, the recorded sound from the client machine is expected to play there.

2. Get an idea about how to do this (C++)

I tried to find out if this can be done with FFmpeg, but could not find any. With a little working experience in using Live555, I tried to think like this :

enter image description here

But, before this, is this possible to have a single sink getting data from multiple sources? In my case, I can understand that only audio data will be sent to the sink, not the video data. The RTSP source is necessary only to call SETUP to the camera and get the port number on which the server is waiting for RTP packets.

Please help me find out the proper way to do this.

3. Find out different alternatives

Though I am trying to solve this with Live555, is there any better alternative? Please let me know.

0 Answers
Related