Vixen
02b45cc4
csharp
public record class VideoClip

A video the content build knows about: where its bytes are, and what is in them.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

A reference, not the bytes. Every other clip in the engine holds its data — AudioClip holds the samples, a texture holds the texels — and a video cannot. A two-minute cutscene is a hundred megabytes; loading it to play it would mean the loading screen for a cutscene being longer than the cutscene. So the asset is the metadata the editor and the game need before opening the file, and the file is streamed.

The metadata is the importer's, not the demuxer's. Everything here is readable from the container, and reading it means opening the file — which is exactly what a game choosing between three cutscenes, or an editor drawing a list of them, does not want to do. The importer reads it once at build time and writes it here.

Fields and properties (12)

  • public string Address

    The address of the file, as the content build knows it.

  • public string ContainerAddress

    Where the container's bytes are, for whatever opens them.

  • public int Width

    The picture's width in samples.

  • public int Height

    Its height in samples.

  • public TimeSpan Duration

    How long it is, or zero if the container did not say.

  • public int FrameRateNumerator

    The nominal frame rate's numerator.

  • public int FrameRateDenominator

    The nominal frame rate's denominator.

  • public string CodecId

    The video codec the container names — V_VP9, V_UNCOMPRESSED.

  • public string FourCc

    The sample format of an uncompressed track — I420, BGRA — or empty.

  • public string AudioCodecId

    The audio codec the container names, or empty if there is no audio track.

  • public bool HasAudio

    Whether the file has an audio track at all.

  • public VideoRational FrameRate

    The nominal frame rate.

Used by (5)

  • VideoPlaybackVixen.Video
  • VideoPlaybackTestsVixen.Video.Tests
  • Vixen_Video_VideoClipSerializerVixen.Video
  • VideoImporterVixen.Editor.Assets
  • VideoImporterTestsVixen.Editor.Assets.Tests