# VideoFormat (/zh-CN/api-reference/rtc/cpp-all-platforms/class-videoformat)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

<a id="class_videoformat__prototype"></a>

```cpp
struct VideoFormat {
  OPTIONAL_ENUM_SIZE_T{
      kMaxWidthInPixels = 3840,
      kMaxHeightInPixels = 2160,
      kMaxFps = 60,
  };
  int width;
  int height;
  int fps;
  bool operator<(const VideoFormat& fmt) const {
    if (height != fmt.height) {
      return height < fmt.height;
    } else if (width != fmt.width) {
      return width < fmt.width;
    } else {
      return fps < fmt.fps;
    }
  }
  bool operator==(const VideoFormat& fmt) const {
    return width == fmt.width && height == fmt.height && fps == fmt.fps;
  }
  bool operator!=(const VideoFormat& fmt) const { return !operator==(fmt); }
};
```

<a id="class_videoformat__parameters"></a>

## 属性 [#属性]

<ParameterList>
<a id="width"></a>
<Parameter name="width">

视频帧的宽度（单位：像素）。默认值为 960。

</Parameter>
<a id="height"></a>
<Parameter name="height">

视频帧的高度（单位：像素）。默认值为 540。

</Parameter>
<a id="fps"></a>
<Parameter name="fps">

视频帧率（单位：帧每秒）。默认值为 15。

</Parameter>
</ParameterList>
