Table of Contents

Class VideoMetadata

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

Provides metadata for a video, including the start and end offsets for clipping and the frame rate.

public record VideoMetadata : IEquatable<VideoMetadata>
Inheritance
VideoMetadata
Implements
Inherited Members

Properties

EndOffset

Optional. The end offset of the video.

[JsonPropertyName("endOffset")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? EndOffset { get; set; }

Property Value

string

Fps

Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0].

[JsonPropertyName("fps")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? Fps { get; set; }

Property Value

double?

StartOffset

Optional. The start offset of the video.

[JsonPropertyName("startOffset")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? StartOffset { get; set; }

Property Value

string

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a VideoMetadata object.

public static VideoMetadata? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

VideoMetadata

The deserialized VideoMetadata object, or null if deserialization fails.