Knowledge base > Tasks > Capture video with a USB or built-in camera
The Capture video task for a camera is essential to start receiving video feed from the camera, recording or using other advantages of a video management system. The task also captures audio from the camera's or gadget's built-in microphone.
The Banalytics server captures video frames that can be processed, compressed, stored, or streamed. The video can be streamed on the Banalytics portal web page. The browser and the Banalytics server establish a peer-to-peer connection.
A peer-to-peer (P2P) connection between a browser and a Banalytics server refers to a direct connection between two devices (in this case, the browser and the Banalytics server) without needing a central server or intermediary. This type of connection is commonly used in applications that involve real-time communication, such as video conferencing, online gaming, and live streaming. In a P2P connection, the browser and the Banalytics server exchange data directly, which can improve the speed and quality of the connection.
To establish a P2P connection between a browser and a Banalytics server, the browser uses a technology called WebRTC (Web Real-Time Communication). This technology allows for peer-to-peer communication between the browser and the Banalytics server. Once the P2P connection is established, the browser can stream media content (such as audio or video) directly from the Banalytics server without going through a central server.
After successfully adding the capturing task, you can view the live stream, edit the configuration options, and run/stop/delete it.
Expanding the task, you'll see other camera tasks for which capturing is essential—add a watermark to the camera view, continuous recording, motion detection, recording upon motion detection, or object classification.
Note that stopping the capturing task stops all the tasks underneath.
If a "Capture of ..." task does not appear underneath, add the task in the bottom right corner.
Value
Required (Yes/No)
Description
Default
Restart on failure
Yes
Restart mode upon catching an error:
Stop on failure - not restarted until triggered manually.
Immediately - tries to restart automatically immediately after catching an error.
10 sec - tries to restart automatically with a 10-seconds delay after catching an error.
30 sec - tries to restart automatically with a 30-seconds delay after catching an error.
1 min - tries to restart automatically with a 1-minute delay after catching an error.
10 sec
Local media source
Yes
Select a built-in or USB camera configured for the Banalytics server.
Rotate image
Yes
Rotation angle.
0
Max FPS (0 - disabled)
No
You can set the video capture rate to be lower than the camera’s configured FPS. This helps reduce bandwidth usage if you decide that a lower frame rate is sufficient for motion detection and recording. Setting the value to zero means the camera’s FPS configuration will be applied.
0
RT buffer (Mb)
Yes
The maximum memory used for buffering real-time frames. If you set a high resolution, this value should be increased.
10 Mb