Reviewing Previous Recordings
The Motif WebUI includes the ability to quickly review previous recordings, delete them if requested, or copy or move them to other locations.
To open or delete a video, select it from the list and click 'Open' or 'Delete'. To seek through the video use the slider widget. Clicking 'Stop' closes the video.
Note
Videos will not automatically play when opened, you need to seek through them manually. This feature is not a substitute for inspecting your videos thoroughly later, but provides a quick way to check they are OK before copying to storage, or in case the recording system disk is full.
Get Data off a Motif System
Motif supports multiple ways to move data off the system using the WebUI. Open the camera menu and select the "Review/Copy" tab of one of the cameras.
Tip
Motif can be configured with a number of locations 'folders', or otherwise, which allow easily copying recordings from the system to your research group shared storage. This can be a good option when the Motif system will not have a monitor, and will be used only remotely
The options available for your Motif system are listed in the "Destination" menu.
- "COPY ALL"
will copy all files to the external drive. Copy will only copy files that are not yet copied to the external file (synchronization) - "MOVE ALL"
will move all files to the external drive not yet present. The copy on the recording system will be deleted.
Info
Copy only copies new files. You can click "Copy" multiple times and it will only copy new recordings.
Info
If you are using only the Motif software on a local PC you can also simply use your operating system file browser to go to the location where recordings are saved, and copy or delete recordings manually.
Tip
If you want to convert an imgstores to a normal mp4 file, see converting imgstores below.
USB Drive
Attach a USB 3 drive with enough free space. It will show up in the "Destination" menu as soon as it is ready. If a drive is not detected restarting the system might help.
Network Share
Motif can mount network drives if connected to your local network. For configuration please contact the support team (support@loopbio.com)
Remote Rsync Destination
If your Motif system is connected to your local network a "rsync destination" can be configured. For configuration please contact the support team (support@loopbio.com) or consult the configuration documentation.
Upload Data from Motif to Loopy-online (app.loopb.io)
Data can be uploaded directly from Motif to a Loopy account.
Info
An active user account on Loopy with enough free space is required. Contact support@loopbio.com for instructions on how to configure Motif with Loopy-onsite
Log into your Loopy account on http://app.loopb.io , navigate to "My Account" and copy the "USER API Key" (e.g: 3f2xxxxxxxxxxxxx). If there is no API key set click "Generate".
On the Motif WebUI open a camera and navigate to the "Review/Copy" tab. Past the API key to the "Loopy User" text field, select a video, and click "Upload".
Motif will provide feedback on the upload process and if the data was uploaded successfully.
A default API key can be set by setting LoopyAPIKey
in Recording
Tip
You can also upload to loopy, from a Motif system, using the command line tool recnode-loopy-upload
Export Recordings
Multiple camera field systems, systems without a GPU, or system with extremely high resolution and framerate often do not support live compression, hence the disk fills up quite quickly with "raw" recordings.
Exporting converts "raw" recordings to compressed files and saves a lot of disk space. Exporting can be done on the system to free up space, or it can be done as part of the copy process.
Tip
If you want to convert an imgstores to a normal mp4 file, see converting imgstores below.
Warning
Exporting is very resource intensive and therefore should not be used while recording.
Export to This System (convert videos)
Exported movies are much smaller than "raw" recordings. Live compression is not possible as to slow on field system. This step has to be moved to a later point in time. For exporting open the camera menu and select the "Export" tab of one of the cameras.
If you have exported movies that way do not use "EXPORT ALL" as it will re-export and might fail. To be save use "Export Selected".
It is possible but not recommended to export while powered from battery, however, long recording session might make it necessary.
Export Directly to an External Drive
For exporting to an external drive, or other location, you need to have at least one network share configured, or have attached a USB3 drive with enough free space to one of the USB3 Ports.
(This is only supported from the multicamera view; not available on all systems) This will enable the fields "EXPORT ALL", "COPY ALL", and "MOVE ALL".
- "EXPORT ALL"
first exports each raw recording to the "High" quality preset for export and moves the exported version to the external drive. If successful, the "raw" recording will be deleted. - "COPY ALL"
all files ("raw" and "exported") will be copied to the external drive. Copy will only copy files that are not yet copied to the external file (synchronization) - "MOVE ALL"
will move all files to the external drive not yet present. The copy on the recording system will be deleted. - "EJECT" the USB drive before disconnecting it
Imgstore Format & Reading Imgstores
Imgstore is a container for video frames and metadata. It allows efficient storage and seeking through recordings from hours to weeks in duration.
Note
By default Motif records to imgstore format with a fixed framerate of 25fps - independent of the camera framerate. The configured framerate of the camera at the time of recording is stored in the user metadata and in the case of the framerate changing during recording, can be derived from the frame timestamps also recorded in the frame metadata. See here for API.
Tip
To read imgstores it is recommend to use the provided imgstore python library and not manually open the data, metadata, and video files.
Frame Metadata
Motif uses imgstore to record the frame_number
and frame_timestamp
for every frame in the imgstore.
This means, every frame in an imgstore can be located or referred to, 3 different ways
frame_number
an integer, usually directly from the camera, in the range of N ... M. The first frame in an imagestore is not necessarily N=frame_number=0.frame_time
a floating point number in seconds, in 99% of cases and camera configurations, this is the unix epoch - the number of seconds since 1970-1-1 (in UTC).frame_index
an integer, in the range 0 ... P. The first frame in the store is always frame_index=0.
Frame Timestamps
The imgstore format stores the timestamp of the frame along side the framenumber and image data. The meaning of the timestamp depends on the camera backend and camera configuration in some situations outlined in the table below.
Backend | Default | Supports 'ChunkTimestamp' |
---|---|---|
OpenCV | time.time() |
N |
Axis | time.time() |
N |
Basler(cypylon) | time.time() |
Y (^1) |
Basler(pypylon) | time.time() |
N |
Ximea | time.time() |
N |
Arena | time.time() |
N |
Spinnaker | (^2) | Y (^1) |
PyCapture | ChunkTimestamp | Y (^3) |
Notes:
time.time()
is the time in seconds since the epoch. This is a common form of time on systems, and more information can be found here.- 'ChunkTimestamp' is manufacturer dependent, but is typically the number of seconds since the camera powered on.
^1
: it can be enabled by setting the camera propertyMotifEnableChunkTimestamp
(see here).^2
: per default spinnaker returns a derived yet equivalent value astime.time()
. It is calculated using information from the 'ChunkTimestamp'. This feature will be removed in future and it will behave as other backends - returning eithertime.time()
or 'ChunkTimestamp' based on explicit setting of theMotifEnableChunkTimestamp
value.^3
: only 'ChunkTimestamp' is supported here.
Times and Dates
A timezone can be configured in the configuration file in the
Common
section, Timezone
key. The value of this setting is recorded in the imgstore and can be accessed
via ImgStore.user_metadata
on the imgstore api.
The filename of every imgstore/movie includes the current local time and date. This respects any Timezone
setting
as described above.
Imgstore itself also records the UTC time it was created, and the current system timezone.
This is accessible via ImgStore.created
on the imgstore api.
This may differ from any explicit timezone set above.
Tip
While frame timestamps are typically epoch time, and thus carry no timezone information, you
can convert them to datetime objects with timezone information, using the API
convert_frame_time_to_datetime()
Viewing Imgstores
The imgstore library includes a simple command
line tool, imgstore-view
that can be used for viewing imgstores. This command is
pre-installed on motif systems, but can also be used by installing imgstore on
other computers.
On a motif system, you can use the recnode-transcode
command to convert imgstores to
conventional mp4 files - but you will lose the frame metadata.
There are also several code examples showing how to read imgstores programatically from your software.
Imgstore is also natively supported in research software such as SLEAP and wormtracker.
Imgstores are supported natively in Loopy, including the ability to plot the frame metadata and any other sensor data recorded - beside and synchronized with the video. You can upload imgstores directly to loopy:
- from inside motif,
- using the command line tool
recnode-loopy-upload
- using our stanalone software uploader
Converting Imgstores
If you want to convert and imgstore to an MP4 of the correct (native, original) framerate,
you can use the $ recnode-transcode
(available in Motif 6).
The command is available on the PC on which Motif is installed.
Warning
The conversion process is very resource intensive and therefore should not be used while recording.