Draft
Network Camera Server WebView Audio Protocol Specifications
Ver. 1.0 BIE-7084-000
January 30, 2015
CANON INC.
Revision History Version 1.0
Release Date January 30, 2015
Location -
Changes First edition
Table of Contents 1
Introduction .......................................................................................................................... 1 1.1 Use of this Document ................................................................................................... 1 1.2 Supported Products...................................................................................................... 1 1.3 Notation ........................................................................................................................ 2
2
Related Documents .............................................................................................................. 3
3
Terms .................................................................................................................................... 4
4
Protocol Overview ................................................................................................................ 5
5
WebView Audio Protocol Specifications ............................................................................. 7 5.1 Interface Specifications ............................................................................................... 7 5.1.1
Protocol Configuration ..................................................................................... 7
5.1.1.1
Command List ....................................................................................... 7
5.1.1.2
Protocol Syntax ...................................................................................... 7
5.1.2
Request.............................................................................................................. 9
5.1.2.1 5.1.3
HTTP Request Header .......................................................................... 9
Response ......................................................................................................... 10
5.1.3.1
HTTP Status ........................................................................................ 10
5.1.3.2
x-wva Stream Status ........................................................................... 11
5.1.4
User Privileges of User Access Control Function ......................................... 12
5.1.5
Possessory Rights of Speakers on Server Side ............................................. 12
5.1.6
Keep-Alive ....................................................................................................... 13
5.1.7
Connection Client ........................................................................................... 13
5.2 Information Item Specifications................................................................................ 14 5.2.1
Audio Stream Protocol Specifications [x-wva-100] ...................................... 14
5.2.1.1
NULL Chunk (null_packet) ................................................................ 15
5.2.1.2
Result Chunk (resultcode_packet) ..................................................... 15
5.2.1.3
Audio Chunk (audio_packet) .............................................................. 15
5.2.1.4
Silent Chunk (silentnoise_packet) ..................................................... 16
5.2.1.5
End Chunk (endofstream_packet) ...................................................... 16
5.2.1.6
Time Information Chunk (time_packet) ............................................ 17
5.2.1.7
Transmission Codec Information Chunk (codec_packet) .................. 17
5.2.1.8
Codec Information for Transmission by Server Chunk (codeclist_packet)................................................................................. 18
5.2.1.9
Packet ID Information Chunk (packetid_packet) ............................. 18
5.2.1.10 Protocol Version Information Chunk (protocolversion_packet) ........ 19 5.2.1.11 Server Mode Information Chunk (servermode_packet) .................... 19 5.3 Command Specifications ........................................................................................... 20
5.3.1
Server Information Acquisition [info] ........................................................... 20
5.3.1.1
Commands ........................................................................................... 20
5.3.1.2
Response .............................................................................................. 20
5.3.1.3
Protocol Examples ............................................................................... 23
5.3.2
Client-directed Audio Transmission [send]................................................... 25
5.3.2.1
Commands ........................................................................................... 25
5.3.2.2
Response .............................................................................................. 26
5.3.2.3
Protocol Examples ............................................................................... 28
5.3.3
Server-directed Audio Transmission [recv] ................................................... 30
5.3.3.1
Commands ........................................................................................... 30
5.3.3.2
Response .............................................................................................. 31
5.3.3.3
Protocol Examples ............................................................................... 33
5.3.4
Audio information acquisition [status] ......................................................... 38
5.3.4.1
Commands ........................................................................................... 38
5.3.4.2
Response .............................................................................................. 38
5.3.4.3
Protocol Examples ............................................................................... 39
5.4 Items Related to the WebView Settings Protocol .................................................... 41 Appendix ............................................................................................................................. 44 A
List of Specification Differences by Function and Series ........................................ 44 A.1
List of Supported Commands ........................................................................ 44
A.2
List of Server Versions ................................................................................... 44
1 Introduction These specifications specify the WebView audio protocol, which is one of the Canon Network Camera Server WebView protocols. The WebView audio protocol provides a function for two-way audio streaming transmission. The WebView audio protocol is regulated as a specification independent from the WebView HTTP protocol and other protocols, and audio-only applications can be created simply with this protocol.
1.1 Use of this Document This document is for developers of applications using the Canon network camera. Use of this document requires knowledge of application development.
1.2 Supported Products This document was designed for the following Canon network cameras.
Canon Network Camera VB-S30D Canon Network Camera VB-S31D Canon Network Camera VB-S800D Canon Network Camera VB-S900F Canon Network Camera VB-S805D Canon Network Camera VB-S905F Canon Network Camera VB-H43 Canon Network Camera VB-H630VE Canon Network Camera VB-H630D Canon Network Camera VB-H730F Canon Network Camera VB-M42 Canon Network Camera VB-M620VE Canon Network Camera VB-M620D Canon Network Camera VB-M720F Canon Network Camera VB-R11VE Canon Network Camera VB-R11 Canon Network Camera VB-R10VE Canon Network Camera VB-M641VE Canon Network Camera VB-M641V Canon Network Camera VB-M640VE Canon Network Camera VB-M640V Canon Network Camera VB-M741LE Canon Network Camera VB-M740E 1
1.3 Notation The following notation and text formatting are used in this document. “Courier New”
Indicates a code sample.
“Italic”
Indicates a parameter replaceable with an actual name or value.
“Verdana 0…50”
Indicates a parameter or setting value.
“”
Indicates a variable.
“Note:”
Indicates a special note or precaution.
“!”
Indicates an example of the occurrence of a phenomenon.
“XXXXXX ”
Indicates a reference document.
‘XXXXXX ’
Indicates a reference chapter or section.
2
2 Related Documents The Canon network camera server WebView protocol specifications include the following documents. ■ Protocol specifications Network Camera Server WebView Protocol Overview Network Camera Server WebView HTTP Protocol Specifications Network Camera Server WebView Settings Protocol Specifications Network Camera Server WebView Audio Protocol Specifications (this document) Network Camera Server WebView Data Protocol Specifications Network Camera Server WebView Memory Card Protocol Specifications
3
3 Terms Terms
Description
G711
Audio encoding standard designed by CCITT (currently ITU-T).
G711 μ law
Method specified as the G.711 compression/decompression characteristic (PCMU). A 14-bit signed linear PCM sample is logarithmically encoded to an 8bit value. Open Network Video Interface Forum. This is the interface standardization forum for network cameras. In this document, this refers to the standardization protocol. http://www.onvif.org Streams audio data from a server to the client direction. In this document, this refers to a transmission from a network camera to a computer.
ONVIF
Client-directed audio transmission Server-directed audio transmission
Streams audio data from a client to the server direction. In this document, this refers to a transmission from a computer to a network camera.
4
4 Protocol Overview The WebView audio protocol (“WV-AUDIO”) is a WebView protocol that provides a function for two-way audio streaming transmission. Note: VB-R10VE, VB-M640VE, VB-M640V, and VB-M740E do not have audio input/output terminals, so this function is not supported.
■ The following features are provided as audio-specific functions: - The audio codec supports the G711 μ law. - Full duplex audio communication is possible.
*1
- Client-directed audio transmission enables audio transmission to multiple clients at the same time. - Server-directed audio transmission is held by one client. Note: *1 Server-directed audio transmission is not supported by VB-S30D, VB-S31D, VB-S800D, VB-S900F, VB-S805D, or VB-S905F.
■ WV-AUDIO comprises the following three commands: Server status acquisition Client-directed audio transmission Server-directed audio transmission *The data portion of the audio transmission uses a shared audio stream. ■ The audio protocol is divided into the following two layers: - HTTP protocol Layer for wrapping the audio stream protocol using the GET or POST method - Audio stream protocol (x-wva-100) Layer for sending and receiving audio data in the message body of an HTTP request or response
5
Client
Canon network camera WAN
Client - User application
HTTP server
- Web browser
- WebView HTTP protocol - WebView settings protocol
Internet
- WebView audio protocol Client
- WebView data protocol
- User application
- WebView memory card protocol
- Web browser Router/firewall
HTTP request → ← HTTP response
LAN
Fig. 4-1
WebView Protocol Concept Diagram
6
5 WebView Audio Protocol Specifications 5.1 Interface Specifications The interface specifications of WV-AUDIO are described in the following order. Protocol Configuration Request Response User Privileges of User Access Control Function Possessory Rights of Speakers on Server Side Keep-Alive Codec Selection Connection Client
-
5.1.1
Protocol Configuration
5.1.1.1
Command List
The following are the functions provided by WV-AUDIO and the corresponding commands.
Server information acquisition Client-directed audio transmission Server-directed audio transmission Audio information acquisition
[info] [send] [recv] [status]
Note: For the commands supported by each model, see ‘A.1 List of Supported Commands ’.
5.1.1.2
Protocol Syntax
A WV-AUDIO command is made up of a command name and parameter. The following are the syntax conditions when specifying a command and parameter.
-
The parameter is in the form “=”. Command names and parameter are separated with “?”. The parameter is specified with the “&” separator in the URI query string. The parameter performs URL encoding. *1 The parameter name and value may be partially abbreviated with the “[...]” notation. *2 There are no limitations in the order of parameter specification. *3
7
Note: *1 Conversion is not required for alphanumeric characters (0-9, A-Z, a-z), “*” (asterisk), “-” (hyphen), “.” (period), “@” (at mark), and “_” (underscore). A space is converted to “+” (plus), and other characters are converted to “%”+2-digit hexadecimal in bytes. *2 Most parameters can be abbreviated under WV-AUDIO. Parameters that cannot be abbreviated are indicated with “Required”. *3 If a parameter is specified multiple times, only the last specified parameter is used unless it is a parameter that can be specified multiple times.
Example: http://192.168.100.1/-wvaudio-01-/recv?t=win-n-300&i=1000&l=100
8
5.1.2
Request
WV-AUDIO uses the three aforementioned commands to transmit audio. The command is received by the HTTP server of the network camera as an HTTP request. -
The WV-AUDIO protocol is not dependent on a specific HTTP version. The network cameras supported by this document are HTTP/1.1-compliant. GET or POST can be used as the HTTP method. *1 The URI is made up of a WV-AUDIO command or parameter that starts with “/-wvaudio-01-/”. The URI and message body are case-sensitive.
Note: *1 The info, send and status commands use GET, and the recv command uses POST.
Syntax: GET /-wvaudio-01-/[?…] HTTP/1.1
POST /-wvaudio-01-/[?…] HTTP/1.1 *1
Note: *1 When POST is used, the required information is specified to the message body as a parameter.
5.1.2.1
HTTP Request Header
The following is the HTTP request header field related to operation of WV-AUDIO. Host Connection Authorization *1 Content-Length *2 Content-Type *2
Note: *1 Authorization does not have to be specified for info. *2 Content-Length and Content-Type only apply for recv.
9
5.1.3
Response
Under WV-AUDIO, audio transmission data is sent from the HTTP server of the network camera as an HTTP response. Multiple packets that indicate the status of the server of the x-wva-100 stream enter the payload (Body section). Response: HTTP/1.1 200 OK Server: VBaudio/1.10 Connection: close or Keep-alive Content-Type: application/x-wva-100 Content-Length: Date: ... 0
5.1.3.1
HTTP Status
The processing result of the HTTP protocol level is returned with an HTTP status. The main return values and meanings are described below. Table 5-1
List of Returned HTTP Statuses
HTTP Status
Description
200 OK
Request was processed normally.
400 Bad Request
Request is invalid.
401 Unauthorized
User authentication failed.
404 Not Found
Undefined WV-AUDIO command specified.
*1
Note: *1 This occurs when a command other than info, send, recv or status is specified. Because VB-S30D, VB-S31D, VB-S800D, VB-S900F, VB-S805D, and VB-S905F do not support audio reception, “404 Not Found” is returned even for recv. In addition, VBR10VE, VB-M640VE, VB-M640V, and VB-M740E do not support the audio function, so “404 Not Found” is returned when any command is executed.
10
5.1.3.2
x-wva Stream Status
The values returned to resultcode as a result chunk are shown below. For details on result chunks, see ‘5.2.1.2 Result Chunk (resultcode_packet) ’. Table 5-2
x-wva Stream Status List
Error Code
Description
0x20
Processed normally.
0x40
A general error occurred. Note: This indicates an error that does not correspond to the error content listed in 0x41 or below.
0x41
An authentication error occurred.
0x42
The specified time conflicts with the maximum connection time limit. Note: The maximum connection time is limited by the “Maximum connection time (ha06)” setting value of the WebView settings protocol. See ‘5.4 Items Related to the WebView Settings Protocol ’.
0x43
The request related to resource allocation was denied due to insufficient memory or other reason. An unsupported codec was specified. Note: For the codec, see ‘Table 5-10 List of Transmission Codecs ’.
0x45 0x46
An unsupported stream was specified.
0x47
Access was denied due to the specified user level. Note: For the specified user level, see ‘5.3.3 Server-directed Audio Transmission [recv] ’.
0x49
Access was denied because the maximum number of connections was exceeded. Note: The maximum number of connections is limited by the “Maximum number of clients (ha03)” setting value of the WebView settings protocol. See ‘5.4 Items Related to the WebView Settings Protocol ’.
0x4a
0x4b
The request was denied due to the server mode setting. This indicates that the audio function is disabled. Note: The server mode is limited by the setting values of “Audio transmission setting (hb00)” and “Audio reception setting (hb10)” of the WebView settings protocol. See ‘5.4 Items Related to the WebView Settings Protocol ’. The file name is abnormal.
0x4d
An error occurred in the HTTP body.
0x4e
An exclusive operation was requested. Note: This occurs when audio is sent from the client to the camera on the ONVIF side.
11
5.1.4
User Privileges of User Access Control Function
The user access control function of the network camera manages the authentication information of administrators and authorized users. A user with anonymous access that does not require authentication is called a guest user. The administrator can use the WebView settings protocol to configure and change the control privileges for authorized and guest users. *1
Guest user
Authorized user Administrator
: Does not require authentication and is not registered to the user list. : Requires user authentication and is registered to the user list. : Requires authentication as an administrator.
The usage limits of client-directed audio transmission and other functions are controlled by the user privileges level in WV-AUDIO. Note: *1 For the administrator and guest and authorized user settings, see “■Administrator setting” and “ ■ Guest and authorized user setting” in ‘5.4 Items Related to the WebView Settings Protocol ’.
5.1.5
Possessory Rights of Speakers on Server Side
During server-directed audio transmission, one client possesses one speaker. The possessory rights of speakers are continually maintained by the client that secures the speaker first. When the client that possesses the speaker is disconnected, the possessory rights of the speaker are released at the same time. In addition, these rights are separate from camera control privileges, and the camera control privileges queue information and status change information, such as the releasing of the privileges, does not exist in the speaker possessory rights for audio transmission. Possessory rights are released when any of the conditions below apply. After possessory rights have been released, another client can acquire possessory rights as long as the user is an administrator. -
When the client with possessory rights that has a TCP connection maintained with Keep-Alive is disconnected When the client with possessory rights does not send a request using POST for 60 seconds When the TCP connection of the client with possessory rights is disconnected without specifying Keep-Alive *1 12
-
When the client with possessory rights does not send a request using POST for 15 seconds and another client sends a request by POST *2 Note: *1 If a request other than Keep-Alive is sent, after the response is returned, the TCP connection no longer exists, so this condition always applies. Therefore, to continue to acquire possessory rights, it is recommended that the connection be made with KeepAlive. *2 Even if there is no audio and no audio data to send, a request must be sent by POST so as not to have this condition apply and release the possessory rights.
5.1.6
Keep-Alive
Because multiple POST requests are used in server-directed audio transmissions, it is recommended that the TCP connection state be maintained with Keep-Alive. In addition, if max-keep-alive-requests*1 is exceeded, the TCP connection is disconnected on the server side, so to have the client make continual requests, another request must be made to establish a TCP connection. Note: *1 The number of requests that can be continually received while maintaining a TCP connection is set to 5000, and this may be changed in the future. In any case, the TCP connection must be reestablished regardless of the number of times.
5.1.7
Connection Client
The following are the privileges for allowing connection for each command. Command
User Privileges
Limit on Number of Connections
Server information acquisition (info) Client-directed audio transmission (send) Server-directed audio transmission (recv)
No Limit
No Limit
No Limit
Within the maximum number of clients *1
Administrator only
One client only
Note: *1 The maximum number of connections for client-directed audio transmission is limited by the “Maximum number of clients (ha03)” setting value of the WebView settings protocol. See ‘5.4 Items Related to the WebView Settings Protocol ’.
User authentication for administrator privileges is limited to one user. When sending client-directed audio from multiple clients, guest or authorized user privileges must also be used.
13
5.2 Information Item Specifications This describes the audio stream protocol for audio data transmission.
5.2.1
Audio Stream Protocol Specifications [x-wva100]
An audio stream uses the HTTP/1.1 chunked form, and audio data or information related to audio data transmission is sent as a single chunk. Chunk information is described in the message body of the HTTP response as shown below. Syntax:
... 0
*1
Note: *1 and are one set. indicates the number of bytes of , and indicates the returned chunk information. All values are expressed in hexadecimal. The final “0” indicates the end of the data.
The details of the chunk information are described below by the type of chunk information.
14
5.2.1.1
NULL Chunk (null_packet)
This indicates a null chunk. It is for padding. Table 5-3
Audio Stream Protocol (NULL Chunk)
Field Name
Byte Width
Value
id
1byte
0x00
5.2.1.2
Result Chunk (resultcode_packet)
This chunk stores request result information as a response header packet. Table 5-4
Audio Stream Protocol (Result Chunk)
Field Name
Byte Width
Value
id
1byte
0x01
resultcode
1byte
This indicates the result code for the request. Note: For the result code x-wva Stream status, see ‘5.1.3.2 x-wva Stream Status ’.
5.2.1.3
Audio Chunk (audio_packet)
This chunk stores audio data. Table 5-5
Audio Stream Protocol (Audio Chunk)
Field Name
Byte Width
Value
id
1byte
0x02
reserve
1byte
Reserved area Note: Specifies 0.
difftime
4byte
Relative time from the previous time information chunk (time_packet) Note: Unit is 10 ms. *1
data
80byte
Audio data
Note: *1 This can be used in combination with the audio capture time of the time information chunk (time_packet) to detect audio skipping.
15
5.2.1.4
Silent Chunk (silentnoise_packet)
This chunk indicates silence. This is primarily used when transitioning from sound to no sound or when there is a change in the no-sound level. During client-directed audio transmission, a silent chunk is sent approximately once every five seconds even when the server has no change in the no-sound level. Table 5-6
Audio Stream Protocol (Silent Chunk)
Field Name
Byte Width
Value
id
1byte
0x04
cngpower
1byte
Noise level Note: Relative value between 0 and 255
difftime
4byte
Relative time from the previous time information chunk (time_packet) Note: Unit is 10 ms. *1
Note: *1 This can be used in combination with the audio capture time of the time information chunk (time_packet) to detect audio skipping.
5.2.1.5
End Chunk (endofstream_packet)
This chunk indicates the end of an audio stream. This must be declared separately from the end of HTTP/1.1 chunk encoding. Table 5-7
Audio Stream Protocol (End Chunk)
Field Name
Byte Width
Value
id
1byte
0x05
16
5.2.1.6
Time Information Chunk (time_packet)
This chunk indicates the time information. This stores the standard time for the relative time that is given to the audio data sent from the audio data sender to the destination. Table 5-8
Audio Stream Protocol (Time Information Chunk)
Field Name
Byte Width
Value
id
1byte
0x06
reserve
1byte
Reserved area Note: Specifies 0.
time_msec
2byte
Time equal or below time Note: Unit is 10 ms.
time
4byte
Audio capture time Note: This is the number of seconds that have elapsed since UTC 1970/01/01/0 h (00:00:00).
5.2.1.7
Transmission Codec Information Chunk (codec_packet)
This chunk indicates the codec of the audio data to be transmitted. Table 5-9
Audio Stream Protocol (Transmission Codec Information Chunk)
Field Name
Byte Width
Value
id
1byte
0x07
codec
1byte
Audio data codec to be transmitted
Note: *1 The code values of the codec are shown below. *Note that they are not the character strings used in a query string. Table 5-10
List of Transmission Codecs
Codec Code Number
Codec String
0x00
non
0x01
G711
0x02
G711μlaw
0x03
G711alaw
17
*1
5.2.1.8
Codec Information for Transmission by Server Chunk (codeclist_packet)
This is an audio codec list chunk that is supported by the audio data sender. Table 5-11
Audio Stream Protocol (Codec Information for Transmission by Server Chunk)
Field Name
Byte Width
Value
id
1byte
0x08
server_support_list
16byte
Codec list supported by the audio data sender
*1
Note: *1 This is expressed with one byte per codec, and up to 16 codecs can be listed. 0xff indicates that it is undefined, and if there are 16 or less supported codecs, the remaining must be embedded with 0xff. The code values of the codecs specified to server_support_list are shown below. Table 5-12
List of Codecs of Codec Information for Transmission by Server
Codec Code Number
Codec String
0x00
(Codec not specified)
0x01
G711
0x02
G711μlaw
0x03
G711alaw
0xff
Undefined
5.2.1.9
Packet ID Information Chunk (packetid_packet)
This chunk stores the packet ID that indicates the command call order using the recv command. Table 5-13
Audio Stream Protocol (Packet ID Information Chunk)
Field Name
Byte Width
Value
id
1byte
0x09
reserve
1byte
Reserved area Note: Specifies 0.
packet_id
4byte
Packet ID
*1
Note: *1 The packet ID information chunk is included in each recv command response and returned, so the previously returned packet ID is used when the call side calls the next command. Note that the packet ID is a value created arbitrarily and randomly on the issuing side.
18
5.2.1.10 Protocol Version Information Chunk (protocolversion_packet) This chunk stores the protocol version. Table 5-14
Audio Stream Protocol (Protocol Version Information Chunk)
Field Name
Byte Width
Value
id
1byte
0x0a
reserve
1byte
Reserved area Note: Specifies 0.
protocol_version
2byte
Protocol version
*1
Note: *1 This is 100 (decimal) for x-wva-100 streams. When the version is 1.02 or 3.43, the version information is respectively expressed as “102” or “343”.
5.2.1.11 Server Mode Information Chunk (servermode_packet) This chunk indicates whether audio data can be transmitted on the server side. Table 5-15
Audio Stream Protocol (Server Mode Information Chunk)
Field Name
Byte Width
Value
id
1byte
0x0b
mode
1byte
Status indicating whether audio data can be transmitted *1
Note: *1 The content indicated by mode is shown below. MSB 1bit : Audio reception OFF (0) / ON (1) MSB 2bit : Audio sending OFF (0) / ON (1) mode has the following four values. 0x00 : Sending and reception are both OFF 0x80 : Reception only is ON 0x40 : Sending only is ON 0xc0 : Sending and reception are both ON
19
5.3 Command Specifications This describes the WV-AUDIO command specifications.
5.3.1
Server Information Acquisition [info]
The following information is acquired from the server. To confirm the supported codecs, they must be executed before transmitting the audio data. Supported codec information (codeclist_packet) Protocol version information (protocolversion_packet) Server mode information (servermode_packet) Note: For details about compatible models, see ‘A.1 List of Supported Commands ’.
5.3.1.1
Commands
Syntax: http:///-wvaudio-01-/info
5.3.1.2
Response
A. Successful Response HTTP Code
:200 OK
Content-Type
:application/x-wva-100
MessageBody
:
0
20
Return value: Return Value
Byte Width
Description
2byte
17byte
Chunk information data size (hexadecimal notation) Codec information for transmission by server chunk
4byte
Protocol version information chunk
2byte
Server mode information chunk
1byte
End chunk
Note: For details on the packet information by chunk, see ‘5.2.1 Audio Stream Protocol
Specifications [x-wva-100] ’.
B. Error Response [HTTP Protocol Error] HTTP status return value: HTTP Status
Description
400 Bad Request
Request is invalid. ! Invalid parameter specified.
*1
401 Unauthorized
User authentication failed. ! Executed without passing the required authentication procedure.
*2
404 Not Found
Undefined WV-AUDIO command specified. ! Command other than info, send, or recv was executed. * This error is returned for models VB-S30D, VB-S31D, VB-S800D, VB-S900F, VB-S805D, and VB-S905F, even when recv is executed.
Note: *1 This command does not have parameters, but a check for a query string is performed. *2 Although this command does not require authentication, a check is performed if the authentication information is set.
21
C. Error Response [Audio Stream Protocol Error] This is the case where an error does not occur as HTTP. HTTP Code
:200 OK
Content-Type :application/x-wva-100 MessageBody
:
0
Audio stream protocol error return value: Return Value
Byte Width
Description
2byte
Chunk information data size (hexadecimal notation)
2byte
Result chunk
1byte
End chunk
Note: For details on the packet information by chunk, see ‘5.2.1 Audio Stream Protocol Specifications [x-wva-100] ’.
22
5.3.1.3
Protocol Examples
The following are protocol examples. The chunk data returned as the response and the data size are hexadecimal. Binary data is enclosed in square brackets ([ ]). Note: The audio protocol version of the “Server” header returned at response varies depending on the model. See ‘A.2 List of Server Versions ’.
Normal GET /-wvaudio-01-/info HTTP/1.1 Host: Connection:Keep-Alive
HTTP/1.1 200 OK Server: VBaudio/1.10 Content-Type: application/x-wva-100 Content-Length: 11[CR][LF] [0x08 0x02 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff][CR][LF] 4[CR][LF] [0x0a 0x00 0x00 0x64][CR][LF] 2[CR][LF] [0x0b 0xc0][CR][LF] 1[CR][LF] [0x05][CR][LF] 0[CR][LF] [CR][LF]
Note: Examples of the content of the chunk data returned at normal response are shown below. Table 5-16
List of Data at Normal Response to Server Information Acquisition
Data Name
Size
Value Examples
0x11
0x08 0x02 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff
0x04
0x0a 0x00 0x00 0x64
0x02
0x0b 0xc0
0x01
0x05
23
Error (Audio Stream Protocol Error) GET /-wvaudio-01-/info HTTP/1.1 Host: Connection:Keep-Alive
HTTP/1.1 200 OK Server: VBaudio/1.10 Content-Type: application/x-wva-100 Content-Length: 18 2[CR][LF] [0x01 0x4a][CR][LF] 1[CR][LF] [0x05][CR][LF] 0[CR][LF] [CR][LF]
Note: Examples of the content of the chunk data returned at error response are shown below. Table 5-17
List of Data at Error Response to Server Information Acquisition
Data Name
Size
Value Examples
0x02
0x01 0x4a
0x01
0x05
Error (HTTP Protocol Error) GET /-wvaudio-01-/info HTTP/1.1 Host: Connection:Keep-Alive
HTTP/1.1 401 Unauthorized Server: VBaudio/1.10 Content-Type: application/x-wva-100
24
5.3.2
Client-directed Audio Transmission [send]
This sends a request to stream audio data from the server to the client direction. The audio stream is continually downloaded by using one GET method. Note: For details about compatible models, see ‘A.1 List of Supported Commands ’.
5.3.2.1
Commands
Syntax: http:///-wvaudio-01-/send?t=[&c=&s=& p=&l=]
Parameters: Parameter
Value Type / Range
Description
c=
g711ulaw
s=
x-wva-100
Specifies the codec name. (Separate with commas when specifying multiple names.) Note: When omitted, this is “g711ulaw”. (Only supported by this codec.) Specifies the protocol name. Note: When omitted, this is “x-wva-100”. (Only supported by this protocol.)
p=
0…
Send data playback time Note: When omitted, this is “0”.
*2
l =
0…100
Client user level Note: When omitted, this is “0”.
*3
t=
Client application identifier [Required] *1 Note: Specified with nine arbitrary characters.
Note: *1 The client application identifier must be specified, but the server only performs a check as a string. *2 Playback time is in units of 10 msec. When 0 is specified, it is an infinite length. When a value that exceeds the maximum connection time setting of the camera server is specified, send is denied. The maximum value of the playback time of send data is limited by the “Maximum connection time (ha06)” setting value for a general session of the WebView settings protocol. See ‘5.4 Items Related to the WebView Settings Protocol ’.
25
*3 The following is the setting range of the client user level. 0-99 : Standard client 100 : Administrator client For the user level, see ‘5.1.4 User Privileges of User Access Control Function ’. If an administrator client is specified by a user other than an administrator user, an HTTP 401 error occurs.
5.3.2.2
Response
A. Successful Response HTTP Code
:200 OK
Content-Type
:application/x-wva-100
Connection
:close
MessageBody
:
・・・・・・ 0
Return value: Return Value
Byte Width
Description
2byte
Chunk information data size (hexadecimal notation)
2byte
Transmission codec information chunk
8byte
Time information chunk
86byte
Audio chunk
1byte
End chunk
Note: For details on the packet information by chunk, see ‘5.2.1 Audio Stream Protocol
Specifications [x-wva-100] ’.
26
B. Error Response [HTTP Protocol Error] HTTP status return value: HTTP Status
Description
400 Bad Request
Request is invalid. ! Invalid parameter specified.
401 Unauthorized
User authentication failed. ! Executed without passing the required authentication procedure. ! 100 was specified to the client user level (1) by a user other than an administrator. Undefined WV-AUDIO command specified. ! Command other than info, send, or recv executed. * This error is returned for models VB-S30D, VB-S31D, VB-S800D, VB-S900F, VB-S805D, and VB-S905F, even when recv is executed.
404 Not Found
C. Error Response [Audio Stream Protocol Error] HTTP Code
:200 OK
Content-Type :application/x-wva-100 Connection
:close
MessageBody
:
0
Audio stream protocol error return value: Return Value
Byte Width
Description
2byte
Chunk information data size (hexadecimal notation)
2byte
Result chunk
1byte
End chunk
Note: For details on the packet information by chunk, see ‘5.2.1 Audio Stream Protocol Specifications [x-wva-100] ’.
27
5.3.2.3
Protocol Examples
The following are protocol examples. The chunk data returned as the response and the data size are hexadecimal. Binary data is enclosed in square brackets ([ ]). Note: The audio protocol version of the “Server” header returned at response varies depending on the model. See ‘A.2 List of Server Versions ’.
Normal GET /-wvaudio-01-/send?t=win-n-300 HTTP/1.1 Host: Connection:Keep-Alive Authorization:
HTTP/1.1 200 OK Server: VBaudio/1.10 Content-Type: application/x-wva-100 Connection: close 2[CR][LF] [0x07 0x02][CR][LF] 8[CR][LF] [0x06 0x00 0x00 0x0d 0x52 0x54 0xE7 0xE6][CR][LF] 56[CR][LF] [0x02 0x00 0x00 0x00 0x00 0x00 0xFF 0x7F 0x7F [CR][LF] ・・・・・・ 1[CR][LF] [0x05][CR][LF] 0[CR][LF] [CR][LF]
…
0xFF
0xFF]
Note: Examples of the content of the chunk data returned at normal response are shown below. Table 5-18
List of Data at Normal Response to Client-directed Audio Transmission
Data Name
Size
Value Examples
0x02
0x07 0x02
0x08
0x06 0x00 0x00 0x0d 0x52 0x54 0xE7 0xE6
0x56
0x02 0x00 0x00 0x00 0x00 0x00 0xFF 0x7F 0x7F … 0xFF 0xFF
0x01
0x05
28
Error (Audio Stream Protocol Error) GET /-wvaudio-01-/send?t=win-n-300 HTTP/1.1 Host: Connection:Keep-Alive Authorization:
HTTP/1.1 200 OK Server: VBaudio/1.10 Content-Type: application/x-wva-100 Content-Length: 18 Connection: close 2[CR][LF] [0x01 0x4a][CR][LF] 1[CR][LF] [0x05][CR][LF] 0[CR][LF] [CR][LF]
Note: Examples of the content of the chunk data returned at error response are shown below. Table 5-19
List of Data at Error Response to Client-directed Audio Transmission
Data Name
Size
Value Examples
0x02
0x01 0x4a
0x01
0x05
Error (HTTP Protocol Error) GET /-wvaudio-01-/send?t=win-n-300 HTTP/1.1 Host: Connection:Keep-Alive
HTTP/1.1 401 Unauthorized Server: VBaudio/1.10 Content-Type: application/x-wva-100
29
5.3.3
Server-directed Audio Transmission [recv]
This sends a request to stream audio data from the client to the server direction. Audio data is repeatedly uploaded to the stream using the POST method. Note: For details about compatible models, see ‘A.1 List of Supported Commands ’.
5.3.3.1
Commands
Syntax: http:///-wvaudio-01-/recv?t=[&i=&c=& s=&p=&l=]
Preconditions and requirements:
-
Administrator privileges are required to execute this command.
Parameters: Parameter
Value Type / Range
Description
t=
Client application identifier [Required] *1 Note: Specified with nine arbitrary characters.
i=
Packet ID Note: Specifies a 32-bit decimal positive value.
c=
g711ulaw
s=
x-wva-100
p=
0…
l=
0…100
*2
Specifies the codec name. (Separate with commas when specifying multiple names.) Note: When omitted, this is “g711ulaw”. (Only supported by this codec.) Specifies the protocol name. Note: When omitted, this is “x-wva-100”. (Only supported by this protocol.) Send data playback time *3 Note: Invalid item Client user level Note: When omitted, this is “0”.
30
[Required] *4
Note: *1 The client application identifier must be specified, but the server only performs a check as a string. *2 Initially, the packet ID is not specified, and thereafter, the value returned with the previous packet ID information chunk is set. *3 The playback time value exists to be shared with the send command. This is an invalid item and is ignored even if a value is specified. *4 The following is the setting range of the client user level. 0-99 : Standard client 100 : Administrator client For the user level, see ‘5.1.4 User Privileges of User Access Control Function ’. Execution of the recv command requires administrator privileges, and if a value other than “100” is specified, x-wva Stream status 0x47 “Access denied due to specified user level” is returned to the result chunk.
5.3.3.2
Response
A. Successful Response HTTP Code
:200 OK
Content-Type
:application/x-wva-100
MessageBody
:
0
Return value: Return Value
Byte Width
Description
2byte
Chunk information data size (hexadecimal notation)
2byte
Result chunk
6byte
Packet ID information chunk
1byte
End chunk
Note: For details on the packet information by chunk, see ‘5.2.1 Audio Stream Protocol
Specifications [x-wva-100] ’.
31
B. Error Response [HTTP Protocol Error] HTTP protocol error return value: HTTP Status
Description
400 Bad Request
Request is invalid. ! Invalid parameter specified.
401 Unauthorized
User authentication failed. ! Executed without passing the required authentication procedure. ! A user other than administrator performed an operation.
404 Not Found
Undefined WV-AUDIO command specified. ! Command other than info, send, or recv was executed. * This error is returned for models VB-S30D, VB-S31D, VB-S800D, VB-S900F, VB-S805D, and VB-S905F, even when recv is executed.
C. Error Response [Audio Stream Protocol Error] HTTP Code
:200 OK
Content-Type :application/x-wva-100 Connection
:close
MessageBody
:
0
Audio stream protocol error return value: Return Value
Byte Width
Description
2byte
Chunk information data size (hexadecimal notation)
2byte
Result chunk
1byte
End chunk
Note: For details on the packet information by chunk, see ‘5.2.1 Audio Stream Protocol
Specifications [x-wva-100] ’.
32
5.3.3.3
Protocol Examples
The following are protocol examples. The chunk data assigned at the time of request, the chunk data returned as the response, and the data size for each are hexadecimal. Binary data is enclosed in square brackets ([ ]). Note: The audio protocol version of the “Server” header returned at response varies depending on the model. See ‘A.2 List of Server Versions ’.
Normal (First time) POST /-wvaudio-01-/recv?t=win-n-300&l=100 HTTP/1.1 Host: Connection: Keep-Alive Authorization: Content-Type: application/x-wva-100 Content-Length: 2[CR][LF] *1 [0x07 0x02][CR][LF] 8[CR][LF] [0x06 0x00 0x00 0x0d 0x52 0x54 0xE7 0xE6][CR][LF] 56[CR][LF] [0x02 0x00 0x00 0x00 0x00 0x00 0xFF 0x7F 0x7F … 0xFF [CR][LF] 0[CR][LF] [CR][LF]
0xFF]
HTTP/1.1 200 OK Server: VBaudio/1.10 Content-Type: application/x-wva-100 Content-Length: 2[CR][LF] *2 [0x01 0x20][CR][LF] 6[CR][LF] [0x09 0x00 0x37 0x61 0xA7 0x9D][CR][LF] 1[CR][LF] [0x05][CR][LF] 0[CR][LF] [CR][LF]
Note: *1 Examples of the content of the chunk data assigned at the time of request are shown below. * Transmission codec information and a time information codec must be assigned at the time of the initial request.
33
Table 5-20
List of Assignable Data at the Time of Server-directed Audio Transmission Request
Data Name
Size
Value Examples
0x02
0x07 0x02
0x08
0x06 0x00 0x00 0x0d 0x52 0x54 0xE7 0xE6
0x56
0x02 0x00 0x00 0x00 0x00 0x00 0xFF 0x7F 0x7F … 0xFF 0xFF
*2 Examples of the content of the chunk data returned at normal response are shown below. Table 5-21
List of Data at Normal Response to Server-directed Audio Transmission
Data Name
Size
Value Examples
0x02
0x01 0x20
0x06
0x09 0x00 0x37 0x61 0xA7 0x9D
0x01
0x05
34
Normal (Second time) POST /-wvaudio-01-/recv?i= &l=100 HTTP/1.1 Host: Connection: Keep-Alive Authorization: Content-Length: 56[CR][LF] *2 [0x02 0x00 0x00 0x00 0x00 0x00 0xFF 0x7F 0x7F … 0xFF [CR][LF] 56[CR][LF] [0x02 0x00 0x00 0x00 0x00 0x00 0xFF 0x7F 0x7F … 0xFF [CR][LF] 56[CR][LF] [0x02 0x00 0x00 0x00 0x00 0x00 0xFF 0x7F 0x7F … 0xFF [CR][LF] ・・・・・ 0[CR][LF] [CR][LF]
*1
0xFF]
0xFF]
0xFF]
HTTP/1.1 200 OK Server: VBaudio/1.10 Content-Type: application/x-wva-100 Content-Length: 2[CR][LF] *3 [0x01 0x20][CR][LF] 6[CR][LF] [0x09 0x00 0x37 0x61 0xA7 0x9D][CR][LF] 1[CR][LF] [0x05][CR][LF] 0[CR][LF] [CR][LF]
Note: *1 To , specify packet_id of the packet ID information chunk returned at the time of the initial response. *2 For the second request and thereafter, multiple audio data chunks can be sent together. *3 For examples of the content of the chunk data returned at normal response, see ‘Table 5-21 List of Data at Normal Response to Server-directed Audio Transmission ’.
35
Error (Audio Stream Protocol Error) POST /-wvaudio-01-/recv?t=win-n-300&l=100 HTTP/1.1 Host: Connection: Keep-Alive Authorization: Content-Type: application/x-wva-100 Content-Length: 2[CR][LF] *1 [0x07 0x02][CR][LF] 8[CR][LF] [0x06 0x00 0x00 0x0d 0x52 0x54 0xE7 0xE6][CR][LF] 56[CR][LF] [0x02 0x00 0x00 0x00 0x00 0x00 0xFF 0x7F 0x7F … 0xFF [CR][LF] 0[CR][LF] [CR][LF]
0xFF]
HTTP/1.1 200 OK Server: VBaudio/1.10 Content-Type: application/x-wva-100 Content-Length: 18 Connection: close 2[CR][LF] *2 [0x01 0x4a][CR][LF] 1[CR][LF] [0x05][CR][LF] 0[CR][LF] [CR][LF]
Note: *1 For examples of the content of the chunk data assigned at the time of request, see ‘Table 5-20 List of Assignable Data at the Time of Server-directed Audio Transmission Request ’. *2 Examples of the content of the chunk data returned at error response are shown below. Table 5-22
List of Data at Error Response to Server-directed Audio Transmission
Data Name
Size
Value Examples
0x02
0x01 0x4a
0x01
0x05
36
Error (HTTP Protocol Error) POST /-wvaudio-01-/recv?t=win-n-300&l=100 HTTP/1.1 Host: Connection: Keep-Alive Content-Type: application/x-wva-100 Content-Length: 2[CR][LF] [0x07 0x02][CR][LF] 8[CR][LF] [0x06 0x00 0x00 0x0d 0x52 0x54 0xE7 0xE6][CR][LF] 56[CR][LF] [0x02 0x00 0x00 0x00 0x00 0x00 0xFF 0x7F 0x7F … 0xFF [CR][LF] 0[CR][LF] [CR][LF]
0xFF]
HTTP/1.1 401 Unauthorized Server: VBaudio/1.10 Content-Type: application/x-wva-100
Note: For examples of the content of the chunk data assigned at the time of request, see ‘Table 520 List of Assignable Data at the Time of Server-directed Audio Transmission Request ’.
37
5.3.4
Audio information acquisition [status]
Acquire the camera input audio level as audio information. Note: When the protocol version of the “Server” header returned at command execution is “VBaudio/1.10”, the command for acquiring audio information can be used. For details about compatible models, see ‘A.1 List of Supported Commands ’.
5.3.4.1
Commands
Syntax: http:///-wvaudio-01-/status?pretime=
Parameters: Parameters
Value Type / Range
pretime=
0…100
Description Acquisition time range [Required]*1 Note: Unit is 10 ms. When this is not specified, it is 1.
Note: *1 For example, when 1 is specified, the data between “specified time and specified time -10 ms” is returned.
5.3.4.2
Response
A. Successful Response HTTP Code
:200 OK
Content-Type
:text/plain
MessageBody
:
timestamp=4091.450 InputVolume=10,100,250 Return value: Return Value
Value Type / Range
timestamp=
.
Description
Time stamp when acquisition data is returned
38
Return Value
Value Type / Range
InputVolume=
0…255
Description
Camera Input Volume Level *1 Note: Volume every 10 ms. The number fluctuates according to the pretime value.
Note: *1
This is returned with comma separation every 10 ms for the acquisition time portion specified with pretime. The start value is the oldest value, and the last value is the value acquired at the time of the timestamp.
B. Error Response [HTTP Protocol Error] HTTP status return value: HTTP Status
Description
400 Bad Request
Request is invalid. ! Invalid parameter specified.
401 Unauthorized
User authentication failed. ! Executed without passing the required authentication procedure.
404 Not Found
Undefined WV-AUDIO command specified. ! Command other than info, send, recv or status was executed. * This error is returned for models VB-S30D, VB-S31D, VB-S800D, VB-S900F, VB-S805D, and VB-S905F, even when recv is executed.
5.3.4.3
Protocol Examples
The following are protocol examples.
Note: The audio protocol version of the “Server” header returned at response varies depending on the model. See ‘A.2 List of Server Versions ’.
39
Normal GET /-wvaudio-01-/status?pretime=10 HTTP/1.1 Host: Connection:Keep-Alive Authorization:
HTTP/1.1 200 OK Server: VBaudio/1.10 Content-Type: text/plain Connection: close timestamp=4091.450 InputVolume=10,20,20,50,100,150,180,200,250,100 [CR][LF]
Error (HTTP Protocol Error) GET /-wvaudio-01-/status?pretime=10 HTTP/1.1 Host: Connection:Keep-Alive
HTTP/1.1 401 Unauthorized Server: VBaudio/1.10 Content-Type: text/plain
40
5.4 Items Related to the WebView Settings Protocol Among the settings of the WebView settings protocol, the following are related items for when using the commands of the WV-AUDIO.
Administrator setting Executing server-directed audio transmission (recv) with WV-AUDIO requires user authentication as an administrator. The administrator user information is managed with the following item. WebView settings protocol: System information
Parameter
Default Setting
Description
aa00
root
Admin user name
aa01
camera
Administrator password
aa02
camera
Administrator password (for confirmation)
See ‘5.4.1 System Information ’ in “Network Camera Server WebView Settings Protocol Specifications ”.
Guest and authorized user setting To use the audio transmission command with WV-AUDIO requires that audio transmission privileges be assigned to the target user. The settings for assigning audio transmission privileges to guest and authorized users are managed with the following items. WebView settings protocol: User access control
Parameter
Default Setting
Description Authorized user list (register up to 50 users)
gb00 gb13
Yes
Authorized user audio transmission privilege setting
gb33
Yes
Guest user audio transmission privilege setting
See ‘5.4.12 Security ’ in “Network Camera Server WebView Settings Protocol Specifications ”.
41
HTTP authentication setting The WV-AUDIO administrator and authorized users must have HTTP Basic authentication or Digest authentication. The authentication setting information is managed with the following item. WebView settings protocol: HTTP server
Parameter
Default Setting
Description
ia06
Digest authentication
HTTP authentication method
See ‘5.4.9 Servers ’ in “Network Camera Server WebView Settings Protocol Specifications ”.
Note: The HTTP server of these models supports Basic and Digest authentication. The authentication method cannot support both authentication types at the same time; set one authentication method on the Setting Page. By default, Digest authentication is set, and if the authentication method is changed, the system must be restarted. If a request is received with an appended authentication information header that differs from the authentication method requested by the server, the client that made the request is asked for re-authentication. The HTTP request fails unless the correct authentication information is input for the re-authentication request (401: Unauthorized).
Audio transmission client The control settings for the client requesting audio transmission under WVAUDIO are managed with the following items. WebView settings protocol: Camera server
Parameter
Default Setting
Description
ha03
30
Maximum number of clients
ha06
0
Maximum connection time
See ‘5.4.9 Servers ’ in “Network Camera Server WebView Settings Protocol Specifications ”.
Note: If the audio protocol does not perform communication for 60 seconds, it is disconnected due to a timeout.
42
Server mode setting The settings for enabling and disabling the audio transmission from the network camera server and audio reception from the client under WV-AUDIO are managed with the following items. WebView settings protocol: Audio server
Parameter
Default Setting
Description
hb00
Disabled
Audio transmission setting
hb01
50
Input volume
hb03
Off
Input voice activity detection
hb06
Off
Slope filter
hb30
Line In
Audio input connection method
See ‘5.4.9 Servers ’ in “Network Camera Server WebView Settings Protocol Specifications ”.
43
Appendix A List of Specification Differences by Function and Series
The following lists the differences in models by network camera function and series. This summarizes the difference between the list of supported commands that can be used for each series and the server version information returned at response.
A.1
VB-S30D/VB-S31D/VB-S800D/VB-S900F VB-S805D/VB-S905F VB-H43/VB-H630VE/VB-H630D/VB-H730F VB-M42/VB-M620VE/VB-M620D/VB-M720F VB-R11VE/VB-R11/VB-M641VE/VB-M641V/VB-M741LE VB-R10VE/VB-M640VE/VB-M640V/VB-M740E
List of Supported Commands
The following are the audio protocol commands that are supported by series.
Model Name by Series VB-S30D/VB-S31D/VB-S800D/VB-S900F VB-S805D/VB-S905F VB-H43/VB-H630VE/VB-H630D/VB-H730F VB-M42/VB-M620VE/VB-M620D/VB-M720F VB-R11VE/VB-R11/VB-M641VE/VB-M641V/VB-M741LE VB-R10VE/VB-M640VE/VB-M640V/VB-M740E
Command Name info send recv 〇 〇 × 〇 〇 × 〇 〇 〇 〇 〇 〇 〇 〇 〇 × × ×
status × × × × 〇 ×
〇: supported, ×: not supported
A.2
List of Server Versions
The following are the audio protocol versions of the “Server” header returned at response after command execution of the audio protocol. Model Name by Series VB-S30D/VB-S31D/VB-S800D/VB-S900F VB-S805D/VB-S905F VB-H43/VB-H630VE/VB-H630D/VB-H730F VB-M42/VB-M620VE/VB-M620D/VB-M720F VB-R11VE/VB-R11/VB-M641VE/VB-M641V/VB-M741LE
Version Information VBaudio/1.00 VBaudio/1.00 VBaudio/1.00 VBaudio/1.00 VBaudio/1.10
(End)
44