Animate のバックアップ差分(No.3)


  • 追加された行はこの色です。
  • 削除された行はこの色です。
 Animate(clip clip, int start_frame, int end_frame, string filtername, start_args, end_args)

 ApplyRange(clip clip, int start_frame, int end_frame, string filtername, args)

Animateは、連続的に変化する引数を伴ったパラメータフィルタを評価する、メタフィルタです。start-frame以前のフレームでは、フィルタは、start-argsによって与えられた引数で評価されます。end-frame以降のフレームでは、end-argsによって与えられた引数で評価されます。その中間では、引数は、スムーズな変化(transition)のために、直線的に補間されます。
Animateは、連続的に変化する引数を伴ったパラメータフィルタを評価する、メタフィルタです。start-frame以前のフレームでは、フィルタは、start-argsによって与えられた引数で評価されます。end-frame以降のフレームでは、end-argsによって与えられた引数で評価されます。その中間では、引数は、スムーズな変化(transition)のために、線形補間されます。

ApplyRangeは、start_argsがend_argsと等しいという、特殊なケースのAnimateフィルタです。あるフィルタを、クリップの、ある範囲のフレームに適用したいときに使用することができます。Animateとの、もうひとつの違いは、argsがclipを含むことができないということです。v2.53から音声をサポートしています。しかも、start_frameとend_frameを同じ値にすることもできます(1フレームだけが処理されるような場合)。

Filter must be enclosed in quotation marks, and the two nested argument lists are not parenthesized. Strings and video clips can't be interpolated, and therefore must be identical in the two argument lists. You can't use OOP notation or implicit last with this filter, even if the filter in the filter argument normally allows them.
filternameは、引用記号で囲まなければなりません。そして、2つの入れ子になった引数リストは、丸括弧には入れません。文字列(string)とビデオクリップ(clip)は、補間されません。それゆえ、それらは、2つの引数リストにおいて、まったく同一でなければなりません。OOP表記法((訳者註: ScriptGrammarを参照。))や暗示的なlast((訳者註: 通常のフィルタにおいては、引数clipを省略した場合、最後に処理したクリップを意味する特別な変数lastが、自動的に適用されます。しかし、このフィルタでは、たとえlastを渡すときでも、これを明示的に指定しなければなりません。このページの例を参照。))を、このフィルタと一緒に使用することはできません。たとえ、このフィルタの引数の中のフィルタが、通常は、それらを許可しているとしても。

This filter will not correctly handle a changing sound track, so I don't recommend its use with filters which modify the sound track. And for heaven's sake don't make the initial and final parameters yield a different output frame size.
このフィルタは、変化するサウンドトラックを、正確に取り扱わないでしょう。そのため、私は、サウンドトラックを修正するフィルタと一緒の使用をおすすめしません。そして、お願いだから、最初と最後のパラメータが、異なる出力フレームサイズをもたらさないようにしてください。

The filter argument can even be Animate if you want quadratic rather than linear interpolation, but I'm not going to think about this too much because my head might explode.
線形補間よりも2次補間を望むなら、フィルタの引数をAnimateにすることもできます。しかし、私の頭が爆発するかもしれないので、このことについては、あまり考えすぎないようにしています。

例: 

 # Make a scrolling version of the "Version" video
 # "Version"ビデオのスクロール・バージョン(version)をつくる
 ver = Version
 return Animate(0, 149, "Crop", ver, 0, 0, 64, 32, ver, 448, 0, 64, 32)

 # or what is the same:
 # 上と同じもの:
 ver = Version()
 return Animate(ver,0,149,"Crop", 0,0,64,32, 316,0,64,32)

 # Fade to white
 # 色が消えて白色になる(
 Animate(100, 200, "Levels", last, 0, 1, 255, 0, 255, last, 0, 1, 255, 255, 255)

 # Do a gradual zoom into the center of a 320x240 video, starting at
 # 1:1 magnification in frame 100 and ending with 4:1 magnification
 # in frame 200
 # 100フレームでは1:1の倍率で始まり、
 # 200フレームでは4:1の倍率で終わるように、
 # 320x240のビデオの中心へ次第にズームする
 
 #31-03-04 This wont work - Bicubic needs extra parameters!
 #maybe try BilinearResize instead
 Animate(100, 200, "!BicubicResize",last, 0, 0, 320, 240, 320, 240, last, 120, 90, 80, 60, 320, 240)
 # 2004年3月31日 これは動かないでしょう - BicubicResizeは他にも余分のパラメータを必要とします!
 # 代わりにBilinearResizeを試してみるといいかもしれません
 Animate(100, 200, "BicubicResize",last, 0, 0, 320, 240, 320, 240, last, 120, 90, 80, 60, 320, 240)

 # Make the text "Hello, World!" zoom out from the center of a 320x240 video
 # "Hello, World!"というテキストを320x240のビデオの中心からズームアウトさせます 
 Animate(0, 48, "Subtitle", last, "Hello, World!", 160, 120, 0, 99999, "Arial", 0, last, "Hello, World!", 25, 130, 0, 99999, "Arial", 48)

 ver = Version()
 return ver.ApplyRange(0,149,"Crop", 158,0,64,32)

 AviSource("E:\pdwork\DO-Heaven.AVI").BicubicResize(320,240)
 ApplyRange(0,48,"Subtitle", "Hello, World!",25,130,0,99999,"Arial",48)

 # 上の例と同じもの:
 # 上と同じもの:
 clip = AviSource("E:\pdwork\DO-Heaven.AVI").BicubicResize(320,240)
 ApplyRange(clip, 0,48,"Subtitle", "Hello, World!",25,130,0,99999,"Arial",48)

#hr
註: このページは、http://www.avisynth.org/Animateの日本語訳です。