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
nYou have cameras that are supported for tracking in EthoVision XT.
nMediaRecorder and EthoVision XT run on the same computer.
Procedure
- In EthoVision XT, open the Trial Control screen by clicking the Trial Control Settings in the Experiment Explorer.
- In the Components pane, under Actions click the button next to External command.
- Enter a name in the Action Name field, for example, Start Recording.
- Under Actions to perform, click the ellipsis button
and browse to MRCmd.exe. By default MRCmd.exe is present in the folder C:\Program Files\Noldus\MediaRecorder 6\MRCmd.exe.
- 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.
- Create an external command condition with the command /E to start MediaRecorder.
- 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).
- Insert an External command box with the command /R to start recording.
- 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 command Start Recording and the moment MediaRecorder actually starts recording. This delay results in missed frames at the beginning of the video file. Run a test recording to test how long this delay is. To assess this delay, make for example a video of a digital clock and compare the time the command Start Recording is given with the time at the first frame of the video.