Audio

Audio Transmission

To transmit audio data to NVR, HTTP Basic / Digest authentication is required. And the user must have permissions to control cameras.

Use following HTTP path and headers:

POST /api/transmit HTTP/1.1
Content-Type: audio/basic
Transfer-Encoding: chunked

Use chunked transfer encoding and G.711 μ-law compression format.

You can use following parameters:

  • channels : channels (start from 1, multiple channels can be described like 1,3-4,7)
  • priority : priority (default: 0. the larger number, the higher priority)
  • live : live audio (default: false)

NVR replies error status with following HTTP response code:

  • 400 Bad Request : Bad request (ex: wrong format of channels)
  • 401 Unauthorized : Authentication failure.
  • 404 Not Found : Audio transmission is not supported.
  • 415 Unsupported Media Type : Unsupported content type.
  • 403 Forbidden : There is no audio device or permission.

This is an example response of 403 Forbidden.

  • Channel 1 has audio device and permission
  • Channel 2 does not have permission
  • Channel 3 doesn't have audio device and permission
{
  "errors": [
    {
      "type": "no-device",
      "channels": [ 3 ]
    },
    {
      "type": "permission-denied",
      "channels": [ 2, 3 ]
    }
  ]
}