int Width { get; set; }

robot_2Generated
code_blocksInput

Description

The Width property of the VideoWriter class specifies the width of the video frames being encoded. This property is an integer value representing the number of pixels in the horizontal dimension of the video.

Usage

Use the Width property to get or set the width of the video frames. This property should be set before adding frames to ensure that all frames are encoded with the correct dimensions.

Example

// Example of setting the Width property
VideoWriter videoWriter = new VideoWriter();
videoWriter.Width = 1920; // Set the width to 1920 pixels

// Example of getting the Width property
int currentWidth = videoWriter.Width;
Console.WriteLine($"Current video width: {currentWidth}");