MATRIX VISION - mvHYPERION Technical Documentation
Using Video Stream Recording

With the FFmpeg libraries it is possible to record an mvIMPACT Acquire image stream into a compressed video stream.

Since
2.39.0

Requirements

Since the mvIMPACT Acquire API internally uses FFmpeg to record video streams, the FFmpeg libraries need to be present on the target system as well. They can either be built OR installed into the systems default library search path OR installed somewhere and afterwards an environment variable MVIMPACT_ACQUIRE_FFMPEG_DIR can be defined that points to the folder containing the libraries.

Note
Please make sure that you fully understand the license coming with FFmpeg! Have a look at the corresponding legal section inside any of the SDK manuals.
At least FFmpeg 4.x is needed. Older versions of the FFmpeg API are NOT compatible!

Windows

  1. Go to https://ffmpeg.org/download.html and download the dynamic libraries of FFmpeg (version >= 4.x) according to your operating system (e.g. 'ffmpeg-20200809-6e951d0-win64-shared.zip')
  2. Extract the *.zip file under '${MVIMPACT_ACQUIRE_DIR}/Toolkits'.
  3. Rename the file to 'ffmpeg-4.2.2-win64-shared'(64-bit)/'ffmpeg-4.2.2-win32-shared'(32-bit) OR set an environment variable e.g. 'MVIMPACT_ACQUIRE_FFMPEG_DIR' which points to the folder containing the libraries.

Recording in wxPropView

Here is how to configure the video streaming recording in wxPropView:

  1. Select pixel format 'YUV422Packed' or 'YUV422Planar' in "Setting -> Base -> ImageDestination" (alternatively pixel format 'YUV422_YUYVPacked' or 'YUV422_8' in "Setting -> Base -> Camera -> GenICam -> ImageFormatControl" if these formats are supported by the camera. When selected inside the camera the overall CPU load will be reduced!). Most codecs will only work with these pixel formats.
    Figure 1: Set up pixel format in ImageDestination

  2. Start "Setup Video Stream Recording...".
    Figure 2: Set up video stream recording

  3. Click 'Yes' to create a video file for the compressed stream, choose the desired codec and the compression quality.
    Figure 3: Setup Video Stream Recording...

    Figure 4: Name the video file

    Figure 5: Choose the video codec

    Figure 6: Choose the video compression quality

  4. Click 'Acquire' to start streaming.
    Figure 7: Click 'Acquire' to start streaming

  5. Open "Setup Video Stream Recording..." and click 'Cancel' to stop recording.
    Figure 8: Click 'Cancel' to stop recording

Recording Using The API

Please refer to the example on how to record a video stream using mvIMPACT Acquire C++ API: ContinuousCaptureFFmpeg.cpp or have a look at the VideoStream class.