Filter SDK/VideoInfo
From Avisynth
VideoInfo provides basic information about the clip your filter receives.
[edit] Getting information from VideoInfo
bool HasVideo();
This will return true if there is any video in the given clip.
bool HasAudio();
This will return true if there is any audio in the given clip.
bool IsRGB24(); bool IsRGB32(); bool IsRGB();
This will return true if the colorspace is RGB (in any way). The first two return true if the clip has the specific RGB colorspace (RGB24 and RGB32). The third return true for any RGB colorspace; future formats could also apply.
bool IsYUY2(); bool IsYV12(); bool IsYUV();
This will return true if the colorspace is YUV (in any way). The first two return true if the clip has the specific YUV colorspace (YUY2 and YV12). The third return true for any RGB colorspace; future formats could also apply. Note that I420 is also reported as YV12, because planes are automatically swapped.
bool IsPlanar();
This will return true if the video is planar. For now only YV12 returns true, but future formats might also do so. See the Planar image format.
bool IsFieldBased();
This will return true if the video has been through a SeparateFields, and the video has not been weaved yet. Otherwise it will return false.
bool IsParityKnown(); bool IsBFF(); bool IsTFF();
This will return true if the (interlaced) video parity is known and whether the video is bottom-field-first or top-field-first respectively.
bool IsColorSpace(int c_space);
This function will check if the colorspace (VideoInfo.pixel_type) is the same as given c_space.
bool IsSameColorspace(const VideoInfo& vi2);
This function will compare two VideoInfos, and check if the colorspace is the same. Note: It does not check imagesize or similar properties.
bool Is(int property);
This function is reserved for future use. Currently works as IsColorSpace.
Threre are some other useful information in VideoInfo structure (width, height, fps_numerator, fps_denominator, num_frames, various audio properties). See 'avisynth.h' header file.
Back to Internal functions.

