What is Testcamera?
Testcamera is an experimental application that allows users to stream a looped video file to Nx Meta as an emulated camera.
It solves several problems:
- Development: Developers are able to work on integrations without hardware devices (cameras, network gear, etc).
- Debugging: Create a predictable and replicable video stream for testing and debugging video analytics solutions
- Performance testing: Create hundreds of “cameras” to test hardware and software performance and reliability
- Demonstrations: Create a mobile software-only “camera” set to use in demos
How to download Testcamera?
Testcamera for Windows is available as a separate application with other Nx Meta Early Access releases.
Testcamera for Linux is a part of server package. After the installation it can be found in /opt/networkoptix-meta/mediaserver/bin/testcamera
Installing and Using Testcamera:
Testcamera is launched using a command line interface (aka CLI, cmd, shell, terminal):
testcamera files="hi1.mkv,hi2.mkv";secondary-files="lo1.mkv,lo2.mkv";count=40 -I 192.168.0.111 -S
- files = a comma-separated list of video-files for hi-quality streams
- secondary-files = a csv file containing a list of video-files for low-quality streams (optional)
- count – number of test cameras to run
- -I – network interface for test cameras (see Known Testcamera Limitations section below for explanation)
- -S – separate camera for each primary file
Example 1: Create 100 identical cameras for performance testing
testcamera files="hi1.mkv";secondary-files="lo1.mkv";count=100 -I 192.168.0.111
Example 2: Create 3 “cameras” from 3 different source files
testcamera files="hi1.mkv,hi2.mkv,hi3.mkv";secondary-files="lo1.mkv,lo2.mkv,lo3.mkv" -I 192.168.0.111 -S
Use Relevant Files
Create and utilize video files that are similar to the conditions you would like to replicate. The easiest way to get such sample is to set the real camera to record in Nx Meta, then export a part of the archive.
Adjusting the Frame Rate (FPS)
If you want to change camera frame-per-second (fps) rate, you can modify the frame rate using camera settings in the Nx Desktop client:
Just select all Testcameras you want to modify (drag across cameras in Nx Desktop to select multiple), open the Camera Settings Dialog and adjust the recording schedule to the desired FPS and save to apply the changes.
We highly recommended creating an executable script (.bat for Windows, .sh for Linux) for starting Testcamera quickly.
Known Testcamera Limitations
- Testcamera loads every file to memory, so using it with a lot of different files require additional memory.
- Testcamera uses only first 100 MB of a file
- Testcamera is only compatible with the same version server
- Please, be careful when using Testcamera in a network with several powered by Nx products as all Nx Servers running on the same LAN subnect will discover the Testcamera “cameras” and add them to their databases. Use -I key to limit availability by network.
A Few Sample Files
Some files to get you started quickly:
- Timer High stream: https://drive.google.com/open?id=1fJo2RoFA22PzvlbhZkPMfisdULuATMF-
- Timer Low stream: https://drive.google.com/open?id=1183fflpEf3GGX0bJs8ohKqqMe52S-3TX
- Traffic High stream: https://drive.google.com/open?id=0B3c_1IBJBpnbbEwwWVlSVmNjb2c
- Traffic Low stream: https://drive.google.com/open?id=0B3c_1IBJBpnbN1U2UVV5QzlwR3c