Quantcast Sampler Filter for Avisynth [Readme] - digitalFAQ.com Forums [Archives]
  #1  
11-25-2012, 06:24 PM
kvcd.net Archives's Avatar
kvcd.net Archives kvcd.net Archives is offline
Free Member
 
Join Date: May 2012
Posts: 84
Thanks: 0
Thanked 1 Time in 1 Post
Sampler - An Avisynth filter for pulling samples from a clip

By Ross Thomas <ross@grinfinity.com>

This is a very simple Avisynth filter to construct "sample strips" from the source clip. This concept is best explained with an example. Suppose you had a source clip that was 10 frames in length, and you used this filter to extract 3 samples, each 2 frames in length. The resulting clip would be exactly 6 frames long, and would be made up of the 1st, 2nd, 5th, 6th, 9th and 10th frames of the original clip. Or, graphically, this clip:



becomes this clip:



In other words, this filter pulls out the specified number of evenly distributed samples of the specified length from the source clip and concatenates them into one clip which will always be precisely samples-times-sample-length frames long.

Usage
Code:
Sampler(clip clip, int samples, int length)
ParameterMeaningDefault
clipSpecifies the clip to affect.last
samplesThe number of samples to take from the clip.Running time of clip in minutes
lengthThe length of each sample in frames.1 second (i.e., the clip's frame rate rounded to the nearest integer)

Known Issues: None.

History
  • 0.2a - Changed defaults to samples=movie_length_in_minutes and length=one_second.
  • 0.2 - Added audio support. Recompiled 2.5 with latest avisynth.h and renamed AvisynthPluginInit to AvisynthPluginInit2. Enabled "full optimization" for release builds.
  • 0.1a - AKA stupid bugfix release 1: 2.5 version is now actually compiled for 2.5 and not 2.0. Added SetCacheHints for 2.5 version and fixed, er, minor documentation bug.
  • 0.1 - First release. Alpha code. Danger, Will Robinson!
Download here: SansGrip's Avisynth Filters [DOWNLOADS]
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
RangeInfo Filter for Avisynth [Readme] kvcd.net Archives Avisynth Scripting 0 11-25-2012 09:07 PM
LegalClip Filter for Avisynth [Readme] kvcd.net Archives Avisynth Scripting 0 11-25-2012 09:03 PM
Blockbuster Filter for Avisynth [Readme] kvcd.net Archives Avisynth Scripting 0 11-25-2012 07:38 PM
NoMoSmooth Filter for Avisynth [Readme] kvcd.net Archives Avisynth Scripting 0 11-25-2012 07:00 PM
RemoveBorders filter for Avisynth [Readme] kvcd.net Archives Avisynth Scripting 0 10-28-2012 08:04 AM

Thread Tools



 
All times are GMT -5. The time now is 01:34 AM  —  vBulletin © Jelsoft Enterprises Ltd