Impact Acquire SDK GUI Applications
Video Stream Recording With FFmpeg
Since
Version 2.39.0 of this application

With the Video Stream Recording, it is possible to compress the acquired images into a video stream container and save it on the hard disk.

Note
The recording functionality is based on features provided by the FFmpeg (https://ffmpeg.org) project. In order to use it you need to:
  • Download the shared FFmpeg packages in version 4.x from the project website
  • Extract the package in the proper folder, specified by your operating system (Have a look at the detailed documentation of the VideoStream class for the programming language you plan to work with, use C++ if you don't plan to develop code. Within the C++ documentation navigate to "Modules → Common → VideoStream", click on it and scroll down to "Detailed Description")

In ImpactControlCenter, a video stream can be recorded by the 'Start', 'Pause' and 'Stop' buttons at the top right tool-bar. They are however inactive when the video stream recording mode is deactivated OR when the video stream is not correctly set up.

Figure 1: Video stream recording control buttons (inactive)

A video stream needs to be set up first to be able to get recorded. To do so:

  1. Select the device to use and open it by clicking on the 'Use' button.
  2. Navigate to the 'Capture' menu and click on the 'Video Stream Recording...' option to start a setup dialog.
    Figure 2: Click 'Video Stream Recording...'

  3. A setup dialog will then be initialized as follows. Please read the setup hints in the text box for more information.
    Figure 3: Video stream recording setup dialog

  4. Enable the video stream recording mode. Choose a pixel format (e.g. 'YUV422Packed' or 'YUV422Planar') that will be generated by the Impact Acquire framework and used by FFmpeg for video stream encoding. Then click on 'Select an output file' to create/choose a file to hold the recorded video stream.
    Figure 4: Enable the video stream recording mode and set up Impact Acquire framework related parameters

  5. In the file selector, choose a file type (e.g. '*.mp4' or '*.m2v') and enter a file name.
    Figure 5: Select an output file

  6. Set up video stream related parameters accordingly. In the check boxes below, users are allowed to choose whether to synchronize acquisition stop with recording stop and whether to overwrite the already recorded video stream if the currently selected output file has the same file name as the previous one.
    Figure 6: Set up video stream related parameters

  7. Once the video stream recording has been set up, click 'Apply' or 'Ok' to apply the current settings. Afterwards, a log message in the analysis output will indicate whether the current settings have been applied successfully. If successful, the 'Start' control button at the top right tool-bar will be enabled.
    Figure 7: Apply the current settings
Note
When deactivating the video stream recording, uncheck the 'Enable video stream recording mode' and then click 'Apply' or 'Ok' for the settings to take effect.

Once the settings have been applied, users can control the recording process via the 'Start', 'Pause' and 'Stop' buttons:

  • Start recording: Click the 'Start' control button to start recording the video stream. The current recording status and information will be displayed in the analysis output. During recording, the setup dialog as well as the 'Start' button will be disabled. The 'Pause' and 'Stop' buttons will then be enabled.
    Figure 8: Start recording

  • Pause recording: Click the 'Pause' button to pause a running recording. The current recording status will be displayed in the analysis output.
    Figure 9: Pause recording

  • Resume recording: Click the 'Pause' button to resume a paused recording. The current recording status will be displayed in the analysis output.
    Figure 10: Resume recording

  • Stop recording: Click the 'Stop' button to stop recording the video stream. The current recording status and information will be displayed in the analysis output. Once the recording has been stopped, the setup dialog as well as the 'Start' button will be enabled again. The 'Pause' and 'Stop' buttons will then be disabled.
    Figure 11: Stop recording

When recording to an output file which has the same file name as the previous one while overwriting the recorded content is not desired:

  1. When clicking 'Start', a file selector will pop up to ask users to create a new output file with the same file type as the previous one. If a new set of parameters of the video stream recording is needed, please click 'Cancel' in the file selector and re-configure parameters in the setup dialog.
    Figure 12: Select a new file when starting to record to an output file with the same file name as the previous one without overwriting

  2. Once a new file has been created, the video stream will start to get recorded. The current recording status and information will be displayed in the analysis output. During recording, the setup dialog as well as the 'Start' button will be disabled. The 'Pause' and 'Stop' buttons will then be enabled.
    Figure 13: Start recording to an output file with the same file name as the previous one without overwriting