Summary:-
This document is designed to allow users to stream a looped video file mimicking a camera within the Wisenet Wave platform. This can be used to demonstrate the software's capabilities without having a physical camera attached alternatively it can be utilized to load test hardware before implementation just to mention a few possible scenarios that will be mentioned later on in this article.
What is a Test Camera?
Test Camera is an experimental application that allows users to stream a looped video file to Wisenet Wave as an emulated camera. Test Camera is launched using a command-line interface (i.e., Terminal, CMD, etc.).
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
Installing and Using a Test Camera
<filePath>/testcamera <option>
<cameraSet>;<cameraSet2>
- <option> – the below options
- -I – limit discoverability of test cameras to a specified network interface (for example, to limit the test cameras to your machine: -I 127.0.0.1). See "Known Testcamera Limitations" below for more information.
- -S – create a separate Test Camera per primary video file
- <cameraSet> – at least one set of semi-colon separated parameters (enclosed in commas if more than one is used):
- files = a comma-separated list of video-files for hi-quality/primary streams
- secondary-files = a comma-separated list of video-files for low-quality/secondary streams (optional)
- count = the number of Test Cameras to create, if more than one is needed (for example, count=5)
Example - Create one Test Camera that can only be discovered by your machine:
C:\testcamera.exe -I 127.0.0.1 "files=hq.mkv; secondary-files=lq.mkv"
Note: Run the testcamera command with no parameters to access the help function and see the full list of commands.
Windows
Test Camera is available to download as a separate application from this link.
- Create a folder in the directory of your choice and name it test_camera (for example, C:\test_camera)
- Download the Testcamera package and extract it to C:\test_camera
- Place any video files you plan on using into C:\test_camera
- Open CMD and navigate to the Test Camera folder:
cd C:\test_camera
- Run the testcamera command with your desired parameters and values.
Example 1: Create 100 identical cameras for performance testing and prevent the Test Cameras from being discovered by other computers on the network
C:\testcamera.exe -I 127.0.0.1 "files=hq1.mkv; secondary-files=lq1.mkv; count=100"
Example 2: Create three Test Cameras from three different source files
C:\testcamera.exe -S "files="hq1.mkv,hq2.mkv,hq3.mkv"; secondary-files="lq1.mkv,lq2.mkv,lq3.mkv""
Example 3: Create three Test Cameras from three different source files and prevent the Test Cameras from being discovered by other computers on the network
C:\testcamera.exe -I 127.0.0.1 -S "files="hq1.mkv,hq2.mkv,hq3.mkv"; secondary-files="lq1.mkv,lq2.mkv,lq3.mkv""
Ubuntu
Test Camera is included in the server package for all Ubuntu installations.
- Open Terminal and navigate to the Test Camera folder. For Wisenet Wave:
cd /opt/hanwha/mediaserver/bin/
- Using admin permissions, place any video files you plan on using into the Test Camera folder. Note: If you do not have admin permissions to place video files in the same folder as the Test Camera program, you will have to use the full file path of the videos in the cameraSet.
- Run the ./testcamera command with your desired parameters and values.
Example 1: Create 100 identical cameras for performance testing and prevent the Test Cameras from being discovered by other computers on the network
./testcamera -I 127.0.0.1 "files=hq1.mkv;secondary-files=lq1.mkv;count=100"
Example 2: Create three Test Cameras from three different source files
./testcamera -S "files=hq1.mkv,hq2.mkv,hq3.mkv;secondary-files=lq1.mkv,lq2.mkv,lq3.mkv"
Example 3: Create three Test Cameras from three different source files and prevent the Test Cameras from being discovered by other computers on the network
./testcamera -I 127.0.0.1 -S "files=hq1.mkv,hq2.mkv,hq3.mkv;secondary-files=lq1.mkv,lq2.mkv,lq3.mkv"
Best Practices
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 a 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 the camera frame-per-second (fps) rate, you can modify the frame rate using camera settings in Nx Desktop:
Just select all Test Cameras 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.
Quick start
We highly recommend creating an executable script (.bat for Windows, .sh for Linux) for starting Test Camera quickly.
Known Test Camera Limitations
- Test Camera loads every file to memory, so using it with a lot of different files require additional memory.
- Test Camera uses only the first 100 MB of a file
- Test Camera is only compatible with the same version server
- Please, be careful when using Test Camera in a network with several Wave products as all Wave Servers running on the same LAN subnet will discover the Test Camera “cameras” and add them to their databases. Use -I key to limit availability by network.
A Few Samples
Some files to get you started quickly:
Questions
If you have any questions related to this topic, or you want to share your experience with other community members or our team, please visit and engage in our support community or reach out to your local reseller.
Comments
0 comments
Please sign in to leave a comment.