Info

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
 
(add link to avs+ documentation)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:FuncDef|Info(clip ''clip'')}}
+
<div style="max-width:82em; min-width:42em;" >
 +
<div {{BlueBox2|40|0|3px solid purple}} >
 +
{{AvsPlusFullname}}<br>
 +
Up-to-date documentation: [https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/corefilters/info.html https://avisynthplus.readthedocs.io]
 +
</div>
  
It gives info of a clip printed in the left corner of the clip. The info consists of the duration, [[Color_spaces|colorspace]], size, frame rate, whether it is field or frame based, whether AviSynth thinks it is bottom (the default in case of [[AviSource]]) or top field first, whether there is audio present, the number of channels, sample type, sample rate and the audio duration (number of samples and hh:mm:ss:msmsms). In v2.55 a CPU flag is added with supported optimizations. In v2.60, Info creates its own canvas when supplying an audio only clip.
 
  
'''example:'''
+
{{AvsStarFilter}}
 +
<div style="max-width:62em" >
 +
Gives [[Clip_properties|clip property information]] as a text overlay in the upper-left corner.
  
[[AviSource]]("C:\filename.avi")
+
{{FuncDef|Info(clip ''clip'')}} <br>
Info()
+
{{FuncDef|Info(clip ''clip'', [string ''font'', float ''size'', int ''text_color'', int ''halo_color'' )}} {{AvsPluscon}}
  
Results in a video with information in the left corner:
+
:{{Par2|font|string|"Arial"}}
 +
::Font name; can be the name of any installed Windows font.
  
 +
:{{Par2|size|float|(auto)}}
 +
::Height of the text in pixels, and is rounded to the nearest 0.125 pixel. Default depends on clip resolution.
 +
 +
:{{Par2|text_color|int|[[Preset colors|color_yellow]]}}
 +
:{{Par2|halo_color|int|[[Preset colors|color_black]]}}
 +
::Colors for font fill and outline respectively. Default yellow, black.
 +
 +
 +
----
 +
The displayed information consists of:
 +
* current frame and total frame count,
 +
* current time and total duration,
 +
* [[Color_spaces|colorspace]],
 +
* width and height,
 +
* frame rate (as floating-point and fraction),
 +
* whether it is field or frame based,
 +
* parity: whether AviSynth thinks it is bottom or top field first,
 +
* video pitch (length of a video line in bytes),
 +
* whether there is audio present,
 +
* the number of audio channels,
 +
* audio sample type,
 +
* audio sample rate,
 +
* total audio samples and total audio duration (hh:mm:ss:ddd),
 +
* a CPU flag with supported optimizations.
 +
 +
In v2.60, '''Info''' creates its own canvas when given an audio only clip.
 +
 +
 +
'''Example:'''
 +
<div {{BoxWidthIndent|36|1}} >
 +
[[AviSource]]("C:\filename.avi")
 +
Info
 +
</div>
 +
Results in a video with the following information overlay:
 +
<pre style="width:36em;margin:0 0 0 1em;padding:0.5em;border:none;background-color:black;color:yellow;font-weight:bold" >
 
  Frame: 0 of 6035
 
  Frame: 0 of 6035
 
  Time: 00:00:00:000 of 00:04:01:400
 
  Time: 00:00:00:000 of 00:04:01:400
Line 24: Line 65:
 
  Audio length: 10650150 samples. 00:04:01:500
 
  Audio length: 10650150 samples. 00:04:01:500
 
  CPU deteced: x87 MMX ISSE SSE 3DNOW 3DNOW_EXT
 
  CPU deteced: x87 MMX ISSE SSE 3DNOW 3DNOW_EXT
 +
 +
</pre>
  
 
'''Changelog:'''
 
'''Changelog:'''
 
{| border="1"
 
{| border="1"
 +
|-
 +
| AVS+
 +
| Added formatting arguments.
 
|-
 
|-
 
| v2.60
 
| v2.60
Line 40: Line 86:
 
| Initial Release.
 
| Initial Release.
 
|}
 
|}
 
+
</div>
 +
</div>
  
 
[[Category:Internal filters]]
 
[[Category:Internal filters]]
 +
[[Category:Debugging/Diagnostic filters]]

Latest revision as of 06:28, 18 September 2022

AviSynth+
Up-to-date documentation: https://avisynthplus.readthedocs.io


Gives clip property information as a text overlay in the upper-left corner.

Info(clip clip)
Info(clip clip, [string font, float size, int text_color, int halo_color ) AVS+

string  font = "Arial"
Font name; can be the name of any installed Windows font.
float  size = (auto)
Height of the text in pixels, and is rounded to the nearest 0.125 pixel. Default depends on clip resolution.
int  text_color = color_yellow
int  halo_color = color_black
Colors for font fill and outline respectively. Default yellow, black.



The displayed information consists of:

  • current frame and total frame count,
  • current time and total duration,
  • colorspace,
  • width and height,
  • frame rate (as floating-point and fraction),
  • whether it is field or frame based,
  • parity: whether AviSynth thinks it is bottom or top field first,
  • video pitch (length of a video line in bytes),
  • whether there is audio present,
  • the number of audio channels,
  • audio sample type,
  • audio sample rate,
  • total audio samples and total audio duration (hh:mm:ss:ddd),
  • a CPU flag with supported optimizations.

In v2.60, Info creates its own canvas when given an audio only clip.


Example:

AviSource("C:\filename.avi")
Info

Results in a video with the following information overlay:

 Frame: 0 of 6035
 Time: 00:00:00:000 of 00:04:01:400
 ColorSpace: YUY2
 Width: 720 pixels, Height: 576 pixels.
 Frames per second: 25.0000 (25/1)
 FieldBased (Separated) Video: NO
 Parity: Bottom Field First
 Video Pitch: 1440 bytes.
 Has Audio: YES
 Audio Channels: 2
 Sample Type: Integer 16 bit
 Samples Per Second: 44100
 Audio length: 10650150 samples. 00:04:01:500
 CPU deteced: x87 MMX ISSE SSE 3DNOW 3DNOW_EXT

Changelog:

AVS+ Added formatting arguments.
v2.60 Added support audio only clips.
v2.57 Added time of current frame, total time, numerator and denominator of the framerate and audio length.
v2.55 Added supported CPU optimizations.
v2.50 Initial Release.
Personal tools