ANY-maze Help > The ANY-maze reference > The Protocol page > The elements of a protocol > Testing > What to record while testing > Recording videos of tests

Recording videos of tests

Introduction

During a test, you can ask ANY-maze to record a digital video of the test. This can be very useful if you want to track the animal for long periods, and then visually review those parts of the test which contain interesting behaviours.

The videos ANY-maze records automatically are designed for use within the system, and are not suitable for playback in standard media players or for inclusion in PowerPoint presentations. If you want to record a video for these purposes, then refer to the Recording movies of tests for inclusion in a presentation topic.

  

The following sections outline the options for recording videos within ANY_maze:

 •Automatically recording videos of all tests 
 •Stopping a video recording of a test 
 •Automatically recording the empty apparatus 
 •Where the video files are saved 
 •Choosing how to name video files 
 •Controlling the video recorder during a test 
 •Playing the recorded videos  

Automatically recording videos of all tests.

If you're tracking your animals using a camera over the apparatus, and you wish to automatically record a video of all the tests in your experiment, then you just need to check the box labelled Automatically record videos of all tests performed with a camera.

Alternatively, you may be tracking from a video that you've already recorded elsewhere - if so, then you won't normally need ANY-maze to record a video as well - after all, you already have a video of the test! But there are some circumstances under which you would want ANY-maze to record a video, even if you already have one.

For example, you may have started your video recorder, then performed all your tests, and then stopped the video recorder. In this case, you'll have a very long video, with several tests in it, probably with fairly long gaps in between the tests. In this case, when you run tests from this video in ANY-maze, you might want ANY-maze to record its own video of each test - that way, you can quickly see a video of each individual test  without having to find the relevant position in the larger video. Each test's Test video report will show just the video of that individual test.

If you work this way, you can check the box labelled Automatically record videos of all tests performed from a standard format video. (Note that we don't recommend selecting this option unless you really need it, or you'll just create unnecessary video files that will take up disk space on your computer.)

Note that there is one circumstances under which automatic recording of a video of a test may not occur which is described in detail here.

Automatically recording the empty apparatus

This option is only available when you specify that the system should automatically record videos of all tests.

As you may know, ANY-maze tracks the animal by comparing the video pictures to a picture of the apparatus without the animal in it - the difference between the two is the animal. When performing tests 'live', ANY-maze is looking at the apparatus all the time, including when tests are not running, which means that when a test starts it has 'seen' the empty apparatus (just before the test began) which allows it to quickly determine the location of the animal.

However, when tracking from a video this is not the case, as the video will typically only show the apparatus during the test and therefore ANY-maze can have trouble determining the initial position of the animal, especially if it is motionless.

To address this, you can request that the system automatically appends a five second 'lead-in' showing the empty apparatus to videos of tests. This means that when you track from the video, ANY-maze will first 'see' the empty apparatus, which will allow it to quickly determine the location of the animal when the test begins.

If you switch on the option to Automatically record videos of all tests, then ANY-maze will automatically select the option to Automatically record the empty apparatus at the start of the video, and you will usually want to simply leave it switched on.

If for some reason you don't want to record the empty apparatus 'lead-in', then you can switch this option off -  but be aware that will make it harder (although not impossible) to track the animal in the recorded video.

Where the video files are saved

When you record a video of a test (whether automatically or by starting the recording using a procedure), the video itself is stored in a folder with the same name as the experiment file, but with the word 'videos' appended to it. This folder is located in the same place as the experiment file. For example, if you have an experiment file c:\my experiment\drug 123.szd, then the videos will be located in the folder c:\my experiment\drug 123 videos.

If you wish to move the experiment then you should copy both the experiment file and this folder to the new destination (which could be a DVD or external hard drive if you want to archive the experiment).

Choosing how to name video files

Obviously, if videos are recorded automatically for each test, they will need different file names to ensure that they can be correctly identified by ANY-maze. By default, the video files that are created will be given simple file names of 'Test 1.szv', 'Test 2.szv', etc. However, if you want to include any additional information in the file name (for example, the animal's ID or which apparatus it was recorded in), you can do this by setting your own file name which includes 'fields' that ANY-maze will substitute for the relevant details of the test.

You can either type in the text for the field that you want, or use the Fields... button to drop a list of the available fields.

You can include any of the following fields in the file name:

 [TestNum]The test number
 [TestDate]The date the test was performed
 [TestTime]The time the test was performed
 [AnimalNum]The animal number
 [AnimalID]The animal ID, if using your own animal IDs (if not, this will simply use the animal number)
 [Stage]The name of the stage that this test is part of
 [Trial]The trial number of this test within the stage
 [Apparatus]The name of the apparatus that this test was performed in
 [ExperimentFileName]The name of the experiment file (without the file extension) that this test is part of.

Fields which represent numbers will be replaced with ONLY the number - so for example, if you want your file name to include 'Test 1', you must use Test [TestNum] in the name, and not just [TestNum].

  

The [TestDate] and [TestTime] fields can have an additional format specified, to allow you to specify the order of the Day/Month/Year or Hours/Minutes/Seconds:

For [TestDate], you can use any of the following:

 YYYYThe year, as a four-digit number
 YYThe year, as a two-digit number
 MMThe month, as a two-digit number (e.g. 03 or 12)
 MThe month, using as many digits as necessary (e.g. 3 or 12)
 DDThe day, as a two-digit number (e.g. 05 or 31)
 DThe day, using as many digits as necessary (e.g. 5 or 31)

So you can use [TestDate MM-DD-YY] to generate a file name containing '07-29-21', or [TestDate YYYYMMDD] to generate a file name containing '20210729', for example.

For [TestTime], you can use any of the following:

 HHThe hour in 24-hour format, as a two-digit number (e.g. 07 or 18)
 HThe hour in 24-hour format, using as many digits as necessary (e.g. 7 or 18)
 MMThe minutes, as a two-digit number (e.g. 08 or 59)
 MThe minutes, using as many digits as necessary (e.g. 8 or 59)
 SSThe seconds, as a two-digit number (e.g. 05 or 45)
 SThe seconds, using as many digits as necessary (e.g. 5 or 45)

So you can use [TestTime HHMM] to generate a file name containing '1459', or [TestTime H.M] to generate a file name containing '3.25', for example.

The characters you choose must be valid filename characters - so you can't use '/' to separate DD/MM/YY, or ":" to separate HH:MM, for example.

  

Some example file names are:

 •  'Test [TestNum], Animal [AnimalNum]' 

This will generate video files called 'Test 1, Animal 1.szv', etc.

 •  'Test performed on [AnimalID] on [TestDate MM-DD-YY] at [TestTime HH-MM] in [Apparatus]' 

This will generate files called 'Test performed on X3841 on 11-28-20 at 10-25 in Open Field.szv', etc.

Controlling the video recorder during a test

Even if you're automatically recording a test, you can still control the video recorder manually. For example, you can pause the recorder using the button or stop it using the button.

In fact, you can use procedures to control the VCR as well. For example, you could set up a procedure which would pause the VCR when the animal becomes immobile and restart it when it becomes mobile again - this would offer a neat way of avoiding recording periods when the animal's asleep.

Indeed, you can even start the video recorder using a procedure. For example, you might want to record periods when the animal is in a certain zone of the apparatus - but if it never enters the zone, you're not interested in recording a video at all. In this case, rather than using the option on the What to record while testing page to automatically record every test, you could instead just create a procedure to switch on the video recorder when the animal enters the relevant zone. In this case, only those tests in which the animal actually entered the zone would have a video recorded.

By the way, if you record a video in this way, the video quality will be whatever is set on the What to record while testing page (that's why the quality settings are always enabled, even if the Automatically record videos button is not checked). Also, the video files will be recorded in the same place as they would have been recorded if the Automatically record videos button was used - see Where the video files are saved, above.

Playing the recorded videos

Of course, if you record a video, you'll presumably want to watch it - and this leads to the question of how to access the files which the system records.

In fact this is very simple - if ANY-maze records a video of a test, then it will include it in the Related reports list shown on the Tests page when the specific test is selected.

  

  

Figure 1. If ANY-maze records a video of an animal's test, then it automatically includes a link to the video in the Related reports list.

© Copyright 2003-2026 Stoelting Co. All rights reserved

ANY-maze help topic T0576