LoadPlugin("ffms2.dll")
LoadPlugin("vsfilter.dll")
global MeGUI_darx = 16
global MeGUI_dary = 9
function dhr264(string "source",string "text",int "_if480",int "x",int "y",bool "audio")
{
_if480 = Default(_if480,0)
#If type 0 -> 848x*480
#If type 1 -> 1280*720
#If type 2 -> 720*480(PSP)
#other -> x*y
x = Default(x,640)
y = Default(y,360)
#If _if480<>0,1,2 and didn't type in "x" and "y" -> 640*360
#If _if480<>0,1,2 -> x*y
x = (_if480==0) ? 848 : (_if480==1) ? 1280 : (_if480==2) ? 720 : x
y = (_if480==0) ? 480 : (_if480==1) ? 720 : (_if480==2) ? 480 : y
V=FFVideoSource(source, threads=1).AssumeFPS(24000,1001).LanczosResize(x,y).TextSub(text)
#Please select a MP4 or MKV(x264) video
audio = Default(audio,true)
V= (audio == true) ? AudioDub(V,FFAudioSource(source, 1)) : V
return V
}
#Sample
#dhr264("c:\1.mp4","c:\1.ass",3,704,396,audio=false)