4) VN-E4 sends out JPEG data after returning the response.
JPEG files will be sent out continuously. Responses and JPEG data sent out by VN-E4 are as follows.
Responses
JPEG (No. 1)
JPEG (No. 2)
A 12-byte header will be added to the beginning of the JPEG file when header=1 is specified in the API
parameter.
Responses
header (12-byte)
JPEG (No. 1)
header (12-byte)
JPEG (No. 2)
Details on the header structure and JPEG file format will be explained later.
5) When the client wants to stop current JPEG transmission, the client disconnects TCP8009.
VN-E4 does not accept further API via current TCP that is used for JPEG transmission. To change parameters,
disconnect current TCP to stop the JPEG transmission, connect new TCP, and send API with new parameter.
5
1. Acquiring JPEG from VN-E4 via HTTP _ 1.2. API Format
1.2. API Format
Structure
GETSpaceAPI Character StringSpaceHTTP/1.10x0D 0x0A
Host:SpaceIP Address of VN-E40x0D 0x0A 0x0D 0x0A
Unlike parameter acquisition/setting, Accept line is not required. Basic authentication is also not necessary.
Parameter values are indicated using =. Do not insert space before and after =.
Example input=1
Parameters are segmented using &. Do not insert space before and after &.
Example input=1&framesize=vga
There is no need to specify all parameters. Default values will be used for parameters that are not specified.
Parameter Description
inputFor specifying the input video channel. For example, specify as input=4 when acquiring CH4. Specify as either
1, 2, 3 or 4.
framesizeFor specifying the frame size. Specify as framesize=vga when acquiring VGA and framesize=qvga when
acquiring QVGA.
framerateFor specifying the frame rate. For example, specify as framerate=5 when acquiring at 5 fps. Specify as
framerate=-5 to acquire at 1/5 fps, or in other words, 1 frame in 5 seconds. Selection range is as follows.
Only 1 frame of the JPEG data will be sent when the parameter is specified as framerate=0. In this case, VNE4 will disconnect TCP after 5 seconds if this is not disconnected by the client.
headerFor specifying whether to add a 12-byte header to the JPEG data. Default value is 0.
Header format is as follows. The first 4 bytes (0x00000001) indicate that the payload is a JPEG data.
0x00000001
JPEG size in bytes
Time stamp (Unit: 8 kHz)
assured VN-E4 temporarily saves up to 2.5 seconds of the compressed data. Specify as assured=0 to request for the
latest data that is temporarily saved and assured=1 to request for the oldest data. Specify as assured=0 to
shorten the delay time. To acquire as many frames as possible in a network where delay fluctuates, it is
recommended that this be specified as assured=1. Default value is 0.
sendbufferUse this to increase the send buffer size. Default value is 16. Window scale will be enlarged upon increasing
the send buffer size, hence enhancing the transmission volume on networks with considerable delay. The send
buffer size may be increased up to 1024. When the send buffer size has already been increased to 1024 by other
clients, sendbuffer will remain as the default value even if a larger value is specified Refer to "10. Advanced
Topics" on countermeasures against network delays.
6
1. Acquiring JPEG from VN-E4 via HTTP _ 1.3. Response
1.3. Response
When API is successfully received
VN-E4 will return 200 OK. Content-length indicates file size of first JPEG in bytes. The x-vne4_response line indicates current values of all
parameters used for JPEG encoding.
When VN-E4 fails to realize the requested frame rate
Depending on the frame rate settings of VN-E4, transmission may not be possible at the frame rate requested by API. For example, when VNE4 is set to 15 fps, transmission will only be possible at 15 fps even if the client requests for 30 fps. When VN-E4 is set to 15 fps and 10 fps is
requested by the client, transmission will be carried out at 7.5 fps to enable transmission at equal time intervals.
The actual transmission frame rate is stated in the x-vne4_response line.
Frame rate encoded by VN-E4 can be changed using the web setting page or API for setting. Frame rate of data
that are currently being transmitted will remain unchanged even if the frame rate to encode is increased. When
the frame rate to encode is reduced, however, this value will become the upper limit of the transmission frame
rate.
When the specified input channel and frame size are not available
For example, when QVGA encoding of CH4 is set to off at VN-E4, transmission will fail if the client requests for QVGA of CH4. When this
occurs, VN-E4 will return an error response together with a PNG file. "Not Encoded" image is written in the PNG file.
ExampleHTTP/1.1 456 Header Field Not Valid for Resource<CRLF>
(This is followed by a PNG file which includes the "Not Encoded" message.)
7
1. Acquiring JPEG from VN-E4 via HTTP _ 1.4. Restrictions
1.4. Restrictions
䡵 Access restriction
VN-E4 comes with a feature that enables it to deny access from a specific IP address. If access from the IP address of the client is denied,
VN-E4 will disconnect the TCP connection immediately after TCP is connected via the port number 8009.
䡵 Restriction by maximum bitrate of VN-E4
The maximum distribution capacity of VN-E4 is 40 Mbps. VN-E4 will return an error (503 Service Unavailable) when the distribution
capacity is exceeded due to the API’s request. In this case, VN-E4 will disconnect TCP after 5 seconds if this is not disconnected by the
client.
䡵 Number of clients
The maximum number of clients for which TCP can connect to 8009 is 10. When a connection is made to TCP8009 by an 11th client, this
will be disconnected by VN-E4 immediately after the TCP connection is made.
8
1. Acquiring JPEG from VN-E4 via HTTP _
1.5. JPEG File Format Sent Out by VN-E4
1.5. JPEG File Format Sent Out by VN-E4
JPEG files sent out by VN-E4 are compliant with JFIF and consist of the following.
FFD8Start Code
FFE0Application Segment
FFFEComment Segment
FFC0SOF Frame Information
FFDBDQT Quantization Table
FFC4DHT Huffman Table
FFDAData Start Segment
FFD9End Code
The following information is stored in the comment segment. Each item has a fixed length.
ItemSizeExampleDescription
Version Information9JVC V1.0Indicates the version of information stored in the comment segment
File Size18size = 123456The number of bytes of the JPEG file.
Width13width = 640Width of JPEG.
Height14height = 480Height of JPEG.
Model Name18type = VN-E4Name of model that created the JPEG.
Invert Flag12Stores inversion
information set at VN-E4.
Time Stamp70timestamp =
20050214130509123JST
Alarm Information13alarm = 00000001Indicates the alarm input status when the JPEG is created in a 4-byte
Camera ID50camera = input01Stores camera information set at VN-E4. Character code is Shift-JIS
Motion Detect Setting11motion = 1Specified as 1 when the motion detect feature is ON.
Motion Detect Result7md = 1Specified as 1 if motion is detected at the time when JPEG is created.
Reserved17
Reserved32
Synchronization Time Stamp26sync_timestamp =
1FDC5A34
Video Signal Format20format = NTSCUIndicates the input video signal. Stated as NTSCJ for NTSC in Japan,
Input Channel7ch = 1Indicates the signal source among the 4 inputs of VN-E4.
Picture Quality9intp = 0Stated as 1 when this is set to field interpolation at VN-E4, and 0
Rate Control16size_cntl = VFSDescribes the mode of rate control for JPEG. VFS (VariableFileSize),
Target Size19size = 23456Target size of rate control.
Quantization Scale14q_scale = 45Indicates the quantization scale. Up to 3 digits.
Firmware Version Information 12ver = 01.00Indicates version of the firmware that is used to create JPEG.
Item names and values, excluding the version information that does not include =, are stored in the following format.
Item namesSpace=Spacevalues0x00
Specified as reverse=1 in the case of a vertical inversion.
Indicates the time at which JPEG is created. This is made up of the
year/month/day, hour/minute/second, millisecond and timezone code.
binary value. (Not ASCII code.) 4 alarm inputs are assigned to 4 bits
from the LSB. For example, value is alarm = 00000001when changes
occur with alarm input 1, alarm = 00000008 when changes occur with
alarm input 4, and alarm = 00000009 when changes occur with alarm
inputs 1 and 4.
when information is stored in Japanese.
Indicates the 8 kHz counter value in a 4-byte binary value. (Not
ASCII code.) This can be used when synchronizing with audio.
and NTSCU for other NTSC formats. Stated as PAL for PAL format.
when this is set to frame processing.
AFS (AverageFileSize) or CFS (ConstantFileSize).
Defined fixed length by each item.
Example: When width=640, the 13-byte area will be written as follows.
width=6400x000x00
9
2. Acquiring Audio Data from VN-E4 via HTTP _ 2.1. Basic Procedures
q
2.1. Basic Procedures
1) The client establishes a TCP connection to port number 8009.
4) VN-E4 sends out audio data after returning the response.
A 512-byte u-Law data with a 12-byte header will be sent out repeatedly. Responses and u-Law data sent out
by VN-E4 are as follows.
Responses
2. Ac
header (12-byte)
u-law (512-byte)
header (12-byte)
u-law (512-byte)
Format of the 12-byte header is as follows. The header is made up of 3 4-byte data. The first 4 bytes
(0x00000080) indicate that the payload is an audio data.
0x00000080
No. of bytes of audio data (fixed as 512)
Time stamp (Unit: 8 kHz)
5) The client disconnects TCP8009 to end the audio transmission.
New APIs that are sent without disconnecting TCP will not be valid. To change the parameters, disconnect the
current TCP to stop data distribution, followed by sending API upon establishing a new TCP connection.
10
2. Acquiring Audio Data from VN-E4 via HTTP _ 2.2. API Format
2.2. API Format
Structure
GETSpaceAPI Character StringSpaceHTTP/1.10x0D 0x0A
Host:SpaceIP Address of VN-E40x0D 0x0A 0x0D 0x0A
Unlike parameter acquisition/setting, Accept line is not required. Basic authentication is also not necessary.
Parameter values are indicated using =. Do not insert space before and after =.
Example assured=1
Parameters are segmented using &. Do not insert space before and after &.
Example assured=1&lowdelay=0
There is no need to specify all parameters. Default values will be used for parameters that are not specified.
Parameter Description
assuredVN-E4 temporarily saves up to 2.5 seconds of the compressed data. Specify as assured=0 to request for the
latest data that is temporarily saved and assured=1 to request for the oldest data. Specify as assured=0 to
shorten the audio delay time. To enable stable playback in a network where jitter occurs, it is recommended
that this be specified as assured=1. Default value is 1.
lowdelaySpecifying as lowdelay=1 disables the Nagle algorithm of TCP, and audio delay time will be shortened. When
lowdelay=0 is specified, the Nagle algorithm is enabled and audio delay time will be prolonged. However,
transmission overhead will be enhanced. Default value is 1.
11
2. Acquiring Audio Data from VN-E4 via HTTP _ 2.3. Response
2.3. Response
Unlike JPEG acquisition, there is no Content-length. The last line indicates the actual parameters set at VN-E4.
2. Acquiring Audio Data from VN-E4 via HTTP _ 2.4. Restrictions
2.4. Restrictions
䡵 Access restriction
VN-E4 comes with a feature that enables it to deny access from a specific IP address. If access from the IP address of the client is denied,
VN-E4 will disconnect the TCP connection immediately after TCP is connected via the port number 8009.
䡵 Restriction by maximum bitrate of VN-E4
The maximum distribution capacity of VN-E4 is 40 Mbps. VN-E4 will return an error (503 Service Unavailable) when the distribution
capacity is exceeded due to the API’s request. In this case, VN-E4 will disconnect TCP after 5 seconds if this is not disconnected by the
client.
䡵 Number of clients
The maximum number of clients for which TCP can connect to 8009 is 10. When a connection is made to TCP8009 by an 11th client, this
will be disconnected by VN-E4 immediately after the TCP connection is made.
13
3. Acquiring Alarm from VN-E4 _ 3.1 Procedure
q
3.1 Procedure
1) The client establishes a TCP connection to port number 32040.
2) When motion is detected from the video image of VN-E4, or when there are changes to the alarm input (make or break), VN-E4 will send
out alarm information in the following format. The first 4 lines indicate the current alarm input status (make or break). The following 4
lines indicate whether motion has been detected at each of the video input channel.
3) The client can disconnect TCP32040 to end the alarm acquisition.
3. Ac
14
3. Acquiring Alarm from VN-E4 _ 3.2. Restrictions
3.2. Restrictions
䡵 Access restriction
VN-E4 comes with a feature that enables it to deny access from a specific IP address. If access from the IP address of the client is denied,
VN-E4 will disconnect the TCP connection immediately after TCP is connected via the port number 32040.
䡵 Maximum number of clients
The maximum number of clients that may acquire alarm is 4. When a 5th client sends a SYN for TCP connection to port number 32040,
VN-E4 will return an RST.
Additionally, VN-E4 will also check whether the TCP connection is maintained at regular intervals. VN-E4 will disconnect the TCP
connection if syn exchange is not performed in 10 minutes.
15
4. Using API that Requires Basic Authentication _ 4.1. Procedure
Basic authentication is required for APIs which are explained in Section 5. This section provides basic explanation of the uses of APIs that
require basic authentication.
4.1. Procedure
1) The client establishes a TCP connection to port number 80.
2) The client sends out API via TCP.
Character strings of the following structure will be sent out.
GETSpaceAPI Character StringSpaceHTTP/1.10x0D 0x0A
AcceptSpacetext/plain or text/html0x0D 0x0A
Host:SpaceIP Address of VN-E40x0D 0x0A
Authorization: BasicSpaceUser Name and Password0x0D 0x0A 0x0D 0x0A
The following is an example of API for acquiring the subnet mask of VN-E4.
Specify the response format by Accept line. A plain text response is returned when this is specified as text/
plain. An HTML response will be returned when text/html is specified. An HTML response will be returned
when Accept is not specified.
Restrictions are imposed on clients via basic authentication in the case of API for acquiring/setting parameters
of VN-E4. During basic authentication, user name and password shall be provided in the Authorization line.
There are 3 types of user names, namely admin, operator and user. The type of user for which use is allowed is
predetermined for each API. Join the user name and the password using a colon, Base64 encode this character
string and enter this in the Authorization line.
For example, when
User name: admin
Password: vn-e4
then the character string upon joining the user name and the password with a colon will be admin:vn-e4.
Base64 encoding this string yields YWRtaW46dm4tZTQ=. Enter this in the Authorization line. Default
passwords in the factory settings are as follows:
User NameDefault Password
adminvn-e4
operatorvn-e4
uservn-e4
4. Us
3) VN-E4 returns a response to the client. In the following example, current subnet mask is 255.0.0.0. In addition, 255.0.0.0 is followed by &
and 200 OK, indicating that acquisition is successful.
Note also that each of the content-type, date, server and keep-alive lines begin with a lower-case character.
4) The client can disconnect TCP80 to end the use of API.
16
4. Using API that Requires Basic Authentication _ 4.2. Restrictions
4.2. Restrictions
䡵 Access restriction
VN-E4 comes with a feature that enables it to deny access from a specific IP address. If access from the IP address of the client is denied,
VN-E4 will disconnect the TCP connection immediately after TCP is connected via the port number 80.
17
5. API for Acquiring/Changing Parameters of VN-E4 _ 5.1. Explanatory Notes
P
This section provides a description of API for acquiring/changing the parameters of VN-E4. Make use of the API explained in this section in
the way as mentioned in Section 4.
5.1. Explanatory Notes
(1) Acquiring parameters
● Specify API in GET line according to the format below when acquiring a parameter from VN-E4.
/api/param?ParamA.ParamB.ParamC
It is possible to acquire multiple parameters at a time. Parameters are segmented using &. Do not insert
space before and after &.
5. API for Acquiring/Changing Parameters of VN-E4 _ 5.2. Signal Input
5.2. Signal Input
This API is related to signal input. This is equivalent to the feature on the Input page of the WEB setting page. Refer to the instruction manual
for details on the Input page.
Acquiring Comment in JPEG from VN-E4
Format/api/param?video.input(Number).comment
ExampleWhen acquiring comment of video input channel 1
/api/param?video.input(1).comment
Example of responsevideo.input(1).comment=input01&200 OK
Response example
when setting field is
left blank
InterpretationAcquire comment of the specified video input channel. This comment is stored in the JPEG header. Specify the
Allowed usersadmin, operator, user
video.input(1).comment=&200 OK
video input channel between the range of 1 to 4.
Setting Comment in JPEG from VN-E4
Format/api/param?video.input(Number).comment=data
ExampleWhen setting comment of video input channel 1
/api/param?video.input(1).comment=input01
Example when setting
as blank
Example of responsevideo.input(1).comment&200 OK
InterpretationChange the comment in JPEG of the specified video input channel. This comment is stored in the JPEG
/api/param?video.input(1).comment=%00
header. Specify the video input channel between the range of 1 to 4. Maximum size of comments is 40 bytes.
To set as blank, specify as %00(0x25, 0x30, 0x30).
To use space, specify as %20(0x25, 0x32, 0x30). If you want to set "Comment In JPEG" for example, specify
as follows.
ExampleWhen setting Saturation of video input channel 1
/api/param?video.input(1).saturation=50
Example of responsevideo.input(1).saturation&200 OK
InterpretationChange the Saturation set value of the specified video input channel. Specify the video input channel between
the range of 1 to 4. Range of Saturation is between 0 to 100. The larger the value, the darker will be the color.
Allowed usersadmin, operator
Acquiring Phase from VN-E4
Format/api/param?video.input(Number).phase
ExampleWhen acquiring Phase of video input channel 1
/api/param?video.input(1).phase
Example of responsevideo.input(1).phase=50&200 OK
InterpretationAcquire the Phase set value of the specified video input channel. Specify the video input channel between the
range of 1 to 4. Range of Phase is between 0 to 100. -180 degrees when 0 is specified, 0 degree when 50 is
specified, and +180 degrees when 100 is specified.
Allowed usersadmin, operator, user
Setting Phase for VN-E4
Format/api/param?video.input(Number).phase=data
ExampleWhen setting Phase of video input channel 1
/api/param?video.input(1).phase=50
Example of responsevideo.input(1).phase&200 OK
InterpretationChange the Phase set value of the specified video input channel. Specify the video input channel between the
range of 1 to 4. Range of Phase is between 0 to 100. -180 degrees when 0 is specified, 0 degree when 50 is
specified, and +180 degrees when 100 is specified.
Allowed usersadmin, operator
Acquiring Turnover from VN-E4
Format/api/param?video.input(Number).turnover
ExampleWhen acquiring Turnover of video input channel 1
/api/param?video.input(1).turnover
Example of responsevideo.input(1).turnover=off&200 OK
InterpretationAcquire the Turnover set value of the specified video input channel. Turnover refers to flags that are stored in
the JPEG header. Specify the video input channel between the range of 1 to 4.
Allowed usersadmin, operator, user
21
5. API for Acquiring/Changing Parameters of VN-E4 _ 5.2. Signal Input
ExampleWhen setting Turnover of video input channel 1
/api/param?video.input(1).turnover=on
Example of responsevideo.input(1).turnover&200 OK
InterpretationChange the Turnover set value of the specified video input channel. Turnover refers to flags that are stored in
the JPEG header. Specify the video input channel between the range of 1 to 4. Values that can be specified for
Turnover are on or off.
Allowed usersadmin, operator, user
(Note: This item can also be set by users.)
Acquiring Echo Suppressor from VN-E4
Format/api/param?audio.input.echo_suppress
Example of responseaudio.input.echo_suppress=off&200 OK
InterpretationAcquire the Echo Suppressor setting of the audio input. Specify as high, mid, low or off.
Allowed usersadmin, operator, user
Setting Echo Suppressor for VN-E4
Format/api/param?audio.input.echo_suppress=data
Example/api/param?audio.input.echo_suppress=low
Example of responseaudio.input.echo_suppress&200 OK
InterpretationChange the Echo Suppressor setting of the audio input. Specify as high, mid, low or off.
Allowed usersadmin, operator
Acquiring Noise Suppressor from VN-E4
Format/api/param?audio.input.noise_suppress
Example of responseaudio.input.noise_suppress=off&200 OK
InterpretationAcquire the Noise Suppressor setting of the audio input. Specify as high, mid, low or off.
Allowed usersadmin, operator, user
Setting Noise Suppressor for VN-E4
Format/api/param?audio.input.noise_suppress=data
Example/api/param?audio.input.noise_suppress=low
Example of responseaudio.input.noise_suppress&200 OK
InterpretationChange the Noise Suppressor setting of the audio input. Specify as high, mid, low or off.
Allowed usersadmin, operator
22
5. API for Acquiring/Changing Parameters of VN-E4 _ 5.3. JPEG Encoding
5.3. JPEG Encoding
This API is related to JPEG encoding. This is equivalent to the feature on the Encoding page of the WEB setting page. Refer to the instruction
manual for details on the Encoding page.
Up to 8 types of JPEG data may be encoded according to the combination of the input channel and frame size. Specify a type from the 8
encoding numbers below when acquiring/changing settings via API.
Encoding No.Input ChannelFrame Size
11VGA
21QVGA
32VGA
42QVGA
53VGA
63QVGA
74VGA
84QVGA
Acquiring JPEG Encoding On/Off from VN-E4
Format/api/param?encode(Number).status
ExampleWhen acquiring encoding on/off of Encoding No. 1
/api/param?encode(1).status
Example of responseencode(1).status=on&200 OK
InterpretationAcquire the encoding on/off of the specified encoding number. Note that encoding numbers are different from
video input channels.
Allowed usersadmin, operator, user
Setting JPEG Encoding On/Off for VN-E4
Format/api/param?encode(Number).status=data
ExampleWhen setting encoding on/off of Encoding No. 1
/api/param?encode(1).status=off
Example of responseencode(1).status&200 OK
InterpretationChange the encoding on/off of the specified encoding number. Specify as on to turn on and off to turn off. Note
that encoding numbers are different from video input channels.
Allowed usersadmin, operator
Acquiring Frame Rate from VN-E4
Format/api/param?encode(Number).framerate
ExampleWhen acquiring frame rate of Encoding No. 1
/api/param?encode(1).framerate
Example of responseencode(1).framerate=15&200 OK
InterpretationAcquire frame rate of the specified encoding number. Note that encoding numbers are different from video
input channels.
Allowed usersadmin, operator, user
23
5. API for Acquiring/Changing Parameters of VN-E4 _ 5.3. JPEG Encoding
Setting JPEG Frame Rate for VN-E4
Format/api/param?encode(Number).framerate=data
ExampleWhen setting frame rate of Encoding No. 1
/api/param?encode(1).framerate=30
Example of responseencode(1).framerate&200 OK
InterpretationChange frame rate of the specified encoding number. Note that encoding numbers are different from video
input channels.
Frame rate can be set to 30, 15, 10, 7.5, 6, 5, 3, 2 or 1 in the case of VN-E4 and VN-E4U (NTSC).
Frame rate can be set to 25, 12.5, 8, 6, 5, 4, 3, 2 or 1 in the case of VN-E4E (PAL).
Allowed usersadmin, operator
Acquiring Rate Control Setting from VN-E4
Format/api/param?encode(Number).cbr_mode
ExampleWhen acquiring rate control setting of Encoding No. 1
/api/param?encode(1).cbr_mode
Example of responseencode(1).cbr_mode=afs&200 OK
InterpretationAcquire the rate control setting of the specified encoding number. Note that encoding numbers are different
from video input channels. Quantization table is fixed in the case of vfs (VariableFileSize). In the case of afs
(AverageFileSize), bit rates are controlled such that the average size of multiple files remains constant. For cfs
(ConstantFileSize), bit rates are controlled such that the size of each file remains constant. Upon setting to afs
or vfs, the rate control processing load will increase and the maximum frame rate that can be realized will drop.
Allowed usersadmin, operator, user
Setting Rate Control for VN-E4
Format /api/param?encode(Number).cbr_mode=data
ExampleWhen setting rate control of Encoding No. 1
/api/param?encode(1).cbr_mode=vfs
Example of response encode(1).cbr_mode&200 OK
InterpretationChange rate control of the specified encoding number. Note that encoding numbers are different from video
input channels.
Rate control can be set to vfs, afs, or cfs. In vfs (VariableFileSize), quantization table is fixed. In afs
(AverageFileSize), average file size of multiple JPEGs is controlled to be constant. In cfs (ConstanFileSize),
each file size is controlled to be constant. In cfs mode, maximum frame rate becomes a quater of the maximum
frame rate of vfs/afs.
Allowed usersadmin, operator
24
Loading...
+ 56 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.