跳转到内容
STAGING SERVER
DEVELOPMENT SERVER

录制#

pylon Viewer 的录制功能允许您录制视频片段或静止图像序列。

Apart from the usual purposes, sequences of still images can also be used to create data sets for use in pylon AI projects.

The Recording feature is included in the Windows (AVI output format only) and macOS (MPEG-4 output format only) versions of the pylon Viewer. To add the MP4 output format and enable recording under Linux, install the pylon Supplementary Package for MPEG-4 (available for Windows and Linux).

信息

pylon's Recording feature has been developed with ease-of-use as the main focus. As such, performance may not be suitable for all applications. For best results, Basler recommends discussing your application with Basler sales and support teams in advance to determine the best-fitting hardware and software solutions.

When using the Recording feature on ace 2 Pro camera models, the Compression Beyond feature has to be disabled. If a recording is started and the Compression Beyond feature is enabled, pylon will first disable Compression Beyond on the camera and then start recording.

运作原理#

If the Recording feature is available, you can click the Record button in the pylon Viewer toolbar to start a recording:

“录制”图标

录制的视频片段或静止图像显示在所选相机的图像窗口中。您可以使用计算机上安装的任何标准媒体播放器(例如 Windows Media Player)播放生成的视频。

Recordings are saved with the following file naming convention:

<Cameraname>_<SerialNumber>_<YYYY:MM:DD>_<hh:mm:ss:zzz>.<File Extension>

录制设置#

要打开录制设置窗格,请单击窗口 > 录制设置

录制页面

您可以看到以下选项:

  • 视频:选择此选项以录制视频片段。

    • 输出格式:选择所需输出格式。有关输出格式的更多信息,请参见下面的注释。

    信息

    输出格式

    录制功能支持 AVI 和 MP4 格式。哪种格式最适合要取决于您的需要。

    AVI 最适合录制高质量无损视频,因为它允许您录制无压缩视频。缺点是文件大小限制为 2 GB。达到该阈值后,录制将停止并显示错误消息。

    录制 MP4 视频时没有文件大小限制。但是,MP4 格式始终将数据压缩到一定程度,这会导致细节丢失。如果将质量选项设置为 80% 或更高,则使用分辨率为 20 MP 或更高的相机录制视频文件可能会失败。要解决此问题,请将质量设置为较低的值。

    • 设置固定播放速度:确定以什么速度(以每秒帧数为单位,即 fps)播放录制的视频片段。如果未选择此选项,视频片段将实时播放,即按照与录制时相同的速度播放。

    信息

    最小播放速度为每秒 1 帧。也就是说,如果您以每分钟 1 帧的速度录制视频,则仍将以每秒 1 帧的速度回放。

    • 使用压缩:(仅在选择 AVI 输出格式时可用)。如果选择此选项并单击 ... 按钮,则会打开 Windows 压缩选项对话框,您可以在其中选择所需的编解码器。
    • 质量:(仅在选择 MP4 输出格式时可用)。此选项允许您通过设置所需的质量级别来调整压缩率。高质量设置意味着低压缩率,反之亦然。
  • 静止图像序列:选择此选项可以录制一系列静止图像。

    • Output format: Determines the file format of the resulting images. You can choose from the following formats:
      • Bitmap
      • Tiff
      • Png
      • Jpeg
      • 原始
  • 录制缓冲区大小:确定在录制期间,缓冲区中可以存储多少图像。如果无法足够快地从相机中读取图像,则图像缓冲区就像是用于存储图像的高速缓存。您可以指定要在缓冲区中存储的图像数量。在录制过程中,图像显示区域中的状态栏会向您显示缓冲区的使用量(百分比)。

  • 帧录制间隔:您可以选择录制帧的速率。您可以在时间间隔或帧之间进行选择。

  • 停止录制倒计时:选择此选项可以在经过一定时间或录制了一定数量的帧后停止录制。

  • 输出文件夹:确定将结果视频片段和图像存储在何处。使用 按钮导航到您的首选位置。

pylon MPEG-4 补充软件包#

pylon MPEG-4 补充软件包提供 Windows 和 Linux 版本。它通过以下方式增强了录制功能:

  • 在 Linux 下,它会启用录制功能。仅 MP4 输出格式可用。
  • 在 Windows 下,该软件包添加了 MP4 输出格式。

您可以从 Basler 网站下载该软件包。

录制期间的图像显示区域#

When you're recording a video or a sequence of still images, a red recording icon appears in the status bar of the image window. You can pause the recording by clicking the Record button on the toolbar, by pressing the F10 button or by clicking Camera in the menu bar and selecting Pause. The recording icon then changes to a pause icon. To restart the recording, click the Pause button again.

“暂停”图标

图像窗口底部的状态栏显示了相机的状态。它还显示已录制和丢失的帧数以及图像缓冲区的使用情况。当图像缓冲区达到最大容量时,系统将丢弃帧。要解决这种情况,请根据需要增加缓冲区大小