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
- 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
- Enter one of the commands that are available for MediaRecorder (/E, /R, /S, /X or no command) as a Command line option.
See See Use comhttps://bookstack.noldus.com/link/437#bkmrk-page-titlemands in 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.
importantIMPORTANT- There also may be a delay between the
commandissuing the Start Recording command andthe momentMediaRecorder actuallystartsstarting recording. This delay results in missed frames at the beginning of the video file. Run a test recording totestsee how long this delay is. To assess this delay, make for example a video of a digital clock andcomparecheck thetimeinterval between issuing thecommandStart Recordingiscommandgivenandwith the time atrecording the first frame of the video.