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


  • 追加された行はこの色です。
  • 削除された行はこの色です。
AviSynth is a very very powerful tool for video post-production. It provides almost unlimited ways of editing and processing videos. AviSynth works as a frameserver, providing instant and very fast editing without the need for temporary files.
AviSynthのオリジナル開発者Ben Rudiak-Gould氏は、自身のホームページ((2004年6月現在、Ben Rudiak-Gould氏のホームページは存在しません。[[Donald Graft氏のサイト:http://neuron2.net/]]でミラーされています。))で、AviSynthについて次のように説明しています。

AviSynth itself does not provide a graphical user interface (GUI) but instead relies on a script system that allows advanced non-linear editing. While this may at first seem tedious and unintuitive, it is remarkably powerful and is a very good way to manage projects in a precise, consistent, and reproducible manner. Because text-based scripts are human readable, projects are inherently self-documenting. The scripting language is simple yet powerful, and complex filters can be created from basic operations to develop a sophisticated palette of useful and unique effects. 
>Avisynthはスクリプト言語の一種であり、簡単なノンリニア編集のためのフィルタの集合体である。Avisynthは出力ファイルを生成しないという点においてユニークである。その代わりに、Avisynthスクリプト(AVSという拡張子を持つ)は、AVIファイルを読み込むことができるアプリケーションで直接開くことができる。AVSファイルが開かれた時、Avisynthは、スクリプトによって映像や音声のデータを生成し、それをアプリケーションにフィードしながら、バックグラウンドで動作する。~
~
(Avisynth is a scripting language and a collection of filters for simple non-linear editing tasks. Avisynth is unusual in that it does not generate output files. Instead, Avisynth scripts, which have the extension .AVS, can be opened directly in applications which read AVI files. When an AVS file is opened, Avisynth runs in the background, generating video and audio data according to the script and feeding it to the application as needed.)~

Interested? On this site, you can read more about AviSynth, search the official AviSynth manual, and browse the AviSynth FAQ. Or you can jump straight to the [[[download page]:http://sourceforge.net/project/showfiles.php?group_id=57023]] at SourceForge.
この4つのセンテンスからなる文章には、AviSynthを理解する上で重要な、たくさんの情報が凝縮されています。

If you have only limited online time available you can [[[download a snapshot]:http://www.avisynth.org/warpenterprises/index.html#snapshot]] of this site (the snapshot is generated manually, so it won't always be up-to-date!).
 AviSynthはスクリプト言語である。

AviSynthは、JavaScriptやVBScriptなどと同じ、スクリプト言語です。

例えば、hoge.aviを開く場合、次のような手順を取ることになります。

まずメモ帳にhoge.aviを開く命令(スクリプト)を記述します。

>AviSource("path\hoge.avi")((pathには、hoge.aviがあるディレクトリまでのパスを指定します。また、return文(この場合、return last)がないと表示されない可能性があります。))

AviSourceは、AVIファイルを開くためのフィルタです((詳しい使用方法は、AviSynth付属の添付のマニュアルを参照))。

 AviSynthスクリプトの拡張子はAVSである。

次に、このスクリプトに適当な名前を付けて保存します。このとき、拡張子はAVSにします。

 AVIファイルを読み込むことができるアプリケーションで直接開くことができる。

そして、このAVSファイルを、他の動画編集用アプリケーションなどで開きます((AviUtlなど、デフォルトの状態では開けないアプリケーションもあります。))。

#ref(avisource.png)

すると、このようにhoge,aviの画像が表示されます。

 出力ファイルを生成しない。

ただし、AviSynth自身はエンコーダではないため、単独で何らかのファイルを出力することはできません。~
必ず、何らかのアプリケーションやコーデックと連携させて使用します。

 スクリプトによって映像や音声のデータを生成し、それをアプリケーションにフィードする。

つまり、AviSynthは、映像や音声とアプリケーションとの「橋渡し役」(フレームサーバー)として機能するのです。

 バックグラウンドで動作する。

そして、フレームサーバーとしてのAviSynthは、あくまでも「裏方」に徹します。~
アプリケーションにとっては、あたかもAviSynth自身は存在せず、ごく普通のAVIファイルを開いているかのように解釈されます。

 ノンリニア編集のためのフィルタの集合体である。

また、AviSynthには、トリミングや色調補正などの様々なフィルタが内蔵されており、これらのフィルタを利用することができます。~
外部プラグインを利用することで、さらに多くのフィルタを追加することも可能です。

例えば、hoge.aviをモノクロに変換したい場合、先程のスクリプトに続けて、ビデオをモノクロに変換するフィルタの命令を記述します。

>AviSource("path\hoge.avi")~
>GreyScale()

GreyScaleは、ビデオをモノクロ(グレースケール)化するフィルタです。

#ref(greyscale.png);

これをアプリケーションで開くと、このような画像が表示されます。

後は、アプリケーション(エンコーダ)で出力設定を行ってから、実際にエンコードすれば、モノクロ化されたhoge.aviを得ることができます。

[[AviSynth.org FAQ]]:[[Section1 About AviSynth>Section1 About AviSynth#k960e9aa]]にも、AviSynthに関する明解な説明があります。そちらも参考にしてください。