Configuration: Video Sources
About
Source Types for your cameras are configured on the General tab, accessible when editing cameras. This section is where you establish and configure the connection settings for each of your cameras. It's an essential step in ensuring that Agent DVR can successfully communicate and interact with your camera devices.
Clone
The Clone source type offers a straightforward way to replicate a camera, including its video and audio streams, into a new device. This functionality enables you to apply different motion processing, recording rules, and alerts on the newly created device without impacting the original camera's settings. It's important to note that if the original camera is disabled, the cloned device will lose its video connection.
- Camera: Select the device you wish to clone.
Desktop
Desktop video sources can be utilized on all platforms except when running Agent DVR as a Windows Service. If desktop capture is needed on Windows, it is necessary to run Agent DVR as a local console application rather than as a service. For guidance on how to switch to a local console application, please refer to Troubleshooting.
- Screen: Choose which screen to record from.
- Capture Mouse: Enable this option to include the mouse pointer in the video capture.
- Area: Define a specific area of the screen to capture by clicking and dragging (this feature is only available on Windows).
Dummy
Dummy devices provide an option to use either a solid color or an image as a background. This can be useful for testing purposes, combining video from other devices using the Picture in Picture feature or RTMP streaming multiple cameras.
- Width: Set the pixel width of the dummy camera, for example, 640.
- Height: Specify the pixel height of the dummy camera, for example, 480.
- Frame Rate: Define the framerate of the camera, such as 10 fps.
- Back Color: Choose the color for the video background.
- Image: Provide a path to an image on your local drive. This image will override the background color.
DVR
The DVR option in Agent DVR provides a means to connect to commonly used DVR devices that lack standard RTSP or HTTP video endpoints.
- Model: Select from a list of supported DVR models.
- Host: Input the IP address of your DVR within your network. Also, include the port it's operating on, or leave the port field empty to default to the standard port for the selected model.
- Username: Enter the username used for logging into your DVR.
- Password: Provide the password associated with your DVR login credentials.
- Channel: Specify the channel number of the camera on your DVR. For instance, if a DVR operates 4 cameras, you would add each camera using channels 1-4 (or possibly 0-3, depending on the DVR's channel configuration).
File
The File source type in Agent DVR allows you to use a pre-recorded video clip and play it back as if it were a live camera feed.
- File Path: Provide the local path to the video file you wish to use.
- Loop: Enable this option to automatically replay the file once it reaches the end.
IP Camera or Network Camera
The Network Camera source type is designed for connecting to network (IP) cameras, utilizing FFmpeg for the connection. If FFmpeg cannot establish a connection, you can alternatively use VLC by installing it and selecting it as the decoder.
- Username: Your login username for the camera (this is different from your iSpyConnect username).
- Password: The password for accessing your camera (not your iSpyConnect password).
- Live URL: The URL for the live video stream from your camera. If your camera provides a low-resolution stream, use that URL here. Use the "..." button to launch a wizard that helps discover available connections.
- Record URL: The URL for the main (record) video stream from your camera. If your camera offers a high-resolution stream, use that URL here. The "..." button initiates a wizard to find available connections.
JPEG or Image
The JPEG/Image source type is designed to connect to JPEG or other image-based sources.
- Username: Enter the username for the camera (not your iSpyConnect username).
- Password: Enter the password for the camera (not your iSpyConnect password).
- URL/ Path: Specify the connection URL for the live image feed from your camera. The "..." button launches a wizard to help find available connections.
- Reload Interval: For static images (such as weather GIFs that only change occasionally), set a reload interval to periodically check for new images. For JPEG and video feeds, this interval should be set to 0.
Local Device
Connect to USB cameras or other local hardware video sources using this option.
- Device: Select from the list of detected local video devices.
- Video Resolution: Choose the desired video resolution.
- Audio: Optionally, select an audio device to pair with the video device.
On Linux, the device options might be empty, often due to permissions issues. To resolve this, add your user to the video permissions group with the following commands:
sudo adduser YOUR_USERNAME video
...Then restart your computer.
sudo usermod -a -G video YOUR_USERNAME
If your device is detected but no video resolution options are available, you can manually add the resolution setting in the ffmpeg settings under Options, e.g:
video_size=720x576
MJPEG
Connect to MJPEG sources. While the IP Camera option is typically preferred, the MJPEG option serves as a backup for cases where certain cameras are incompatible with the standard IP Camera setup.
- Username: Enter your login username for the camera (note: this is different from your iSpyConnect username).
- Password: Provide the password for your camera (not your iSpyConnect password).
- Live URL: Specify the URL for the live video stream from your camera. Use the "..." button to access a wizard that helps find available connections.
- Record URL: Enter the URL for the record stream from your camera. Again, the "..." button can help you discover available connections.
- Use Internal Decoder: The FFmpeg decoder used by Agent DVR may encounter difficulties with some streams that have non-standard boundary markers. Enable this option to switch to Agent DVR's internal decoder. Note: Using the internal decoder means the Record URL will not be utilized.
NDI
Access Network Device Interface (NDI) sources for seamless video streaming over a network. For comprehensive details on working with NDI sources, see more information on NDI.
- Source: Select from the list of detected NDI sources. It's important to choose a source from the detected list rather than manually typing it in. Refer to the NDI settings to include endpoints for detecting remote sources.
- Audio Level: Adjust the audio level coming from the selected NDI source.
Nest
This option provides integration support for Nest or DropCam cameras. To enable Agent DVR's access to these cameras, you'll need to make your cameras publicly accessible.
- Public URL: Enter the URL where your camera can be accessed publicly.
- Get Video URLs: Click this button, and Agent DVR will find the direct link to your camera's video stream.
- Video URL: This field will be automatically filled in after you click the 'Get Video URLs' button.
Web Browser
The Web Browser source type renders a web browser as a video source within Agent DVR. If not already available, it will automatically download and install a headless version of Chromium to facilitate this feature.
- Username: Enter the username to log in to the web page if required.
- Password: Enter the pasword to log in to the web page if required.
- Width: The width of the browser window.
- Height: The height of the browser window.
- URL: Enter the URL to load (e.g., https://www.example.com).
- Reload Interval: Determine how frequently the page should be reloaded.
To force a page reload, you can enable the Prevent JPEG cache option found under the Advanced settings.
To set cookies for the browser, use the Cookie option in Advanced settings. For example, to set a cookie named 'mycookie' with the value 'myvalue', enter 'mycookie=myvalue' in the Cookie field. (v5550+)
ONVIF
Agent DVR offers built-in support for almost all ONVIF-compatible cameras. If you encounter connection issues with your ONVIF devices, check the logs at /logs.html for potential errors.
- Username: Enter the username for your camera (not your iSpyConnect username).
- Password: Provide the password for your camera (not your iSpyConnect password).
- Service URL: This is the URL for your camera's service definition. Agent DVR can usually detect these automatically. Below v4, start typing "http" to see discovered addresses. For versions 4 and above, click on detected devices to populate the Service URL. If your device isn't found automatically, you can manually add it. It should look like 'http://IPADDRESS:PORT/onvif/device_service'.
- RTSP Port Override: Override your camera's RTSP port if necessary, such as when port forwarding on a different network with a different RTSP port. Generally, leave this as 0. This port is used for live video and audio streaming from your camera.
- HTTP Port Override: Override the HTTP port of your camera if port forwarding on another network with a different HTTP port. Usually, this should be left as 0. This port is for obtaining JPEG images from your camera.
- Timeout: Set the duration Agent DVR will try connecting to your camera before timing out.
- Discover: Click this button to allow Agent DVR to connect to your camera using the provided credentials and retrieve video connection options, populating the URLs below.
- Live URL: After discovery, select a low-resolution video stream for live viewing and motion detection.
- Override URL: Optionally, add an override URL for the Live URL if you prefer that over the discovered options.
- Record URL: After discovery, choose a high-resolution video stream for raw recording.
- Override URL: Optionally, add an override URL for the Record URL if you prefer that over the discovered options.
- Use Snapshot URI for Photos: Opt to download photos directly from the camera instead of generating images from the live video stream.
- Force Reload: If your camera appends a unique token to video stream URLs valid for only one session, enable this option to get a new video URL for each connection attempt, which can help with reconnection issues.
Advanced Settings
Advanced options in Agent DVR offer extra tools for enhanced connectivity with your devices. To access these options, go to Edit Camera, select the General tab, click to configure the video source, and then choose Advanced in the drop-down menu.
- Decode GPU: If you have multiple GPU devices, specify which GPU index to use for decoding the video stream.
- Decoder: Options include CPU, GPU, VLC (if installed), or NONE (available from v3.9.8.0+). VLC can decode streams that FFmpeg (used by Agent) might not. Switching the decoder requires disabling/enabling the camera. For GPU decoder options, see Advanced video source settings. None is available only for IP Camera source types and bypasses video decoding, thus necessitating raw recording mode. Note: With NONE selected, motion detection and AI alert filtering won't function.
- GPU Decoder: Select the specific hardware GPU decoder to use. Choose default to use the default setting.
- Cookies: Add any necessary cookies for accessing your camera's video stream.
- Basic Authentication: Toggle Basic Authentication for camera login on or off.
- Use HTTP 1.0: Force usage of HTTP 1.0 for compatibility with older cameras.
- Headers: Include any additional headers required for accessing your camera's video stream.
- User Agent: Set the user agent for the connection if specified by your camera.
- Connection Timeout: Set the maximum wait time for a response from the camera before timing out.
- Reconnect Interval: Configure a periodic interval to close and reopen the connection to the camera.
- Reconnect Strategy: Choose the schedule for reconnection attempts if the camera connection is lost. Options include an elastic schedule (2, 5, 10, 30 seconds) or immediate reconnection.
- Use record stream when maximised: Enable viewing the high-definition record stream in live view when maximised in the live viewer.
- VLC Options: Specify any additional options to pass into VLC when connecting to your camera.
FFmpeg Settings
These are general FFmpeg settings that allow you to fine-tune how Agent DVR interacts with your cameras. To access these settings, go to Edit Camera, select the General tab, click to configure the video source, and choose FFmpeg from the drop-down menu.
- Buffer: This setting determines the real-time buffer size used by FFmpeg to store and process video. A smaller buffer size results in more real-time video but increases the risk of errors. The recommended setting is 2000kb, although higher resolution streams may require a larger buffer.
- RTSP Mode: Setting this to Auto allows FFmpeg to select the transport mode. If experiencing errors, try switching to TCP. For stable wired connections, UDP is preferred due to lower processing overhead.
- Scale Mode: Select a scale mode for FFmpeg. The default mode is Fast Bilinear.
- Find Best Stream: Enable this option to let FFmpeg automatically choose the best video and audio streams from the connection.
- Video Stream Index: If 'Find Best Stream' is unchecked, you can manually select the video stream index.
- Audio Stream Index: Similar to the video stream index, this allows manual selection of the audio stream when 'Find Best Stream' is disabled.
- Prefer TCP: Enabling this option makes FFmpeg prefer TCP connections to your camera, which provides error correction at the cost of increased CPU usage and network traffic.
- Analyse Duration: Specifies the duration (in seconds) for FFmpeg to analyze streams to determine codecs and select the best streams. 0 indicates automatic determination.
- Probe Size: The size (in kilobytes) for the initial format detection probe by FFmpeg. 0 for automatic probing.
- Maximum Delay: This setting is applicable to RTSP and RTMP streams, dictating the delay tolerance for out-of-order packets. Higher values reduce errors but may increase latency. 0 for automatic settings. Note: If set to 0, 'Reorder Queue Size' will be ignored.
- Reorder Queue Size: Determines the number of packets stored in memory. Larger sizes can reduce stream corruption but increase memory usage.
- Thread Count: Sets the number of threads for stream decoding. 0 = automatic. Fewer threads can reduce lag.
- Options: Place to input any additional FFmpeg options you wish to apply.