kyousuke
8th August 2002, 18:10
hello, i see that some people here use avs for encoding animes. so i'm going to give you some setting i use in general.
nota: the method can be generic, the setting aren't. you must find the best setting, and your video'll be more better.
so let's go.
i use a certain order in my avs script. i don't know if this order is the best, marcFD, and the other coders'll be able to answer to this.
# 1) import video stream
# 2) IVTC or correction frame rate
# 3) Denoising and/or smoothing, etc...
# 4) virtual dubs plugins import
# 5) tweak (hue, saturation, brightness)
# 6) subtitler for the subbers ;)
so here an extract of my script for patlabor3 trailer and other exemples very useful for some animes.
/--------------------------------------------------------------------/
# 1--- SOURCE VIDEO ---
VideoSource("c:\TEST ENCODE XDIV PATLABOR_3_Trailer\anime.d2v")
/--------------------------------------------------------------------/
# 2--- DESINTERLACE (DECOMB.DLL) ntsc guided with post processing + cropping + IVTC 23.9fps
Telecide(Guide=1,Gthresh=40,Threshold=20,Chroma=True,dthreshold=10,Post=true).Crop(16,68,690,344)
Decimate(cycle=5)
#but you can resize at the same time like this
Telecide(Guide=1,Gthresh=40,Threshold=20,Chroma=True,dthreshold=10,Post=true).Crop(16,68,690,344)
clip=Decimate(cycle=5).BicubicResize(640,352,0,0.75)
return clip
/--------------------------------------------------------------------/
# 3---- DENOISING and/or chroma and/or motion and/or etc... ---
# there're A LOT OF METHOD ! and a method can be exellent for a video and not for an other.
# so check your virtual dub ouput :) (marc FD, please, make an output gui for avs plugins ;)))
# --- Chroma Noise Reducer 2 ---
cnr2()
# or
# --- Chroma Noise Reducer 2 ---
Subtract(clip.cnr2(),clip).Levels(129,1,179,0,255)
# i don't remember the values ^^;
# or
# --- Motion Adaptive Denoiser --- (2,4,4,4) soft, (2,10,2,6) normal, (6,14,1,10) hard
MAD(2,10,2,6)
# MAD became MAM for now
# ---- DENOISING with TemporalSmoother/soften ---
# 1) little noise (fast), 2) medium noise (slow), 3) heavy noise (very slow)
#Clip=TemporalSmoother(Clip,2,1)
#
#Clip=SpatialSoftenMMX(Clip,1,4,6,false,false,4,4,6,8)
#Clip=TemporalSmoother(Clip,2)
#
#Clip=SpatialSoftenMMX(Clip,2,4,6,false,false,4,4,6,8)
#Clip=TemporalSmoother(Clip,3)
so you can denoise with a smoothing and add the chroma and the luma with this :
# --- Smoother HiQ ---
# SmoothHiQ(Diameter, Luma Threshold, Chroma threshold, Amount, Maintain Difference)
# Temporal=Source.TemporalSoften2(1,5,25).MergeChroma(Source)
# Spatial=SmoothHiQ(Temporal,3,25,10,192,3).MergeLuma(Temporal)
you can combine all this filters with the last plugin of marc FD like this :
# MAM + SmoothHIQ
MAM(Cnr2().TemporalSoften2(1,10,0),SmoothHIQ(3,15,25,192,10))
# or MAM + SpatialSoften
MAM(Cnr2().TemporalSoften2(1,10,0),SpatialSoften(2,15,25))
i have to say that finding the good values is very hard and very long. i found last days a method called Layer wich use TomsMoComp, seems to be interesting :
clip=AVISource("c:\TEST ENCODE XDIV PATLABOR_3_Trailer\anime.d2v")
clip=clip.ConvertToYUY2.TomsMoComp(0,15,1)
Levels(clip3,3,1.03,255,8,240)
i haven't tested it, so i don't know certains values.
and after making a lot of tests, i don't think that a denoising is always necessary. marcFD isn't it ?
sometime, when you find anime raws, 2d cleaner is the best ^^;;;
/--------------------------------------------------------------------/
# 4--- virtual dubs plugins import
Now that your video was denoised we can use the filters, wich can really help us too smooth the video without lose all the details. i had separated the only usefull filterd from the w.j.dijkhof's script.
i called it Anime_VD_plug.AVS. there're this filters : 2D Cleaner, Smart Smoother, WarpSharp, Xsharpen, Cartoon, VHS Filter, Subtitler.
In general i use 2D cleaner + warsharp but don't forget, the characters into an anime are made on celluloid (today on computer ;) but they have only few colors, but background are painted and have a lot of details, so don't lose the details of background for smoothing the characters.
just find the best settings, and warpsharp can help to don't abuse of 2d cleaner.
Xsharpen, Cartoon, VHS Filter can help you to sharp your video but i don't use it. don't forget they're very slow and all the benefits you would be able to have will be loose after the mpg4encoding. xvid/divx smooth the video ^^;
so the script is attached at the end of this thread, and here 2 two exemples :
# --- 2Dcleaner
ConvertToRGB()
VD_2DCleaneroptk7(threshold,x,y)
ConvertToYUY2()
# --- SHARPENING
ConvertToRGB()
VD_WarpSharp(depth)
ConvertToYUY2()
/--------------------------------------------------------------------/
# 5--- tweak (hue, saturation, brightness)
here are the default values. this filters can help you to correct the saturation and the brightness in general, don't forget this's is very slow and the xvid post processing can make this in real time.
# Tweak(hue[0.0], sat[1.0], bright[0.0], cont[1.0])
/--------------------------------------------------------------------/
# 6--- subtitler for the subbers ;)
there're two ways. you can use SSA or ASS. ssa can be used with subtitler into VirtualDub or be imported into AVS. ASS is a new format derived from SSA, and has advanced features. it can be used with texsub into VirtualDubn but equally with AVS.
that's all folk ^^;
sorry for my bad english.
any suggestions, corrections are welcome :)
++
nota: the method can be generic, the setting aren't. you must find the best setting, and your video'll be more better.
so let's go.
i use a certain order in my avs script. i don't know if this order is the best, marcFD, and the other coders'll be able to answer to this.
# 1) import video stream
# 2) IVTC or correction frame rate
# 3) Denoising and/or smoothing, etc...
# 4) virtual dubs plugins import
# 5) tweak (hue, saturation, brightness)
# 6) subtitler for the subbers ;)
so here an extract of my script for patlabor3 trailer and other exemples very useful for some animes.
/--------------------------------------------------------------------/
# 1--- SOURCE VIDEO ---
VideoSource("c:\TEST ENCODE XDIV PATLABOR_3_Trailer\anime.d2v")
/--------------------------------------------------------------------/
# 2--- DESINTERLACE (DECOMB.DLL) ntsc guided with post processing + cropping + IVTC 23.9fps
Telecide(Guide=1,Gthresh=40,Threshold=20,Chroma=True,dthreshold=10,Post=true).Crop(16,68,690,344)
Decimate(cycle=5)
#but you can resize at the same time like this
Telecide(Guide=1,Gthresh=40,Threshold=20,Chroma=True,dthreshold=10,Post=true).Crop(16,68,690,344)
clip=Decimate(cycle=5).BicubicResize(640,352,0,0.75)
return clip
/--------------------------------------------------------------------/
# 3---- DENOISING and/or chroma and/or motion and/or etc... ---
# there're A LOT OF METHOD ! and a method can be exellent for a video and not for an other.
# so check your virtual dub ouput :) (marc FD, please, make an output gui for avs plugins ;)))
# --- Chroma Noise Reducer 2 ---
cnr2()
# or
# --- Chroma Noise Reducer 2 ---
Subtract(clip.cnr2(),clip).Levels(129,1,179,0,255)
# i don't remember the values ^^;
# or
# --- Motion Adaptive Denoiser --- (2,4,4,4) soft, (2,10,2,6) normal, (6,14,1,10) hard
MAD(2,10,2,6)
# MAD became MAM for now
# ---- DENOISING with TemporalSmoother/soften ---
# 1) little noise (fast), 2) medium noise (slow), 3) heavy noise (very slow)
#Clip=TemporalSmoother(Clip,2,1)
#
#Clip=SpatialSoftenMMX(Clip,1,4,6,false,false,4,4,6,8)
#Clip=TemporalSmoother(Clip,2)
#
#Clip=SpatialSoftenMMX(Clip,2,4,6,false,false,4,4,6,8)
#Clip=TemporalSmoother(Clip,3)
so you can denoise with a smoothing and add the chroma and the luma with this :
# --- Smoother HiQ ---
# SmoothHiQ(Diameter, Luma Threshold, Chroma threshold, Amount, Maintain Difference)
# Temporal=Source.TemporalSoften2(1,5,25).MergeChroma(Source)
# Spatial=SmoothHiQ(Temporal,3,25,10,192,3).MergeLuma(Temporal)
you can combine all this filters with the last plugin of marc FD like this :
# MAM + SmoothHIQ
MAM(Cnr2().TemporalSoften2(1,10,0),SmoothHIQ(3,15,25,192,10))
# or MAM + SpatialSoften
MAM(Cnr2().TemporalSoften2(1,10,0),SpatialSoften(2,15,25))
i have to say that finding the good values is very hard and very long. i found last days a method called Layer wich use TomsMoComp, seems to be interesting :
clip=AVISource("c:\TEST ENCODE XDIV PATLABOR_3_Trailer\anime.d2v")
clip=clip.ConvertToYUY2.TomsMoComp(0,15,1)
Levels(clip3,3,1.03,255,8,240)
i haven't tested it, so i don't know certains values.
and after making a lot of tests, i don't think that a denoising is always necessary. marcFD isn't it ?
sometime, when you find anime raws, 2d cleaner is the best ^^;;;
/--------------------------------------------------------------------/
# 4--- virtual dubs plugins import
Now that your video was denoised we can use the filters, wich can really help us too smooth the video without lose all the details. i had separated the only usefull filterd from the w.j.dijkhof's script.
i called it Anime_VD_plug.AVS. there're this filters : 2D Cleaner, Smart Smoother, WarpSharp, Xsharpen, Cartoon, VHS Filter, Subtitler.
In general i use 2D cleaner + warsharp but don't forget, the characters into an anime are made on celluloid (today on computer ;) but they have only few colors, but background are painted and have a lot of details, so don't lose the details of background for smoothing the characters.
just find the best settings, and warpsharp can help to don't abuse of 2d cleaner.
Xsharpen, Cartoon, VHS Filter can help you to sharp your video but i don't use it. don't forget they're very slow and all the benefits you would be able to have will be loose after the mpg4encoding. xvid/divx smooth the video ^^;
so the script is attached at the end of this thread, and here 2 two exemples :
# --- 2Dcleaner
ConvertToRGB()
VD_2DCleaneroptk7(threshold,x,y)
ConvertToYUY2()
# --- SHARPENING
ConvertToRGB()
VD_WarpSharp(depth)
ConvertToYUY2()
/--------------------------------------------------------------------/
# 5--- tweak (hue, saturation, brightness)
here are the default values. this filters can help you to correct the saturation and the brightness in general, don't forget this's is very slow and the xvid post processing can make this in real time.
# Tweak(hue[0.0], sat[1.0], bright[0.0], cont[1.0])
/--------------------------------------------------------------------/
# 6--- subtitler for the subbers ;)
there're two ways. you can use SSA or ASS. ssa can be used with subtitler into VirtualDub or be imported into AVS. ASS is a new format derived from SSA, and has advanced features. it can be used with texsub into VirtualDubn but equally with AVS.
that's all folk ^^;
sorry for my bad english.
any suggestions, corrections are welcome :)
++