<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://avisynth.nl/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://avisynth.nl/index.php?action=history&amp;feed=atom&amp;title=Filter_SDK%2FVideoInfo</id>
		<title>Filter SDK/VideoInfo - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://avisynth.nl/index.php?action=history&amp;feed=atom&amp;title=Filter_SDK%2FVideoInfo"/>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=Filter_SDK/VideoInfo&amp;action=history"/>
		<updated>2026-04-19T10:12:13Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.24</generator>

	<entry>
		<id>http://avisynth.nl/index.php?title=Filter_SDK/VideoInfo&amp;diff=788&amp;oldid=prev</id>
		<title>Admin: 1 revision</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=Filter_SDK/VideoInfo&amp;diff=788&amp;oldid=prev"/>
				<updated>2013-05-09T21:33:53Z</updated>
		
		<summary type="html">&lt;p&gt;1 revision&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='1' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 21:33, 9 May 2013&lt;/td&gt;
			&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://avisynth.nl/index.php?title=Filter_SDK/VideoInfo&amp;diff=787&amp;oldid=prev</id>
		<title>92.233.37.17: /* Video-related information */</title>
		<link rel="alternate" type="text/html" href="http://avisynth.nl/index.php?title=Filter_SDK/VideoInfo&amp;diff=787&amp;oldid=prev"/>
				<updated>2011-07-29T13:06:16Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Video-related information&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;VideoInfo provides basic information about the clip your filter receives.&lt;br /&gt;
&lt;br /&gt;
== Getting information from VideoInfo ==&lt;br /&gt;
&lt;br /&gt;
=== Video-related information ===&lt;br /&gt;
&lt;br /&gt;
 bool HasVideo();&lt;br /&gt;
&lt;br /&gt;
This will return true if there is any video in the given clip.&lt;br /&gt;
&lt;br /&gt;
 bool IsRGB24();&lt;br /&gt;
 bool IsRGB32();&lt;br /&gt;
 bool IsRGB();&lt;br /&gt;
&lt;br /&gt;
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 returns true for any RGB colorspace; future formats could also apply.&lt;br /&gt;
&lt;br /&gt;
 bool IsYUY2();&lt;br /&gt;
 bool IsYV12();&lt;br /&gt;
 bool IsYUV();&lt;br /&gt;
&lt;br /&gt;
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 returns true for any YUV colorspace; future formats could also apply. Note that I420 is also reported as YV12, because planes are automatically swapped.&lt;br /&gt;
&lt;br /&gt;
 bool IsColorSpace(int c_space);&lt;br /&gt;
&lt;br /&gt;
This function will check if the colorspace (VideoInfo.pixel_type) is the same as given c_space (or more general it checks for a [[Colorspace property]] (see avisynth.h)).&lt;br /&gt;
&lt;br /&gt;
 bool IsSameColorspace(const VideoInfo&amp;amp; vi2);&lt;br /&gt;
&lt;br /&gt;
This function will compare two VideoInfos, and check if the colorspace is the same. Note: It does not check imagesize or similar properties.&lt;br /&gt;
&lt;br /&gt;
 bool Is(int property);&lt;br /&gt;
&lt;br /&gt;
This function is reserved for future use. Currently works as IsColorSpace.&lt;br /&gt;
&lt;br /&gt;
 bool IsPlanar();&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
 bool IsFieldBased();&lt;br /&gt;
&lt;br /&gt;
This will return true if the video has been through a [[SeparateFields]], and the video has not been [[Weave|weaved]] yet. Otherwise it will return false.&lt;br /&gt;
&lt;br /&gt;
 bool IsParityKnown();&lt;br /&gt;
&lt;br /&gt;
This will return true if the video parity is known.&lt;br /&gt;
&lt;br /&gt;
 bool IsBFF();&lt;br /&gt;
 bool IsTFF();&lt;br /&gt;
&lt;br /&gt;
This will return true if the video is bottom-field-first or top-field-first respectively.&lt;br /&gt;
&lt;br /&gt;
  void SetFieldBased(bool isfieldbased);&lt;br /&gt;
&lt;br /&gt;
This will set the field-based property to true (respectively false) if isfieldbased=true (respectively false).&lt;br /&gt;
&lt;br /&gt;
  void Set(int property);&lt;br /&gt;
  void Clear(int property);&lt;br /&gt;
&lt;br /&gt;
This sets respectively clears an image_type property like: IT_BFF, IT_TFF or IT_FIELDBASED. See field.h for examples.&lt;br /&gt;
&lt;br /&gt;
  int BitsPerPixel();&lt;br /&gt;
&lt;br /&gt;
This will return the number of bits per pixel. This can be:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
!width=50%| pixel_type&lt;br /&gt;
!width=50%| nr of bits&lt;br /&gt;
|-&lt;br /&gt;
| CS_BGR24&lt;br /&gt;
| 24&lt;br /&gt;
|-&lt;br /&gt;
| CS_BGR32&lt;br /&gt;
| 32&lt;br /&gt;
|-&lt;br /&gt;
| CS_YUY2&lt;br /&gt;
| 16&lt;br /&gt;
|-&lt;br /&gt;
| CS_YV12, CS_I420&lt;br /&gt;
| 12&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
  void SetFPS(unsigned numerator, unsigned denominator);&lt;br /&gt;
&lt;br /&gt;
This will set the framerate.&lt;br /&gt;
&lt;br /&gt;
  void MulDivFPS(unsigned multiplier, unsigned divisor);&lt;br /&gt;
&lt;br /&gt;
This will multiply the denominator by ''multiplier'' and scale the numerator and modified denominator.&lt;br /&gt;
&lt;br /&gt;
There is some other useful information in VideoInfo structure (width, height, fps_numerator, fps_denominator, num_frames, pixel_type and image_type). See 'avisynth.h' header file.&lt;br /&gt;
&lt;br /&gt;
=== Audio-related information ===&lt;br /&gt;
&lt;br /&gt;
 bool HasAudio();&lt;br /&gt;
&lt;br /&gt;
This will return true if there is any audio in the given clip.&lt;br /&gt;
&lt;br /&gt;
  int AudioChannels();&lt;br /&gt;
&lt;br /&gt;
This will return the number of audio channels.&lt;br /&gt;
&lt;br /&gt;
  int SampleType();&lt;br /&gt;
&lt;br /&gt;
This will return the sampletype. This can be:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
!width=50%| pixel_type&lt;br /&gt;
!width=50%| nr of bits&lt;br /&gt;
|-&lt;br /&gt;
| SAMPLE_INT8&lt;br /&gt;
| 1&amp;lt;&amp;lt;0&lt;br /&gt;
|-&lt;br /&gt;
| SAMPLE_INT16&lt;br /&gt;
| 1&amp;lt;&amp;lt;1&lt;br /&gt;
|-&lt;br /&gt;
| SAMPLE_INT24&lt;br /&gt;
| 1&amp;lt;&amp;lt;2&lt;br /&gt;
|-&lt;br /&gt;
| SAMPLE_INT32&lt;br /&gt;
| 1&amp;lt;&amp;lt;3&lt;br /&gt;
|-&lt;br /&gt;
| SAMPLE_FLOAT&lt;br /&gt;
| 1&amp;lt;&amp;lt;4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
  bool IsSampleType(int testtype);&lt;br /&gt;
&lt;br /&gt;
This function will check if the sampletype (VideoInfo.sample_type) is the same as testtype. &lt;br /&gt;
&lt;br /&gt;
  int SamplesPerSecond();&lt;br /&gt;
&lt;br /&gt;
This will return the number of bytes per second.&lt;br /&gt;
&lt;br /&gt;
  int BytesPerAudioSample();&lt;br /&gt;
&lt;br /&gt;
This will return the number of bytes per sample:&lt;br /&gt;
&lt;br /&gt;
  int BytesPerChannelSample()&lt;br /&gt;
&lt;br /&gt;
This will return the number of bytes per channel-sample. This can be:&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
!width=50%| sample&lt;br /&gt;
!width=50%| nr of bytes&lt;br /&gt;
|-&lt;br /&gt;
| SAMPLE_INT8&lt;br /&gt;
| sizeof(signed char)&lt;br /&gt;
|-&lt;br /&gt;
| SAMPLE_INT16&lt;br /&gt;
| sizeof(signed short)&lt;br /&gt;
|-&lt;br /&gt;
| SAMPLE_INT24&lt;br /&gt;
| 3&lt;br /&gt;
|-&lt;br /&gt;
| SAMPLE_INT32&lt;br /&gt;
| sizeof(signed int)&lt;br /&gt;
|-&lt;br /&gt;
| SAMPLE_FLOAT&lt;br /&gt;
| sizeof(SFLOAT)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
  __int64 AudioSamplesFromFrames(__int64 frames);&lt;br /&gt;
&lt;br /&gt;
This returns the number of audiosamples from the first ''frames'' frames.&lt;br /&gt;
&lt;br /&gt;
  int FramesFromAudioSamples(__int64 samples);&lt;br /&gt;
&lt;br /&gt;
This returns the number of frames from the first ''samples'' audiosamples.&lt;br /&gt;
&lt;br /&gt;
  __int64 AudioSamplesFromBytes(__int64 bytes);&lt;br /&gt;
&lt;br /&gt;
This returns the number of audiosamples from the first ''bytes'' bytes.&lt;br /&gt;
&lt;br /&gt;
  __int64 BytesFromAudioSamples(__int64 samples);&lt;br /&gt;
&lt;br /&gt;
This returns the number of bytes from the first ''samples'' audiosamples.&lt;br /&gt;
&lt;br /&gt;
There is some other useful information in VideoInfo structure (audio_samples_per_second, sample_type, num_audio_samples and nchannels). See 'avisynth.h' header file.&lt;br /&gt;
&lt;br /&gt;
Back to [[Filter_SDK/Internal_functions|Internal functions]].&lt;br /&gt;
&lt;br /&gt;
[[Category:FilterSDK]]&lt;/div&gt;</summary>
		<author><name>92.233.37.17</name></author>	</entry>

	</feed>