Image and Video Storage Formats¶
The MCAM software provides options to save the image data in various formats such as .nc, .mp4, and .tif.
In this section, we describe the tradeoffs between different image storage backends offered by the MCAM software.
In the context of the MCAM, data storage considerations include:
Lossy or lossless compression.
Typically lossless compression offers smaller compression ratios (good compression factors are between 1.5 and 2x)
Lossy compression can achieve compression ratios of 10x or more, but at the cost of losing the finer image (and video) details.
Random access or sequential
Random access allows for accessing arbitrary portions of the data without reading the entire image (or video).
File formats that require sequential access are often more efficient in their storage formats. However, data retrieval is slower.
Is the image captured by brightfield or fluorescence microscopy?
Brightfield images will typically be biased around a gray value (ideally 128 for 8-bit images) and have very few pixels with values smaller than 5. Some compression algorithms will squash these values to zero (0) which for brightfield images, may not be a problem.
Fluorescence images will typically be biased much closer to zero with few pixels (of containing the critical information) taking on value greater than 5. Maintaining the value of these pixels is critical and can limit the effectiveness of compression algorithms.
Natural vs synthetic image
Natural images often have more continuous values and can be harder to compress due to the inherent noise in the imaging system.
Synthetic images, or masks, that are the result of analysis algorithms discrete in the values they take on often with large contiguous portions of the image taking on the exact same value.
RGB sensor or Monochrome
Monochrome sensors have a single (optional) wavelength filter that is used across the entire sensor. Pixels are often associated as having a single value for each location in the image sensor (pixel).
RGB sensor utilize a bayer filter to capture color information. Each pixel measures an approximate of the red, green or blue component of an image. With bayer filters, no one pixel measure all 3 color components at once. However, a software post processing step combines measurements of neighboring pixels to associate 3 colors (red, green, and blue) with a single pixel. Data can either be stored as “RGB” pixels, or in the raw captured format. The raw captured data takes less space when stored in an uncompressed fashion but may be harder to work with. The RGB format may be more intuitive but takes more space when stored in an uncompressed fashion.
No matter where the image data is stored, a file called metadata.nc will be
used to store the metadata information (pixel width, image name, exposure, and
other associated information). This file is used in conjuction with the mp4
or tif image to create the full MCAM dataset.
As of version 0.19.460 (released on March 30, 2026), we offer the following options for saving MCAM datasets:
.ncfiles - Lossless compression with random access.Data stored in these files is the closest representation of exactly what is measured by the MCAM but may be prohibitively difficult to transfer between machines due to its sheer size.
Expected Compression Factor: 1.
Best for: Initial exploration to ensure data that is being captured is correct.
.mp4files stored asmulti-mp4– High quality lossy compression, sequential access.Our multi-mp4 format stores the output of each micro camera as its own MP4 file. This makes it easy to take data from the MP4 and process it as part of your own post processing pipeline.
While typical MP4 files are not compatible with true random access, the MP4 files generated by the the MCAM software provide rapid seeking to frames at offsets that are integer multiples of 60. This allows for rapid predictable seeking to frames at large offsets without having to decompress the entire video.
Expected Compression Factor: 10x.
Best for: Data captured with “High Resolution” settings.
Note: Wihle the data is captured at the frame rate of your choosing, the MP4 file will have a frame rate of 30 frames per second regardless of the recording frame rate. This is to ensure high scientific image quality regardess of the captured frame rate. Our metadata.nc file stores the original frame rate to help our software report the playback frame rate accordingly. If you are using software like VLC to play the MP4 files, VLC provides ways to speed up and slowdown video playback with the keys
[(slower), and[(faster). You can use these keys to adjust the playback speed of the MP4 files to match the original frame rate.
.mp4files stored astiledmp4– High quality lossy compression, sequential access.Our tiled-mp4 format combines the output of multiple micro cameras in a single MP4 file. This improves the compression speed since there is less overhead in creating the MP4 file structure.
Expected Compression Factor: 10x.
Best for: Data captured with “High Speed” settings for the Kestrel in Behavior mode.
Note: Wihle the data is captured at the frame rate of your choosing, the MP4 file will have a frame rate of 30 frames per second regardless of the recording frame rate. This is to ensure high scientific image quality regardess of the captured frame rate. Our metadata.nc file stores the original frame rate to help our software report the playback frame rate accordingly. If you are using software like VLC to play the MP4 files, VLC provides ways to speed up and slowdown video playback with the keys
[(slower), and[(faster). You can use these keys to adjust the playback speed of the MP4 files to match the original frame rate.
.tiffiles - Lossless or lossy compression with random access.Each TIFF file contains information captured by one micro-camera at one given location. When using lossless compression, data stored in these files is the closest representation of exactly what is captured by the MCAM, bit for bit. When using lossy compression, the quality of the images can be turned as one trades off between image size, and visual quality.
Expected compression factor: Lossless 1.5-2x.
Expected compression factor: Lossy 10x or more.
Best for: Multi-channel fluorescence data.
.pngfiles - Lossless compression with random access.Each PNG file contains information captured by one micro-camera at one given location. When using lossless compression, data stored in these files is the closest representation of exactly what is captured by the MCAM, bit for bit. Note that PNG decompression can be quite slow compared to more modern compression algorithms used with TIFF images.
Expected compression factor: 2x.
Best for: Compatibility with software that does not support TIFF images.
Compatibility with External Image and Video Viewers¶
We strive to make sure our data is compatible with a variety of external image viewers. However, our image and video quality settings are often tuned to extremely high quality which limits the playback performance of many image and video players.
If our videos are incompatible with your image viewers, please let us know and we will do our best to try to provide options as to why this may be the case.