Open

<< Click to Display Table of Contents >>

Manual > Control Reference > Other > Video recorder control > Method >

Open


 

Establish a connection with the camera.

 


syntax

Open(

         bASync,

         name,

         file,

         outputFile

         [,outputFileFPS = 1]

         [,outputFileLongestTime = 0]

         [,startOffsetMax = 0]

         )

 


Parameters

 

bASync


Type:

Boolean


TRUE - The connection process is asynchronous. In this case, the Start/KStop/Close methods cannot be called until the READY event occurs.

FALSE - The connection process is synchronous. Immediately after checking the return value of the Open method to be TRUE, the Start/Stop/Close methods can be called. However, depending on the network and other conditions, the Open method may have to wait a long time.

 

name


Type:

character


Recording name. Specify the target recording name in the Start/Stop/Close method.

 

file


Type:

character


The URL of the camera to connect to, or the PC's built-in camera number (starting from 0). The number of connections to the PC's built-in camera is limited to a maximum of 1, so for example, you cannot view the same built-in camera with the VideoPlayer control while recording with the VideoRecorder control.

 

outputFile


Type:

character


Output file name. The following embedded keywords can be used:

 

: The recording name specified in the second argument of Open.

: Recording start date (yyyymmdd)

: Recording start date and time (yyyymmddhhmmss)

: Recording start date and time (yyyymmddhhmmss000)

: End date of recording (yyyymmdd)

: Recording end date and time (yyyymmddhhmmss)

: Recording end date and time (yyyymmddhhmmss000)

: The time when Start/Stop was called (bw-hhmmss-hhmmss). StartOn

: The time when Start/Stop was called (bw-hhmmss000-hhmmss000). StartOn

: The date and time when Start/Stop was called (bw-yyyymmddhhmmss-yyyymmddhhmmss). The date and time when StartOneshot was called (at-yyyymmddhhmmss).

: Date and time when Start/Stop was called (bw-yyyymmddhhmmss000-yyyymmddhhmmss000). Date and time when StartOneshot was called (at-yyyymmddhhmmss000).

 

outputFileFPS


Type:

Number


The frame rate of the output video (number of frames per second). When set to 0, the default value is 2 fps. If a value less than 0.5 is set, it will be forcibly set to 0.5 fps. For example, if set to 1 fps, one frame will be recorded per second.

Please adjust the value specified for fps based on the allowable file size and the performance of the camera itself (frame rate, etc.). For example, if the camera's playback frame rate is 1 fps (once per second), specifying 25 fps for recording will result in the same image being saved repeatedly, unnecessarily increasing the file size.

 

outputFileLongestTime


Type:

Number


Automatically splits the file at the specified time interval (in seconds). If the value is 0, the file will not be split. (This argument is ignored for the StartOneshot method.)

 

startOffsetMax


Type:

Number


Maximum offset value. Sets the maximum offset value that can be specified when specifying an offset with the startOffset parameter in the Start method.

 


Return Value



Type:

Boolean


FALSE - Failure. TRUE - Success.

 


 


reference