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. Because the clone reuses the original camera feed, it does not open a second connection to the camera. 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
The Desktop source type records your computer screen as a video source, which is useful for monitoring a kiosk or keeping evidence of remote sessions. 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 (Windows only).
- 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. Use it to pull individual camera channels from an existing standalone recorder into Agent DVR alongside your other devices.
- 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. This is handy for trying out motion detection and alert settings without a live camera.
- 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. It is the usual choice for any camera on your network that provides an RTSP stream or HTTP video URL. 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.
- Use HD Stream: Show the record (HD) stream in live view instead of the live stream, either only when maximised or in both the main and maximised views. Requires the recording mode to be set to Raw Record.
- HD On Demand: Only connect to the high definition record stream when it's needed, for example when the camera is maximised in live view or recording. This saves bandwidth and data quotas on metered or mobile connections. Recordings made this way start without buffered footage and can be delayed a few seconds while the stream connects. If the record stream fails to connect, Agent DVR records the live stream instead.
If Experimental Features is enabled in Server Settings, an additional RTSP (Alternate) source type is available. This is a simplified RTSP connection (username, password and live URL only) offered as an alternative way to connect RTSP cameras.
JPEG or Image
The JPEG/Image source type is designed to connect to JPEG or other image-based sources. Use it for cameras or devices that publish snapshots or an image URL over HTTP.
- 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 USB webcams, capture cards and 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.
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
sudo usermod -a -G video YOUR_USERNAME
...Then restart your computer.
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.
- Use HD Stream: Show the record (HD) stream in live view instead of the live stream, either only when maximised or in both the main and maximised views. Requires the recording mode to be set to Raw Record.
- HD On Demand: Only connect to the high definition record stream when it's needed, for example when the camera is maximised in live view or recording. This saves bandwidth and data quotas on metered or mobile connections. Recordings made this way start without buffered footage and can be delayed a few seconds while the stream connects. If the record stream fails to connect, Agent DVR records the live stream instead.
NDI
Access Network Device Interface (NDI) sources for video streaming over a network. For NDI discovery settings, see NDI server settings.
- 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 legacy Nest and Dropcam cameras that can share a public video feed. Google has discontinued Dropcam and no longer offers public sharing on newer Google Nest cameras, so this source type only works with older devices. See Nest and Dropcam Cameras for details.
- 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, so you can display a status dashboard or any web page as a camera feed. 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 password 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 Cookies option in Advanced settings. For example, to set a cookie named 'mycookie' with the value 'myvalue', enter 'mycookie=myvalue' in the Cookies field.
ONVIF
Agent DVR offers built-in support for almost all ONVIF-compatible cameras. ONVIF is an open standard used by most modern IP cameras, and connecting with it lets Agent DVR discover the available video streams automatically. 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: click a detected device to populate the Service URL. If your device isn't found automatically, you can enter it manually. 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.
- Use HD Stream: Show the record (HD) stream in live view instead of the live stream, either only when maximised or in both the main and maximised views. Requires the recording mode to be set to Raw Record.
- HD On Demand: Only connect to the high definition record stream when it's needed, for example when the camera is maximised in live view or recording. This saves bandwidth and data quotas on metered or mobile connections. Recordings made this way start without buffered footage and can be delayed a few seconds while the stream connects. If the record stream fails to connect, Agent DVR records the live stream instead.
- 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 select the Advanced tab.
- Decoder: Options include CPU, GPU, VLC (if installed) and None. VLC can decode streams that FFmpeg (used by Agent) might not. Switching the decoder requires disabling and re-enabling the camera. None is available only for network camera source types: it bypasses video decoding entirely, so it requires raw recording mode, and 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.
- Decode Device: If you have multiple GPUs, specify which device to use for decoding. Leave blank for the default, or enter a device index or path (for example /dev/dri/renderD128).
- 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.
- Validate Certificate: Validate SSL certificates when connecting. Leave this off for cameras that use self-signed certificates.
- Prevent JPEG cache: Append a unique parameter to JPEG requests to prevent caching. Can cause issues with some 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.
- 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 connects to your cameras. To access these settings, go to Edit Camera, select the General tab, click to configure the video source, and select the FFMPEG tab.
- 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.
- Auto Switch: Automatically switch between TCP and UDP transports if the connection fails.
- HTTP Tunneling: Tunnel RTSP over HTTP. This can help when connecting through firewalls or proxies.
- Low Delay: Reduce latency in the stream. Disabling this can improve stream quality.
- 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. 0 = automatic.
- Audio Stream Index: Similar to the video stream index, this allows manual selection of the audio stream when 'Find Best Stream' is disabled. 0 = automatic.
- 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.
- Filter: See below.
FFmpeg Troubleshooting
FFmpeg Filters
Using ffmpeg filters you can apply realtime effects and overlays to your video. Note that for these to persist to recordings you will need to set the recording mode to Encode.
To use these edit the camera and on the General tab click on video source settings - ffmpeg settings. These effects will only apply if you are using an ffmpeg decoder.
Examples:
Crop and blur an area:
[in]split[main][crop];[crop]crop=w=200:h=100:x=50:y=50,boxblur=10[blurred];[main][blurred]overlay=x=50:y=50[out]
Add text overlay:
[in]drawtext=text='Hello, World!':x=10:y=10:fontsize=24:fontcolor=white[out]
Combine:
[in]drawtext=text='Hello, World!':x=10:y=10:fontsize=24:fontcolor=white,split[main][crop];[crop]crop=w=200:h=100:x=50:y=50,boxblur=10[blurred];[main][blurred]overlay=x=50:y=50[out]