HomeSupportKnowledge Base → MultiRecorder

MultiRecorder

Multiplatform command line tool records image sequences from multiple cameras using multiple storage drives.
These are using multiple threads to gain speed.

Tasks run across multiple computers or multiple processes on one computer.

This functionality is included in the set of features XIMEA's: CamTool application

Design:

Features

  • Use any number of cameras as input
  • Speed as the no.1 priority:
    • Recording in transport format (XI_FRM_TRANSPORT_DATA) to minimize the recording data size.
    • Recorded data can be stored on multiple drives. Each frame goes to a different drive.
    • User can start a separate process for each camera and assign affinity to a different CPU.
  • Stores (exports) image sequences in TIFF format (RGB, mono, RAW, ...)
  • Supports connecting to cameras on different computers (HTTP communication)
  • Supports Windows, macOS and Linux
  • Provided with sample recording scripts

Command line arguments

Command line arguments (either run a script or just start the server):
  • -h or --help : show this command line arguments help
  • -r or --run filename : run the recording XML script
  • -s or --start-server _hostname[:port] : start camera server listening at specified address and (optionally) port
  • -v or --verbose : verbose log output
  • -l or --log logfilename : output log to a file, not to console
  • --live-preview : show live image preview while recording (requires opencv_worldNNN.dll next to MultiRecoreder.exe on Windows or OpenCV installed in /usr/local/lib elsewhere)
  • --test-hdd-speed test_time_seconds : run testing of write speed to destination defined in -r XML for the number of seconds in the parameter
  • --test-hdd-speed-size one_image_size_bytes : define size of one image in bytes for testing
When the recording script uses saveSession capability to save recorded data to xirecsession file, there are additional arguments to process this data. Do not use --run argument, use --export-tiffs instead:
  • -e or --export-tiffs filename.xirecsession: export TIFF images from the pre-recorded session stored in the *.xirecsession file
  • --export-tiffs-folder path: destination path to store the TIFF files
  • (optional) --export-tiffs-format format: see exportImageFormat in XML
  • (optional) --export-tiffs-enable16bitdata true/false : see tiffEnableStoring16bit in XML
  • (optional) --export-tiffs-rescaleto16bitrange true/false : see tiffScaleDataToFull16bitRange in XML
  • (optional) --export-tiffs-frame idx: export only one frame from the recorded data
Example of 10 seconds testing of HDD speed --test-hdd-speed:
  • MultiRecorder -r samples/s1-capture-10-images/sample1.xml --test-hdd-speed 10 --test-hdd-speed-size 2000000

Recording script (XML) specification

Check the samples shipped with MultiRecorder for a better understanding.
The XML files contain one <RecordingSetup> with the following sections:

  • <recordingStorages> : The storage section is used to define temporary data storage for acquisition. You can also use multiple drives simultaneously to increase write speed.
    • <storage name= "some_name" > : contains at least one <folder>. When more folders are specified, recording switches between them when storing frames
      • <folder> path1 </folder> : path to folder to use as fast temporary storage of recorded data
      • (optional) <folder>path2</folder> : path on different drive then path1
  • <tasks>
    • <cameraTask attributes > : defines the task. See the attribute list below.
      • <setCameraParam name= "parameter_name" value= "parameter_value" /> : specify parameters you want to set before acquisition starts. Each parameter in a separate <setCameraParam /> tag.
      • <applyXiCameraFile name= "filename" /> : apply camera settings stored to file (*.xicamera) using xiCamTool (use menu at (i) toolbar button)

<cameraTask> XML tag attributes:

  • (optional) connectToServer = "hostname:port": connect to MultiRecorder server running at specified IP address and port
  • (optional) specify the camera to open. Use one of the following attributes. When not specified, the first camera will be opened
    • cameraIdx= "number" : open camera at index, as xiOpenDevice(number)
    • cameraInstPath= "path" : open camera using xiOpenDeviceBy(XI_OPEN_BY_INST_PATH, path)
    • cameraSn= "serial_number" : open camera using xiOpenDeviceBy(XI_OPEN_BY_SN, serial_number)
    • cameraUserID= "id" : open camera using xiOpenDeviceBy(XI_OPEN_BY_USER_ID, id)
    • cameraLocPath= "path" : open camera using xiOpenDeviceBy(XI_OPEN_BY_LOC_PATH, path)
  • frameCount= "number" : number of images to capture from camera
  • (optional) concatImgCount = _"number" : set the camera to concatenation mode with number of images inside one transport buffer (see support page)
  • recordingStorageName= "storage_name" : name of the recording storage defined inside <recordingStorages> section
  • exportImageFormat= "format" : format of exported TIFF files, use any XI_IMG_FORMAT constant (e.g. XI_RGB24, XI_MONO16, XI_RAW16,... )
  • (optional) saveSession = "path" : recording data is kept in recording storage and can be later exported to TIFFs or opened in CamTool. Session description is saved into a file at _path.
  • (optional?) exportFolder= _"path" : destination path to store the TIFF files (must use this when not saveSession, else recorded data gets lost)
  • (optional) tiffEnableStoring16bit = "true/false" : export TIFFs with 16bit data, else rescale to 8bit (default: true).
  • (optional) tiffScaleDataToFull16bitRange = "true/false" : rescale 16bit data in TIFFs to full 16bit range to increase compatibility with other apps (default: false).