Skip to main content

Control video recording by MediaRecorder with EthoVision XT when you track live

Aim

To start video recording automatically when something of interest is detected by EthoVision XT. This is, for example, useful if you have animals that spend a lot of time in a shelter. Start video recording when the animal leaves the shelter.

Prerequisites

  • You have cameras that are supported for tracking in EthoVision XT.
  • MediaRecorder and EthoVision XT run on the same computer.

Procedure

  1. In EthoVision XT, open the Trial Control screen by clicking the Trial Control Settings in the Experiment Explorer.
  2. In the Components pane, under Actions click the button next to External command.
    image.png
  3. Enter a name in the Action Name field, for example, Start Recording.image.png
  4. Under Actions to perform, click the ellipsis button utxqEBwSlZpZYsP7-image.png and browse to MRCmd.exe. By default MRCmd.exe is present in the folder C:\Program Files\Noldus\MediaRecorder 6\MRCmd.exe.
  5. Enter one of the commands that are available for MediaRecorder (/E, /R, /S, /X or no command) as a Command line option.

See Use commands in Record video

Example

You carry out live tracking during a 24-hour period and you want to make a recording in MediaRecorder, but only when the animal leaves the shelter.

  1. Create an external command condition with the command /E to start Medi­aRecorder.   image.png
  2. Insert a Condition Out of shelter. Combine this condition box with a Time condition, because opening MediaRecorder takes a few seconds. With a Time condition you make sure that MediaRecorder is open before recording starts (see the figure below for an example).
  3. Insert an External command box with the command /R to start recording.image.png
  4. Similarly, you can stop recording (Command line option: /S) when the animal enters the shelter again.

Notes

  • For an extensive description of how to use Trial Control, see Trial Control in the EthoVision XT Help or the Reference Manual - Trial and Hardware Control in EthoVision XT.
  • IMPORTANT  Allow enough time between the actions. If a command is sent before the previous one is carried out, the second command is not carried out. For example, if the command Start Recording is sent before MediaRecorder is completely open, recording does not start.
  • There also may be a delay between the issuing the Start Recording command and MediaRecorder actually starting recording. This delay results in missed frames at the beginning of the video file. Run a test recording to see how long this delay is. To assess this delay, make for example a video of a digital clock and check the interval between issuing the Start Recording command and recording the first frame of the video.