ADLANCAS
2nd June 2003, 21:41
I'd like to share my general simple scripts (thanks to all in this forum that helped me).
I have not so much experiences, but this scripts works good to me.
Of course that filters depends on the source and it's very subjective what is "better" and bla bla bla ....
I guess that beginners (and maybe others) can have a good idea how to make scripts for different targets. It's better to understand
(at least to me) when we have examples to compare.
Scripts are not too good? Please, post it here!
Of course, for experts I ask comments for improving it.
Any suggestions are welcome.
Thanks,
Alexandre
Source: NTSC 720x480 interlaced (colorspace YUY2)
#Script 1: Target -> SVCD
LoadPlugin("c:\AviSynth2_temp\LoadPluginEx.dll") # for using plugins v2.0 (don't use in the same folder !!)
LoadPlugin("c:\AviSynth2\plugins\Convolution3D.dll")
LoadPlugin("c:\AviSynth2\plugins\MSharpen.dll")
AviSource("D:\Teste\AVS\Sources\720x480.avi",false) # Encode only video
#Trim(x,y) # Add Trim command generated from VCF2AVS
AddBorders(0,6,0,0) # Adjust to correct AspectRatio (captured without overscan)
#LetterBox(0,16) # and opcionally remove garbage (16 pixels)
a = SeparateFields()
b = a.SelectOdd().Convolution3D(0,12,24,8,8,3,0) # filter each frame (medium noisy)
c = a.SelectEven().Convolution3D(0,12,24,8,8,3,0)
Interleave(b,c)
BicubicResize(448,224,0,0.6) # resize
#--- Color adjustment, different sources must have different gain_y (in my case, TV=-3 / VHS=10)
saturation=0.9
cu=-(1-saturation)*256
ColorYUV(off_y=1,gain_y=10,cont_u=cu,cont_v=cu,opt="coring")
#ConvertToYV12().Histogram() # only to adjust brightness and gain
MSharpen(threshold=25,strength=45) # sharp the edges
Weave()
AddBorders(16,16,16,16) # Adds overscan to SVCD (don't encode what we can't see!)
#Script 2: Target -> VCD
LoadPlugin("c:\AviSynth2_temp\LoadPluginEx.dll") # for using plugins v2.0 (don't use in the same folder !!)
LoadPlugin("c:\AviSynth2\plugins\Convolution3D.dll")
LoadPlugin("c:\AviSynth2\plugins\MSharpen.dll")
LoadPlugin("c:\AviSynth2\plugins\Decomb.dll")
AviSource("D:\Teste\AVS\Sources\720x480.avi")
#Trim(x,y) # Add Trim command generated from VCF2AVS
#--- Deinterlace: Case 1) Trully interlaced
Import("c:\Arquivos de programas\Avisynth2\Plugins\Vdub_filters.avs")
ConvertToRGB() # Vdub filters only work in RGB
VD_DeInterlaceMAP(110,85,11,true,true,false) # it's slower but with good results
ConvertToYUY2()
# or FieldDeinterlace()
# or FieldDeinterlace(blend=false) # When a lot of frames need to be deinterlaced, it's a faster option
# or FieldDeinterlace(full=true)
#--- Case 2) Phase shifts and or swapped fields (23.976)
#Telecide()
# and or
#FieldDeinterlace(full=false)
#--- Case 3) Telecined
#Telecide()
#Decimate(cycle=5)
AddBorders(0,6,0,0) # Adjust to correct AspectRatio (captured without overscan)
#LetterBox(0,16) # and opcionally remove garbage (16 pixels)
Convolution3d(0,12,24,8,8,3,0) # filter (medium noisy)
BicubicResize(336,224,0,0.6) # resize
#--- Color adjustment , different sources must have different gain_y (in my case, TV=-3 / VHS=10)
saturation=0.9
cu=-(1-saturation)*256
ColorYUV(off_y=1,gain_y=10,cont_u=cu,cont_v=cu,opt="coring")
#ConvertToYV12().Histogram() # only to adjust brightness and gain
MSharpen(threshold=25,strength=45) # Sharpthe edges
AddBorders(8,8,8,8) # Adds overscan to VCD (don't encode what we can't see!)
#Script 3: Target -> DivX
LoadPlugin("c:\AviSynth2_temp\LoadPluginEx.dll") # for using plugins v2.0 (don't use in the same folder !!)
LoadPlugin("c:\AviSynth2\plugins\Convolution3DYV12.dll")
LoadPlugin("c:\AviSynth2\plugins\MSharpen.dll")
LoadPlugin("c:\AviSynth2\plugins\Decomb.dll")
AviSource("D:\Teste\AVS\Fontes\720x480.avi")
#Trim(x,y) # Add Trim command generated from VCF2AVS
#--- Deinterlace: Case 1) Trully interlaced
Import("c:\Arquivos de programas\Avisynth2\Plugins\Vdub_filters.avs")
ConvertToRGB() # Vdub filters only work in RGB
VD_DeInterlaceMAP(110,85,11,true,true,false) # it's slower but with good results
ConvertToYV12() # DivX works with YV12 input (allows fast recompress in VDubMod)
# or FieldDeinterlace()
# or FieldDeinterlace(blend=false) # When a lot of frames need to be deinterlaced, it's a faster option
# or FieldDeinterlace(full=true)
#--- Case 2) Phase shifts and or swapped fields (23.976)
#Telecide()
# and or
#FieldDeinterlace(full=false)
#--- Case 3) Telecined
#Telecide()
#Decimate(cycle=5)
AddBorders(0,6,0,0) # Adjust to correct AspectRatio (captured without overscan)
#LetterBox(0,16) # and opcionally remove garbage (16 pixels)
Convolution3d(0,12,24,8,8,3,0) # filter (medium noisy)
BicubicResize(352,264,0,0.6) # or (416,320,0,0.6) / (512,384,0,0.6)
#--- Color adjustment , different sources must have different gain_y (in my case, TV=-3 / VHS=10)
saturation=0.9
cu=-(1-saturation)*256
ColorYUV(off_y=1,gain_y=10,cont_u=cu,cont_v=cu,opt="coring")
#Histogram() # only to adjust brightness and gain
MSharpen(threshold=25,strength=45) # sharp the edges
FadeIO2(50) # Fade in and out 50 frames
I have not so much experiences, but this scripts works good to me.
Of course that filters depends on the source and it's very subjective what is "better" and bla bla bla ....
I guess that beginners (and maybe others) can have a good idea how to make scripts for different targets. It's better to understand
(at least to me) when we have examples to compare.
Scripts are not too good? Please, post it here!
Of course, for experts I ask comments for improving it.
Any suggestions are welcome.
Thanks,
Alexandre
Source: NTSC 720x480 interlaced (colorspace YUY2)
#Script 1: Target -> SVCD
LoadPlugin("c:\AviSynth2_temp\LoadPluginEx.dll") # for using plugins v2.0 (don't use in the same folder !!)
LoadPlugin("c:\AviSynth2\plugins\Convolution3D.dll")
LoadPlugin("c:\AviSynth2\plugins\MSharpen.dll")
AviSource("D:\Teste\AVS\Sources\720x480.avi",false) # Encode only video
#Trim(x,y) # Add Trim command generated from VCF2AVS
AddBorders(0,6,0,0) # Adjust to correct AspectRatio (captured without overscan)
#LetterBox(0,16) # and opcionally remove garbage (16 pixels)
a = SeparateFields()
b = a.SelectOdd().Convolution3D(0,12,24,8,8,3,0) # filter each frame (medium noisy)
c = a.SelectEven().Convolution3D(0,12,24,8,8,3,0)
Interleave(b,c)
BicubicResize(448,224,0,0.6) # resize
#--- Color adjustment, different sources must have different gain_y (in my case, TV=-3 / VHS=10)
saturation=0.9
cu=-(1-saturation)*256
ColorYUV(off_y=1,gain_y=10,cont_u=cu,cont_v=cu,opt="coring")
#ConvertToYV12().Histogram() # only to adjust brightness and gain
MSharpen(threshold=25,strength=45) # sharp the edges
Weave()
AddBorders(16,16,16,16) # Adds overscan to SVCD (don't encode what we can't see!)
#Script 2: Target -> VCD
LoadPlugin("c:\AviSynth2_temp\LoadPluginEx.dll") # for using plugins v2.0 (don't use in the same folder !!)
LoadPlugin("c:\AviSynth2\plugins\Convolution3D.dll")
LoadPlugin("c:\AviSynth2\plugins\MSharpen.dll")
LoadPlugin("c:\AviSynth2\plugins\Decomb.dll")
AviSource("D:\Teste\AVS\Sources\720x480.avi")
#Trim(x,y) # Add Trim command generated from VCF2AVS
#--- Deinterlace: Case 1) Trully interlaced
Import("c:\Arquivos de programas\Avisynth2\Plugins\Vdub_filters.avs")
ConvertToRGB() # Vdub filters only work in RGB
VD_DeInterlaceMAP(110,85,11,true,true,false) # it's slower but with good results
ConvertToYUY2()
# or FieldDeinterlace()
# or FieldDeinterlace(blend=false) # When a lot of frames need to be deinterlaced, it's a faster option
# or FieldDeinterlace(full=true)
#--- Case 2) Phase shifts and or swapped fields (23.976)
#Telecide()
# and or
#FieldDeinterlace(full=false)
#--- Case 3) Telecined
#Telecide()
#Decimate(cycle=5)
AddBorders(0,6,0,0) # Adjust to correct AspectRatio (captured without overscan)
#LetterBox(0,16) # and opcionally remove garbage (16 pixels)
Convolution3d(0,12,24,8,8,3,0) # filter (medium noisy)
BicubicResize(336,224,0,0.6) # resize
#--- Color adjustment , different sources must have different gain_y (in my case, TV=-3 / VHS=10)
saturation=0.9
cu=-(1-saturation)*256
ColorYUV(off_y=1,gain_y=10,cont_u=cu,cont_v=cu,opt="coring")
#ConvertToYV12().Histogram() # only to adjust brightness and gain
MSharpen(threshold=25,strength=45) # Sharpthe edges
AddBorders(8,8,8,8) # Adds overscan to VCD (don't encode what we can't see!)
#Script 3: Target -> DivX
LoadPlugin("c:\AviSynth2_temp\LoadPluginEx.dll") # for using plugins v2.0 (don't use in the same folder !!)
LoadPlugin("c:\AviSynth2\plugins\Convolution3DYV12.dll")
LoadPlugin("c:\AviSynth2\plugins\MSharpen.dll")
LoadPlugin("c:\AviSynth2\plugins\Decomb.dll")
AviSource("D:\Teste\AVS\Fontes\720x480.avi")
#Trim(x,y) # Add Trim command generated from VCF2AVS
#--- Deinterlace: Case 1) Trully interlaced
Import("c:\Arquivos de programas\Avisynth2\Plugins\Vdub_filters.avs")
ConvertToRGB() # Vdub filters only work in RGB
VD_DeInterlaceMAP(110,85,11,true,true,false) # it's slower but with good results
ConvertToYV12() # DivX works with YV12 input (allows fast recompress in VDubMod)
# or FieldDeinterlace()
# or FieldDeinterlace(blend=false) # When a lot of frames need to be deinterlaced, it's a faster option
# or FieldDeinterlace(full=true)
#--- Case 2) Phase shifts and or swapped fields (23.976)
#Telecide()
# and or
#FieldDeinterlace(full=false)
#--- Case 3) Telecined
#Telecide()
#Decimate(cycle=5)
AddBorders(0,6,0,0) # Adjust to correct AspectRatio (captured without overscan)
#LetterBox(0,16) # and opcionally remove garbage (16 pixels)
Convolution3d(0,12,24,8,8,3,0) # filter (medium noisy)
BicubicResize(352,264,0,0.6) # or (416,320,0,0.6) / (512,384,0,0.6)
#--- Color adjustment , different sources must have different gain_y (in my case, TV=-3 / VHS=10)
saturation=0.9
cu=-(1-saturation)*256
ColorYUV(off_y=1,gain_y=10,cont_u=cu,cont_v=cu,opt="coring")
#Histogram() # only to adjust brightness and gain
MSharpen(threshold=25,strength=45) # sharp the edges
FadeIO2(50) # Fade in and out 50 frames