info_modoki

説明

クリップの情報を表示する関数。AviSynth組み込みのInfoフィルタが使えないバージョンの(2.5.0よりも古い)AviSynthでも使用可能。kiraru2002氏作。

関数

function info_modoki(clip clip) {
_size = "width: " + string(clip.width) + " height:" + string(clip.height)
_frame = string(clip.framecount) + " frames " + string(clip.framerate) + " fps"
time = clip.framecount / clip.framerate
hours = int(time/3600)
minutes = int(time/60)-(hours*60)
seconds = time-hours*60*60-minutes*60
_length = "time: " + string(hours) + ":" + ( (minutes<10)? "0"+string(minutes) : string(minutes) )
\ + ":" + ( (seconds<10)? "0"+string(seconds) : string(seconds) )
_colorspace = clip.IsYUY2() ? "YUY2" : clip.IsRGB32() ? "RGB32" : clip.IsRGB24() ? "RGB24" : "UnKnown"
_colorspace = ( (VersionNumber>=2.5) && (_colorspace=="Unknown") ) ? "YV12" : _colorspace
_parity = "field order:" + (clip.GetParity() ? "TFF" : "BFF")
_audiobits =
\ ( (VersionNumber<2.5) ? string(clip.AudioBits)+" bit" : string(clip.AudioBits() * 8) )+" bit"
_audiochannels = (clip.AudioChannels()==2) ? " stereo" : " mono"
_audiorate = string(clip.AudioRate) + "Hz"
_audioLength = string(clip.AudioLength) + " samples"
clip = clip.subtitle( VersionString + " VersionNo:" + string(VersionNumber) )
clip = clip.subtitle("ColorSpace: " + _colorspace, y=32)
clip = clip.subtitle(_size, y=48)
clip = clip.subtitle(_frame, y=64)
clip = clip.subtitle(_length, y=80)
clip = clip.subtitle(_parity, y=96)
clip = (clip.AudioLength()==0) ? clip.subtitle("No Audio", y=112)
\ : clip.subtitle(_audiobits+" "+_audiochannels+" "+_audiorate+" "+_audiolength, y=112)
return clip
}

書式

info_modoki(clip clip)
  • 引数
    • clip: ビデオクリップ

使用例

スクリプト内の、情報を知りたい部分に追加します。

  • 例1:
    ColorBars(512, 288)
    info_modoki()
    return last
    
     
    info_modoki1.png
    例1のスクリプトをプレビューした画面
  • 例2:
    ColorBars(512, 288)
    AssumeTFF()
    ConvertToYUY2()
    SSRC(44100)
    info_modoki()
    return last
    
     
    info_modoki2_2.png
    例2のスクリプトをプレビューした画面(赤線を引いた箇所が変わっていることに注目)

info_modokiで表示される項目

  • 1行目
    • バージョン情報
    • VesionNo: バージョン番号
  • 2行目
    • ColorSpace: 色空間
  • 3行目
    • width: クリップの幅
    • height: クリップの高さ
  • 4行目
    • フレーム数
    • フレームレート
  • 5行目
    • time: 時間
  • 6行目
    • field order: フィールドオーダー
      • TFF: トップファースト
      • BFF: ボトムファースト
  • 7行目
    • 音声がない場合: No Audio
    • 音声がある場合:
      • ビット数
      • ステレオ(stereo)/モノラル(mono)
      • サンプルレート
      • サンプル数
最終更新日時: 2014-03-11 (火) 03:50:01 (3693d)