Skip to content

Video Compression Options

Daniel Aharoni edited this page Feb 26, 2020 · 1 revision

The Miniscope DAQ Software is capable of compressing video data as it is saved to a hard drive. You can choose which compression codec you would like to use for each device video stream by setting the "compression" value for each device in your user configuration file.

The compression codecs available to you will depend on your operating system and which codec are installed on your computer. To get a list of the standard available codecs available on your specific computer, just run the Miniscope DAQ Software and a list of available codecs will show up in the main window:

It is important to note that some compression algorithms, especially lossless compression, may use significant CPU resources and your computer might not be able to keep up with the incoming video stream. If this happens, you will see the "bufferCount" in the top right of the video display window turn red as well as errors showing up in the software control panel. If this happens, it means you are throwing away data during your experiment and need to change codecs.

Below is a short description of the standard compression codecs you may consider using. We suggest trying to stick to lossless options for Miniscope streams while behavioral camera streams often are ok with lossly compression:

Lossless Compression Options

  • "GREY": This is a fully uncompressioned option for grey scale videos. This option can be used with the Miniscope video stream as well as with monochrome behavior cameras. Out of all compression options, it uses the least amount of your CPU but also results in the largest video files. If you computer is having trouble keeping up with the data compression, and you don't want to use lossy compression options, this is for you!
  • "FFV1": This is relatively fast lossless video compression option but may still require a pretty beefy computer depending on the number of video streams and resolution of each stream.
  • "LAGS": Another lossless compression option. I think FFV1 might be quicker than LAGS.
  • "I420": This option will not compress the pixel intensity of grey scale video streams but will effectively subsample the color space for color video streams.

Lossy Compression Options

  • "MJPG": A standard lossly compression algorithm that is fast.
  • "XVID": Another standard lossly compression algorithm. Seems somewhat comparible to MJPG.
  • "ASV1": I think this is equivalent to H264 compression.