Version: Difference between revisions

From Avisynth wiki
Jump to navigationJump to search
Raffriff42 (talk | contribs)
24 pt, not fixed width x height
Raffriff42 (talk | contribs)
Version overlay on another clip for frame rate, image size, and so on.
Line 7: Line 7:
:[[File:avisynth-version-2.6.png]]
:[[File:avisynth-version-2.6.png]]


The following script implements a '''Version''' filter with a ''template'' clip argument – for frame rate, image size, and so on.
<div {{BoxWidthIndent|48|2}} >
function Version(clip C)
{
    V=Version
    M=V.ConvertToRGB32.ColorKeyMask($404040, 0).ShowAlpha
    Overlay(C, V, mask=M.Blur(0.2),
    \      x=(C.Width/2-V.Width/2),
    \      y=(C.Height/2-V.Height/2))
    return Last
}
## using ColorBars as template clip
return Version(ColorbarsHD(width=570, height=320))
</div>
:[[File:Avisynth-version-overlay-2.61.png]]


</div>
</div>

Revision as of 12:12, 19 August 2016

Version()

Generates a 24FPS, 10-second, RGB24-format video clip with a version, build time, copyright statement, and homepage information in yellow 24-point Arial text on a 25% grey background. Width and height are chosen to fit the message, so clip size varies by version.



The following script implements a Version filter with a template clip argument – for frame rate, image size, and so on.

function Version(clip C)
{
    V=Version
    M=V.ConvertToRGB32.ColorKeyMask($404040, 0).ShowAlpha
    Overlay(C, V, mask=M.Blur(0.2),
    \       x=(C.Width/2-V.Width/2), 
    \       y=(C.Height/2-V.Height/2))
    return Last
}

## using ColorBars as template clip
return Version(ColorbarsHD(width=570, height=320))