Loop

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
m (added category)
(add link to avs+ documentation)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Template:FuncDef|Loop(clip ''clip'' [, int ''times'' = -1] [, int ''start_frame'' = 0] [, int ''end_frame'' = inf])}}
+
<div {{BlueBox2|40|0|3px solid purple}} >
 +
{{AvsPlusFullname}}<br>
 +
Up-to-date documentation: [https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/corefilters/loop.html https://avisynthplus.readthedocs.io]
 +
</div>
  
Loops the segment from ''start_frame'' to ''end_frame'' a given number of times.  Setting ''times'' to -1 loops a "very large" number of times.
 
  
 +
{{Template:FuncDef|Loop(clip ''clip'' [, int ''times'' &#61; -1] [, int ''start'' &#61; 0] [, int ''end'' &#61; inf])}}
  
'''Examples:'''
+
Loops the segment from frame ''start'' to frame ''end'' a given number of times.  Setting ''times'' to -1 loops a "very large" number of times.
  
# Loops frame 100 to 110 of the current clip 10 times:
 
Loop(10,100,110)
 
 
Loop()        # make the clip loop (almost) endlessly
 
Loop(10)      # make the clip loop ten times
 
Loop(10,20,29) # repeat frames 20 to 29 ten times before going on, actual clip duration increased by 90 frames
 
Loop(0,20,29)  # delete frames 20 to 29, actual clip duration decreased by 10 frames
 
Loop(-1,20,29) # frame 20 to 29 is repeated (almost) infinite times
 
  
 +
'''Examples:'''
 +
<div {{BoxWidthIndent|62|1}} >
 +
Loop()          # play the clip (almost) endlessly.
 +
Loop(-1)        # play the clip (almost) endlessly.
 +
 +
Loop(10)        # play the clip ten times.
 +
 +
Loop(-1, 20, 29) # play up to frame 19;
 +
                  # frames 20-29 are repeated (almost) infinite times.
 +
 +
Loop(2, 20, 29)  # play up to frame 19;
 +
                  # play frames 20-29 two times;
 +
                  # continue from frame 30 to end of clip.
 +
 +
Loop(10, 20, 29) # play up to frame 19;
 +
                  # play frames 20-29 ten times;
 +
                  # continue from frame 30 to end of clip.
 +
 +
Loop(0, 20, 29)  # play up to frame 19;
 +
                  # delete frames 20-29 (play them zero times);
 +
                  # continue to end of clip.
 +
 +
Loop(1, 20, 29)  # play all frames normally.
 +
</div>
  
 
[[Category:Internal filters]]
 
[[Category:Internal filters]]
 
[[Category:Timeline_editing_filters]]
 
[[Category:Timeline_editing_filters]]

Latest revision as of 20:54, 17 September 2022

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


Loop(clip clip [, int times = -1] [, int start = 0] [, int end = inf])

Loops the segment from frame start to frame end a given number of times. Setting times to -1 loops a "very large" number of times.


Examples:

Loop()           # play the clip (almost) endlessly.
Loop(-1)         # play the clip (almost) endlessly.

Loop(10)         # play the clip ten times.

Loop(-1, 20, 29) # play up to frame 19;
                 # frames 20-29 are repeated (almost) infinite times. 

Loop(2, 20, 29)  # play up to frame 19; 
                 # play frames 20-29 two times; 
                 # continue from frame 30 to end of clip. 

Loop(10, 20, 29) # play up to frame 19; 
                 # play frames 20-29 ten times; 
                 # continue from frame 30 to end of clip. 

Loop(0, 20, 29)  # play up to frame 19;
                 # delete frames 20-29 (play them zero times); 
                 # continue to end of clip. 

Loop(1, 20, 29)  # play all frames normally. 
Personal tools