Avisynth でエンコな備忘録再び

Software
この記事は約6分で読めます。
この記事は最終更新日より 1 年以上経過しています。
画像やリンクが無効になっている可能性もあるのでご了承下さい。

最近はエンコする本数が増えたので、エンコード速度が速くならない物かと
考えるようになった。Google であちこち検索してパラメータもまんま丸投げ
かましたところ、4~5fps 速くなりつつ画質もちょい良くなった。
なので、その avs スクリプトをここに丸投げしておく。


以下のスクリプトがロードするファイルは、DGIndex で Demux した d2v と
aac を faw で疑似 wav にした物です。
尚、スクリプト中のファイルパスは当方個人環境のまま。適時置き換えれば
使えると思う。

#********** Initialization *******************************************
PluginPath = "C:\AviSynth\plugins\"
LoadPlugin(PluginPath + "LoadPluginEx.dll")
LoadPlugin(PluginPath + "warpsharp.dll")
LoadPlugin(PluginPath + "DGDecode.dll")
LoadPlugin(PluginPath + "FFT3dGPU.dll")
LoadPlugin(PluginPath + "EEDI2.dll")
LoadPlugin(PluginPath + "TDeint.dll")
LoadPlugin(PluginPath + "TIVTC.dll")
LoadPlugin(PluginPath + "vinverse.dll")
LoadPlugin(PluginPath + "MT.dll")

#********** Object Load **********************************************
DGDecode_MPEG2Source("E:\ts_temporary\demux_tvtokyo.d2v")
AudioDub(last, WavSource("E:\ts_temporary\faw.wav"))

#********** Edit *****************************************************
Trim(1848, 5622) ++ Trim(7722, 26511) ++ Trim(29210, 49199) ++ Trim(50998, 51446)

EraseLOGO(logofile="E:\ts_temporary\20110712_TVTokyo 1440x1080.lgd",pos_x=0, pos_y=0, depth=128,yc_y=0, yc_u=0, yc_v=0,start=3, fadein=3, fadeout=0, end=3774,interlaced=true)
EraseLOGO(logofile="E:\ts_temporary\20110712_TVTokyo 1440x1080.lgd",pos_x=0, pos_y=0, depth=128,yc_y=0, yc_u=0, yc_v=0,start=3779, fadein=1, fadeout=1, end=22534,interlaced=true)
EraseLOGO(logofile="E:\ts_temporary\20110712_TVTokyo 1440x1080.lgd",pos_x=0, pos_y=0, depth=128,yc_y=0, yc_u=0, yc_v=0,start=22570, fadein=0, fadeout=0, end=42523,interlaced=true)
EraseLOGO(logofile="E:\ts_temporary\20110712_TVTokyo 1440x1080.lgd",pos_x=0, pos_y=0, depth=128,yc_y=0, yc_u=0, yc_v=0,start=42560, fadein=0, fadeout=0, end=-1,interlaced=true)

ConvertToYV12()

#********** Interlace Cancellation ***********************************
#-- Method 1
TIVTC24P2()
#-- Method 2
#AssumeTFF()
#FrameCache(9).Auto24FPS().vinverse()

#********** Noise Removal ********************************************
#----- Method 1
FFT3DGPU(sigma=2,beta=1,plane=0,bw=32,bh=32,ow=16,oh=16,bt=3,mode=2,sharpen=0, interlaced=false,NVPerf=false,wintype=0,precision=0) 
FFT3DGPU(sigma=2,beta=1,plane=1,bw=32,bh=32,ow=16,oh=16,bt=3,mode=2,sharpen=0, interlaced=false,NVPerf=false,wintype=0,precision=0)
#----- Method 2
#Convolution3D(Preset="movieHQ") 

#
#Lanczos4Resize(712, 400)
Lanczos4Resize(1280, 720, 1, 0, -3, 0)

#********** Effect ***************************************************
MT("""WarpSharp(128,2,80,-0.6)""",4,2)

#********** END ******************************************************
return last

#********** Functions ************************************************
function TIVTC24P2(clip clip){
	Interp = clip.AssumeTFF().SeparateFields().SelectEven().EEDI2(field=1) 
	Deinted=clip.TDeint(order=1,field=1,edeint=Interp) 
	clip = clip.TFM(mode=6,order=1,PP=7,slow=2,mChroma=true,clip2=Deinted) 
	clip = clip.TDecimate(mode=1) 
	return clip 
}

まぁこれで暫くは個人的には安泰かもしれん。
テロップ関連の対応は要らないかなとも思うし、VFR する事に手を付けていない…

著者プロフィール
ぶっち

本格的に PC へ触れ始めてたのは 1990 年位から。
興味は PC 全般。OS は Windows と Linux などを嗜む。
プログラマやネットワークエンジニアを経てフリーに活動している 2 児の父な 40 代半ばのおじさんです。

ぶっちをフォローする

コメント

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.