View Full Version : Let's share your favorite Avisynth scripts! :)
lovelegend
17th July 2002, 19:33
Hi guys, I'm a newbie, and in these five days I did read the "Avisynth Q&A" and some of the related links. However, I found that there's a lack of REAL examples. Even the tutorial posted on the avisynth website (http://math.berkeley.edu/~benrg/avisynth-tutorial.html) just tells you how to join clips, reduce the size by 2, stackvertical, etc, which are actually not practical.
Therefore, I would like to ask if you could post your favorite Avisynth scripts, with a brief discription of what does your script do, like 'For converting DVDrip avi file into SVCD (mpg-2) file'... so newbies like me could have a reference and a point to start with. Thank you very much!!! :)
kayman
17th July 2002, 19:42
friend wrote a gui to help automate the avs process and cce so this is a paste from the ini. this script is for tv caps this the +trims function so i can edit out commercials
this script is for a mpeg 2 SCVD but hte encoding is done in CCE then a pulldown is run after cce encoding
telecide decimate commands bring the frame rate down to 23.976 from 29.97
unfilter and temporal soften help to reduce the small amount of noise bt smoothing the unfilter sharpens the image after the smotthing
TemporalSoften2(2,5,5)
[AVSINFO]
BLACKNESS = YES
BLACKNESSB = 5
BLACKNESSE = 5
NUMENTRIES = 11
AVSENTRY1 = LoadPlugin("f:\Decomb.dll")
AVSENTRY2 = LoadPlugin("f:\SimpleResize.dll")
AVSENTRY3 = LoadPlugin("f:\TemporalSoften2.dll")
AVSENTRY4 = LoadPlugin("f:\UnFilter.dll")
AVSENTRY5 = +AVI
AVSENTRY6 = TemporalSoften2(2,5,5)
AVSENTRY7 = unfilter(40,40)
AVSENTRY8 = Telecide()
AVSENTRY9 = Decimate()
AVSENTRY10 = +TRIMS
AVSENTRY11 = SimpleResize(480,480)
cardboardguard
22nd July 2002, 22:58
Originally posted by kayman
friend wrote a gui to help automate the avs process
any chance you could put it up somewhere or attatch it? i'd like to see/try it. :)
kayman
23rd July 2002, 00:18
no sorry i work for a SVCD tv release group , stickly memebers only :)
but as a tease it works really well stream lines us to get it edited out encoded with the push of a few buttons
kayman
h00z
23rd July 2002, 14:34
I mostly encode anime, and my scripts usually go something like this:# Battle Angel Episode 1 DivX;-) AVISynth Script
# --- Load Plugins ---
LoadPlugin("C:\Program Files\DivX Apps\Avisynth\mpeg2dec_.dll")
LoadPlugin("C:\Program Files\DivX Apps\Avisynth\decomb.dll")
LoadPlugin("C:\Program Files\DivX Apps\Avisynth\simpleresize.dll")
LoadPlugin("C:\Program Files\DivX Apps\Avisynth\temporalsoften2.dll")
LoadPlugin("C:\Program Files\DivX Apps\Avisynth\avisynth_spatial.dll")
LoadPlugin("C:\WINDOWS\System32\vobsub.dll")
Import("D:\_avs-files\vdub_filters.avs")
# --- Load Video Clip ---
mpeg2source("D:\ba1\ba1.d2v")
# --- Crop ---
Crop(12,2,700,478)
# --- Decomb.dll Settings ---
Telecide(chroma=true,gthresh=50,guide=1,threshold=30)
Decimate(cycle=5)
# --- Smoother ---
TemporalSoften2(1,10,1)
SpatialSoftenMMX(1,1,0,false,false,10,10,1,1)
# --- Resize ---
SimpleResize(512,384)
# --- Sharpen ---
ConvertToRGB()
VD_WarpSharp(20)
ConvertToYUY2()
# --- Subtitles ---
VobSub("D:\ba1\vts_03_0")I haven't tried the sharpening capabilities of the new "Unfilter" yet, but it might eventually replace my WarpSharp filter since it works in native YUY2 space (saving some time on the conversion to RGB and back).
theReal
27th July 2002, 03:20
Get GordianKnot and create an avs script. It's a good starting point as it contains almost all important options. I learned avisynth through this script (plus the reference guide). I still use the Gknot script as a starting point for almost all avisynth jobs.
Richard Berg
27th July 2002, 07:46
GKnot is only good for DVD ripping, and not very good at that (for avisynth, no doubt it gets the job done WRT actually ripping).
theReal
27th July 2002, 11:32
Well, of course you can (and have to) change the GKnot script, but as a starting point and a good example how to make a script with many options, I think it's quite good.
In the meantime, almost no value is left original and I add many other filters (if I need any filters at all).
btw for ripping a normal PAL DVD, I find it best not to have too many filters and stuff. I like this script, it's what GKnot actually uses, and I don't see what could be better about it (because there's almost nothing in it):
LoadPlugin("E:\GORDIA~1\mpeg2dec.dll")
mpeg2source("G:\DVD Rips\test.d2v")
trim(startframe,endframe)
crop(0,68,720,445)
BicubicResize(704,304,0,0.5)
Now, for something a little more complicated, I change the script, of course. I'm just encoding Schindler's List. The source is a Chinese DVD which has been copied from LD. (The quality is quite ok, btw)
LoadPlugin("E:\GORDIA~1\mpeg2dec.dll")
LoadPlugin("E:\GORDIA~1\InverseTelecine.dll")
mpeg2source("G:\[ DVD Rips ]\Schindler\Schindler.d2v")
trim(0,342529)
InverseTelecine(44,11,95)
crop(8,69,704,351)
TemporalSmoother(4,1)
(The resizing is done in VDub with Precise Bilinear, and yes, I tried Decomb/telecide, I also tried other IVTC() values, I tried GreedyHMA and I tried to ivtc manually with doubleweave() and pulldown(), but InverseTelecine(44,11,95) seemed to give the best results)
So, if I start from scratch or if I take the Gknot script as a starting point, I end up with the same commands, I think.
Acaila
27th July 2002, 13:48
Normally I don't use any filters except crop and resizing, but if I find a slightly noisy DVD I use this one (already discussed in the XviD section here (http://forum.doom9.org/showthread.php?s=&threadid=28127)):
Source=MPEG2source("D:\DivX Rip\DivX\X-Men\X-Men_64bit.d2v").Crop(16,74,696,432)
Temporal=Source.TemporalSoften2(1,5,25).MergeChroma(Source)
Spatial=SmoothHiQ(Temporal,3,25,10,192,3).MergeLuma(Temporal)
Movie=Spatial.Trim(0,136800).BicubicResize(672,288,0,0.5)
Credits=Trim(Source,136801,0).TemporalSmoother(10).BilinearResize(672,288)
Return Movie+Credits
Most movies gain a bit of pixel noise mostly coming from BicubicResize in combination with MPEG quantizer in XviD. This script cleans it up nicely without loosing detail.
For noisier movies increase the thresholds some more, but you'll start losing detail as well.
The thing with the credits I have always used since it is a nice way to get the credits size down (in combination with a high quant encoding)
Marc FD
27th July 2002, 13:51
Sorry i don't have favorite scripts :
I write a new for each encode/movie.
@ Acalia :
try this one :)
Source=MPEG2source("D:\DivX Rip\DivX\X-Men\X-Men_64bit.d2v").Crop(16,74,696,432)
Temporal=Source.Cnr2() #Or Cnr2Ex for tweaking
Spatial=SmoothHiQ(Temporal,3,25,10,192,3).MergeLuma(Temporal)
Movie=Spatial.Trim(0,136800).BicubicResize(672,288,0,0.5)
Credits=Trim(Source,136801,0).TemporalSmoother(10).BilinearResize(672,288)
Return Movie+Credits
i would like if you could say what do you think of my filter,
and it's exactly defined to do Temporal Chroma Denoising :)
Acaila
27th July 2002, 14:18
In that case you're not exactly getting the inner workings of my script. It does temporal luma smoothing, and spatial chroma smoothing.
EDIT:
I tried out your CNR2 as a replacement of SmoothHiQ, and I couldn't detect any obvious differences in output (with my short test anyway). However the file with CNR2 was approx. 3.5% smaller (constant quality 100%).
Oh, and it was a bit faster too :)
Marc FD
27th July 2002, 14:43
I don't get it...
MergeChroma is in fact adding chroma to the temporal
denoised luma??
Ok, i'm wrong. I just didn't know how work MergeLuma and MergeChroma.
Why do you prefer using temp denoising on luma and spatial denoising on chroma ??
Maybe you try to remove high-frequency chroma noise,
which is the more frequent. I would aggree with you that
a spatialsmoother is better for high-freq noise.
BUT cnr2 is _designed_ to stabilize/denoise the chroma low AND high
frequencies noise : i think it's better than a usual tempsmother
for that : It's not just a tempsmother on chroma plane : the algo
is far away from that. In fact you could just try it like this :
Source=MPEG2source("D:\DivX Rip\DivX\X-Men\X-Men_64bit.d2v").Crop(16,74,696,432)
Temporal=Source.TemporalSoften2(1,5,25).MergeChroma(Source)
temp2=Cnr2.MergeLuma(Temporal)
Movie=temp2.Trim(0,136800).BicubicResize(672,288,0,0.5)
Credits=Trim(Source,136801,0).TemporalSmoother(10).BilinearResize(672,288)
Return Movie+Credits
That's a modified script with the acaila-spirit :)
say me if it's really horrible (it's my filter after all)
Thx.
PS : I don't pretend my filter will give better results, but since you haven't tried it :)
dividee
27th July 2002, 18:54
@Acaila
Just some optimizations on script:
MergeChroma is not necessary since you only keeps luma from this clip with MergeLuma later. Also, instead of TemporalSmoother(10) for credits, something like TemporalSoften2(1,40,40) is faster and should do the job just as well.
Do you still see the "green shift" bug? With the new Compare/PSNR debugging filter from Marc & me it has become easier to quantify this problem. I have to say that a lot of filters exhibit this problem, and of course it's only made worse when you're chaining filters. They'll slowly be fixed, one by one. I guess you saw the new version of SmoothHQ sh0dan posted which correct this problem.
[EDIT:] Sorry for being OT
Acaila
27th July 2002, 19:53
@Marc FD:
Why do you prefer using temp denoising on luma and spatial denoising on chroma ??Temporally or spatially smoothing on the chroma plane hardy gets rid of any noise. On the other hand when done on the luma plane it denoises very well (because we can't see differences in chroma as soon as in luma). Spatial filtering can cause blurring very soon, temporal is much safer in that respect. Combine these two things and temporal+luma and spatial+chroma makes very much sense to me, and my results show this as well. These are my findings though, perhaps others disagree.
So the major part of my denoising is done by the temporal filtering, the spatial chroma part only attributes a very small amount (it's just there to catch the leftovers).
In fact I just ran a test series (2500 frames, 100% quality mode) with various components of my above script (to see how your filter worked):
Filter Size Reduction Result
Unfiltered 20022 0,0% Noisy
Cnr2 19276 3,9% No difference over non-filtered
SmoothHiQ 19950 0,4% No difference over non-filtered
TemporalSmoother 17554 14,1% Much less noise
TemporalSoften2 18186 10,1% Less noise
TemporalSmoother + Cnr2 16721 19,7% Much less noise, no difference over TemporalSmoother alone
TemporalSmoother + SmoothHiQ 17478 14,6% Much less noise, no difference over TemporalSmoother alone
TemporalSoften2 + Cnr2 17350 15,4% Less noise, no difference over TemporalSoften2 alone
TemporalSoften2 + SmoothHiQ 18112 10,5% Less noise, no difference over TemporalSoften2 alone
Filtering in the chroma plane didn't produce any visible difference (not even a single pixel shift, quite remarkable), but it did benefit compression. So based on these tests I'd say the combination TemporalSoften2 + Cnr2 is a very good candidate for denoising :).
@Dividee:
Thanks to all of you for finding and fixing the cause of that chroma shift.
MergeChroma is not necessary since you only keep luma from this clip with MergeLuma later.Yeah I guess your right, but it made sense to do it like that. I never looked at it in a way to optimize it :)
Also, instead of TemporalSmoother(10) for credits, something like TemporalSoften2(1,40,40) is faster and should do the job just as well.As far as I have seen TemporalSmoother always results in higher compression that TemporalSoften2. The latter pretty much always retains more detail, but what I was looking for, for the credits part, is higher compression not detail.
13242 frames (black & white text)
TemporalSmoother(10): 8826 kb
TemporalSoften2(1,40,40): 10060 kb
Question:
How can I use the Layer/Mask/PSNR filters to see in more detail what (and how much) my filter chain smoothes? So far I'm getting a PSNR value about 45-50 (is that good?), but I'm entirely sure I'm using it correctly.
Marc FD
27th July 2002, 21:15
First, acalia, great work :cool: !
A very good PSNR would be around 60.
but 45-50 average is a good quality.
after all, don't forget if your source is
more noisy than your result, the PSNR would
not have a real signification...
To test/compare filters i use See.dll in
Subtract(a,b).See(0,min,max).levels(min,1,max,0,255)
combinaisons :
- 128-130 for low-freq noise,
- 131,140 for med-freq noise and
- 141,160 for high-freq noise.
The thing i prefer is to use See(5) (HSL:S)
and See(7) (HSL:H) It acts like a revelator
and show you things you would never suspect
(like the monstruous ugly quantisation from
DivX 5 on chroma...)
If you don't see chroma differences using
the UV mode from see can help you.
(I designed it first to compare chroma
channels)
What i can say from my exp. is that chroma is not
very noticable, and it's why there is huge noise
on it. I tested my filters on a very noisy VHS
encode (dancing chroma) and it gived me a better
output. since it's real-time capable, i would really
like to use it like a post-processor, but AviSynth
_lacks_ mp3 decoding (hope richard hear my prayer :) )
@Dividee
Would a new avs be soon on sourceforge ??
I really need compare (for my benchmarks) :)
BTW, could you send me the last compare source ??
i will see if i can correct some bugs or add
cool features :D
@All
I'm going to make advanced benchmarks on all
avisynth filters. I've done a whole testing
protocol. I would make my first "paper" on the
Resize filters : "The true about avs resizers" :)
I could get sticky or doom9 could add it somewhere.
I will try to make something like a "reference".
I think it could help lots of people (and me too ;) )
Wait'n'see :cool:
EDIT : sorry it was "levels" not "layers" :rolleyes:
lovelegend
28th July 2002, 00:52
@@........ you guys are too pro....
I think I still have a long way to go... :rolleyes:
Originally posted by Acaila
Normally I don't use any filters except crop and resizing, but if I find a slightly noisy DVD I use this one (already discussed in the XviD section here (http://forum.doom9.org/showthread.php?s=&threadid=28127)):
So noise would be produced if the movie was resized? (Since I always think the noise reducing filters are needed for analog source, such as VHS --> avi) And if we're going to resize an avi into let say mpg-2, then we should use noise reducing filters, right? :rolleyes:
Also, where could I get more information about Temporal filtering and spatial filtering on luma and chroma planes? I think many newbies like me would like to know more about this. However, just take this thread as an example, your discussion is far out of my knowledge already... ^^" Therefore, I hope you guys could show us the way for the first step (this is also the reason for me posting this thread)... :) (Don't hit me if it's on Avisynth reference guide, since I haven't finished reading it.... :D )
Also, how to calculate the PSNR? And is it meaningful if I just wanna convert avi into SVCD?
theReal
28th July 2002, 12:44
lovelegend, don't worry too much about chroma and PSNR if you're just about to write your first working avisynth script.
Better use, like I said, the Gknot avisynth files as an example, or the easy script I posted above.
Resizing doesn't produce noise, resizing actually works as a noise filter (bilinear resizing reduces noise more than bicubic).
You need noise filters primarily for analog sources, but some DVDs are also made from analog sources, or they are artificially made to look like they were analog ("film-effect").
As a rule of thumb, don't use any filtering unless you need it. You need filtering if the source looks really bad already, or if it doesn't compress well enough.
As a good and easy noise filter I'd recommend temporalsmoother(2,1) (where 2 is the strength and 1 is the radius, also change the values to see what they do). Up to this point, I'd say it's really easy :)
From what I read here, I think I have to look a little further into chroma denoising - I guess it can make tv captures more compressible with almost no impact on the actual looks of the video. I don't think it's so important for DVDs, where I try to get good results without filtering.
MoonWalker
28th July 2002, 13:25
@Acaila
Are you using any parameteres at cnr2?? Of just plain like this :
Source=MPEG2source("D:\DivX Rip\DivX\X-Men\X-Men_64bit.d2v").Crop(16,74,696,432)
Temporal=Source.TemporalSoften2(1,5,25).MergeChroma(Source)
temp2=Cnr2().MergeLuma(Temporal)
Movie=temp2.Trim(0,136800).BicubicResize(672,288,0,0.5)
Credits=Trim(Source,136801,0).TemporalSmoother(10).BilinearResize(672,288)
Return Movie+Credits
Is this you canditate script?? :) Is the MergeChroma(Source) needed?
EDIT : @MarcFD I have tried this filter chain with Cnr2 (in Vdub) but I sais "invalid arguments to funcions Cnr2"..I have avisynth 2.02
MoonWalker
Acaila
28th July 2002, 14:13
@MoonWalker:
Source=MPEG2source("D:\DivX Rip\DivX\X-Men\X-Men_64bit.d2v").Crop(16,74,696,432)
LumaFiltered=Source.TemporalSoften2(1,5,25)
ChromaFiltered=LumaFiltered.Cnr2().MergeLuma(LumaFiltered)
Movie=ChromaFiltered.Trim(0,136800).BicubicResize(672,288,0,0.5)
Credits=Source.Trim(136801,0).TemporalSmoother(10).BilinearResize(672,288)
Return Movie+CreditsI changed the variable names to more appropriate ones :)
I'm guessing a Layer() and a Mask() command thrown in at the right places could make all this filtering work a lot better, if only I knew how to use them. Documentation is too technical IMO and thus not very helpful unless you have a solid background in that sorta stuff (sorry Poptones :().
If someone can make a n00b-readme for these two commands with some good examples, it'd be much appreciated :)
Marc FD
28th July 2002, 23:10
@moonwalker
it didn't work because you didn't gave im a implicit clip arg :)
@Acaila
I don't see how you can use mask/layers to have better
results ?? what are these filters desingned too ??
@lovelegend
No pb, we aren't discuting about something very special.
I think you will very soon understood everything.
You just lacks a little practice :)
MoonWalker
28th July 2002, 23:25
@MarcFD..
Yes yes I know :devil: :devil:....My quickness...
Well I just started a test...I goes with 20-21 fps(whereas a bicubic resize was going 28-29)...I am doing The Matrix.
I did quick test comparing the d2v and the script and saw clear difference in noise..Much less noise..And with a very small smoothing of the backround only(I saw some woods that were smoothed a little :)), but it's not visible when playing the movie...
I will post as soon as it finishes...
MoonWalker
lovelegend
29th July 2002, 03:08
@theReal
Yeap, I think I've got your point... :rolleyes:
Btw, I've visited the Gknot website and it says it will choose a suitable resize filter for you, but if I write avisynth myself, then which filter should I use? :confused:
@Marc FD
But if I don't know the nature of the filters and how does they work, then how could I understand them? Or you mean I should test the filters myself and find those which are suitable for me? :rolleyes:
theReal
29th July 2002, 07:49
The filters Gknot uses are either:
#BicubicResize(640,464,0.333,0.333) "Soft Bicubic"
# or
#BicubicResize(640,464,0,0.5) "Neutral Bicubic"
# or
#BicubicResize(640,464,0,0.75) "Sharp Bicubic"
# or
#SimpleResize(640,480)
Bilinearresize is not good, only use it for credits. I try to use Neutral Bicubic always. Sharp Bicubic sharpens a bit (and indeed adds some noise), Soft Bicubic blurs a bit (but compresses better.
Simple Resize is a Bilinear Resizing, but it looks quite ok and it is very fast
lovelegend
29th July 2002, 08:36
@theReal
Oh, i see, thanks!
Another question, why do you use IVTC in your script? I've read some discussions, I know what's IVTC. However, I don't know when and why (any benefit?) should I use IVTC... (and when shouldn't I use IVTC?)
Recently I just need to convert avi's into SVCD's, then do I need to do IVTC? :confused:
theReal
29th July 2002, 08:42
I have only used it once, for converting an NTSC DVD to Divx (it was a little complicated because the DVD had been made from Laserdisc)
Usually, I'm converting only PAL stuff and there's absolutely no need for ivtc.
You only need ivtc if you want to convert partially interlaced (telecined) 29.97fps material to progressive 23.976fps material.
lovelegend
29th July 2002, 08:52
Originally posted by theReal
I have only used it once, for converting an NTSC DVD to Divx (it was a little complicated because the DVD had been made from Laserdisc)
Usually, I'm converting only PAL stuff and there's absolutely no need for ivtc.
You only need ivtc if you want to convert partially interlaced (telecined) 29.97fps material to progressive 23.976fps material.
So all the avi's with 29.97fps can be IVTC to 23.976fps, right? But what's the point of doing that? Someone said the flow of the film would be more smooth (on PC, if I remember right), someone said the filesize would be smaller. http://arbor.ee.ntu.edu.tw/~jackei/dvd2avi/ivtc/ says only 30fps telecined from 24fps can be converted back to 24fps by IVTC, but if I've got a DVDrip (avi), how do I know it's telecined or not? :confused:
P.S. Am I off-topic? No, I'm still discussing the AviSynth script... :D
Marc FD
29th July 2002, 10:07
Originally posted by lovelegend
Or you mean I should test the filters myself and find those which are suitable for me? :rolleyes:
Yes. The only way is to test/tweak/try/play with the filters.
I'm going to make very complete benchmarks on avisynth filters.
My first bench would be on resizers.
It could be interessing for you :)
I'm going to work now :D
theReal
29th July 2002, 10:42
lovelegend,
you can only ivtc TELECINED 29.97fps material, that means it has been converted from progressive 24fps film to 29.97 ntsc before. Then you convert it back to the original by removing all of the artificially inserted, interlaced frames. The result looks better than deinterlaced 29.97fps material, because it is truly progressive scan without any interlacing artefacts.
23.97fps compresses a lot better than 29.97fps, so you also gain quality. For example Schindler's List, the DVD I just mentioned, got a Gknot compress test value of 44% at a resolution of 576x320 with 29.97fps deinterlaced.
With ivtc, motion scenes look better, and the movie got a compress test value of 52% at a 640x352 resolution. So, in the end, it looks WAY BETTER in 23.97fps.
You cannot, however, ivtc any 29.97fps material. If the movie has been filmed with a camcorder, or it has been produced for tv, then it most certainly is true 29.97fps, all frames interlaced, nothing you can remove.
MoonWalker
29th July 2002, 12:47
I can say one think...Superb..I haven't see so good image quality...I have The Matrix 2-CD rip (with just a BicubicResize(0,0.5)) and The Matrix 2-CD rip(with acaila's filter chain)..XviD compressed, MPEG Quant(That adds more noise)..Well the result was very very obvious..The one with acaila's filter was excellent..No noise at all..And when playing the movie no visual smoothing(only if you pause the movie and observe __VERY__ carefully)...The only con is tha I had about 18-19 fps whereas the plain resize was 27-28..But I don't care since I am a fan of quality :p :p
MoonWalker
Acaila
29th July 2002, 13:56
@Marc FD:
I took a closer look at using your Cnr2() in that filter chain of mine. At first sight it was very good (as I mentioned earlier), higher compression, negligible detail loss.
However on closer examination I noticed a kind of 'chroma ghosting' effect. During fast motion the residual chroma image would linger a frame or two behind the real image (which at 25fps during playback won't be noticable, that's why I didn't see it earlier). This can probably be reduced/avoided by using custom settings, however it still means the default values are too aggressive.
One other thing, could you please clarify if this Cnr2 of yours is temporal or spatial? I believe it's temporal, but I don't think I've seen you mention it anywhere. And I've never used the original Cnr filter.
Marc FD
29th July 2002, 15:10
It's a temporal filter. I've said it already before (maybe on an another thread?) and i think it's written in the readme
(i've ommited it ??)
But when normal temporal filters could only remove low frequency noise, this filter can remove more noise, and it's damn faster :)
If you want to have an impressive result with this filter, test it on noisy analog sources (TV,VHS) it would lead to good improvements in quality and compressibility.
Of course on DVDs (who are less noisy on Chroma), it wouldn't be very impressive...
I'd like to add that the only side-effect is chroma ghosting and not bluring. This filter would never blur chroma.
Do you saw chroma ghosting on evey action scenes, or only on explosions/SpecialFXs ??
lovelegend
29th July 2002, 20:21
@theReal
I will try it myself and see, thanks anyway! :)
@Marc FD
Of course I'm interested! :D
Waiting for your report! ;)
soujir0u
30th July 2002, 11:31
Hi, I tried using Acaila's filter chain, and am trying to adapt it for anime encoding. I increased the diameter value to 7 for SmoothHiQ, but it turned everything into red! Messing around with the Chroma and Luma values (2nd and 3rd values I think) solved the problem, but I'm still not sure as to what these values are for, and how they affect the picture... Can anyone help? Thanks!
sh0dan
30th July 2002, 12:54
documentation (http://cultact-server.novi.dk/kpo/avisynth/smooth_hiq_as.html)
Simpler put:
The higher the threshold is, the more blurred your image will become (and more noise be eliminated). Luma is light-value, and chroma is color value. Usually it is a good idea to have a higher chroma threshold, since there is often more noise in the color.
Regarding the 'reddishnes' - are you using the latest (1.01) - just released a few days ago?
Anyway, there is a new version up tomorrow, with some new features to be tested.
soujir0u
30th July 2002, 13:01
Yes, I'm using 1.01. Maybe it's because my luma value was higher than the chroma...
Um, Acaila, what do you mean by a normal setting? Would that be using the same value for both Luma and Chroma?
Edit: ??? Suddenly the post by Acaila disappeared!
Acaila
30th July 2002, 13:08
@sh0dan:
A small clarification please.
If chroma difference > chroma threshold but luma difference < luma threshold does your filter still smooth the chroma channel or doesn't it do anything for that pixel.
I.e. is it:
1) IF chroma difference > chroma threshold AND luma difference > luma threshold THEN blur chroma and blur luma
Or 2) IF chroma difference > chroma threshold THEN blur chroma
IF luma difference > luma threshold THEN blur luma
soujir0u
30th July 2002, 13:11
Would you guys like to look at my script and suggest some improvements please? Thanks!
# Start
mpeg2source("D:\1\1.d2v")
Telecide(post=false)
Decimate(cycle=5)
ConvertToRGB()
VD_AreaBasedDeinterlace(false, "blend", 27, 50, false, 0)
VD_SmartDeinterlace("both","luma",false,true,true,false,20,100)
crop(17,4,686,472)
ConvertToYUY2()
SmoothHiQ(7,15,15,254,0)
ConvertToRGB()
VD_WarpSharp(20)
ConvertToYUY2()
TemporalSoften2(1,5,25)
BicubicResize(592,336,0,0.5)
# End
I use Area Based Deinterlacer + Smart Deinterlacer to clean up any remaining combed frames as it's better than Decomb's postprocessing. SmoothHiQ + Warpsharp to clean up the noise and sharpen it a bit (good for anime!). I'm not sure what settings I should use for SmoothHiQ and TemporalSoften2, so I just threw in some numbers based on other posts on this forum. :p
Acaila
30th July 2002, 13:12
@soujir0u: I deleted it after I saw that sh0dan posted the same thing when I was writing mine :D
Anyway, I said that for anime you don't need to smooth ONLY the luma plane for TemporalSoften and ONLY the chroma plane for SmoothHiQ. For anime you can generally smooth much more because the amount of detail to keep is much less, so just chain a TemporalSmoother with a SmoothHiQ without all the extra things I had in my chain.
e.g.
MPEG2Source=(".....")
Crop(...)
TemporalSmoother(...)
SmoothHiQ(...)
SimpleResize(...)
etc.etc.
Acaila
30th July 2002, 13:19
My suggestions for your scipt:
- I doubt you really need that many deinterlacers...
- TemporalSmoother(2) or a TemporalSoften2 with higher settings than what you're using now.
- SmoothHiQ(7,25,15,192,3) (<- works good for me)
- For anime I'd use SimpleResize instead of Bicubicresize because the lines aren't as sharp as on normal movies and the general amount of detail is lower too.
But I haven't done many anime so someone else can probably help better for specific settings.
Ps. check the posting times, this feels like live chatting :)
sh0dan
30th July 2002, 14:54
Originally posted by Acaila
@sh0dan:
If chroma difference > chroma threshold but luma difference < luma threshold does your filter still smooth the chroma channel or doesn't it do anything for that pixel.
No - luma and chroma BOTH have to pass for the pixel to be included in the current pixel. To do what you suggest, you will have to smooth each colorspace seperately, and use merge to get them together. For this, you of course have to set threshold on the non-processed colorspace to 255.
#Smooth only chroma plane, and do not take luma into consideration
avisource("")
chromasmooth=smoothiq(7,255,30,192,3)
mergechroma(chromasmooth)
I would not recommend doing so, because weight with difference will be almost disabled, because max difference is 255.
@soujir0u: Damn - you have many yuy2->rgb->yuy2 conversions - be aware, that this process isn't lossless. You might also want to try using higher threshold for chroma values (25-30) in the SmoothhiQ.
soujir0u
31st July 2002, 00:55
Thanks for your suggestion guys. I've decided to simply use VirtualDub in Full Processing mode due to too many RGB filters that I have to use... But it's kinda slow, about 3fps. :(
Marc FD
31st July 2002, 10:44
3 fps !!!
It's slower than vlad's Convolution3D or my M.A.M. !!
I think you should search more :
There IS a way to do better filtering only in YUY2 colorspace :
Try the new filters (see "smooth in time and space" thread)
you should be able to encode @ ~10 fps....
soujir0u
1st August 2002, 06:00
Hmm... But I want to use Warp Sharp which only works in RGB mode... I'll try using Mpeg2dec's built-in Smart Deinterlace and the other filters your mentioned and see if I get some speed increase.
Marc FD
1st August 2002, 11:48
I used WarpSharp too, but i wiould prefer an avisynth filter who can do the same thing. maybe unfilter ??
lovelegend
2nd August 2002, 10:34
I've got another problem..... Before sh0dan posted the new thread (http://forum.doom9.org/showthread.php?s=&threadid=30354&highlight=smoothhiq), I tried to use Acaila's filter chains. However, I didn't have SmoothHiQ filter, so I did a search and found that it's a Virtual Dub plugin. I then followed the instruction in Avisynth Q&A, copied and pasted the function to a new SmoothHiQ.avs file with the function referred to the SmoothHiQ.vdf (I don't know if I was right, but for the function I just changed the directory to refer to SmoothHiQ.vdf). And then use import() to import the SmoothHiQ.avs..... but I got the Script error: expected "val", "bool", "int", "float", "string", or "clip".
Her is my simple script:
test=AVISource("path\testclip.avi")
import("F:\ASDLL\VDubFilters\SmoothHiQ.avs")
SmoothHiQ(test,3,25,10,192,3)
Here is the SmoothHiQ.avs
function VD_SmartSmoothHiQ(clip clip, int "diameter", int "threshold", int "amount",
string "mode",
\ bool "weighted_difference", int "maintain_diffweight", bool "visualize_blur", bool "grayscale")
{
LoadVirtualdubPlugin("path\SmoothHiQ.vdf", "_VD_SmartSmoothHiQ")
mode = default(mode, "weighted")
mode = (mode=="average") ? 0 : (mode=="weighted") ? 1 : -1
Assert(mode>=0, """VD_SmartSmoothHiQ: "mode" parameter must be "average" or "weighted"""")
return clip._VD_SmartSmoothHiQ(default(diameter,5), default(threshold,50), default(visualize_blur,0), default(amount,254),
\ mode, default(grayscale,false)?1:0, default(weighted_difference,true)?1:0, default(maintain_diffweight,0))
}
Then I kept searching and found that avisynth had a function called 'LoadVirtualDubPlugin', I then used it but it had another Script error: invalid arguments to function 'SmoothHiQ'. I just want to know what did I do wrong (in both indirect and direct methods)...
P.S. I noticed that the function in SmoothHiQ.avs had 8 arguments (exclude the argument 'clip'), but both Acaila and soujir0u put only 5 arguments... um..... :rolleyes:
Wilbert
2nd August 2002, 11:09
That's because you messed up two different filters! A VirtualDub filter called Smart Smoother HiQ and an AviSynth filter called Smooth HiQ.
The VirtualDub version can be used as follows:
# example:
# ConvertToRGB()
# VD_SmartSmoothHiQ(5,50,254,"weighted")
# ConvertToYUY2()
1) Note there is a mistake in the script, you should replace default(visualize_blur,0) by default(visualize_blur,0)?1:0 (my mistake sorry). You can do that in Notepad.
2) You can just import the vdub_filters (a pointer can be found in Q&A) in your script, thus:
import("F:\ASDLL\VDubFilters\vdub_filters.avs")
test=AVISource("path\testclip.avi")
test2=ConvertToRGB32(test)
VD_SmartSmoothHiQ(test2,5,50,254,"weighted")
or what is the same:
import("F:\ASDLL\VDubFilters\vdub_filters.avs")
AVISource("path\testclip.avi").ConvertToRGB32()
VD_SmartSmoothHiQ(5,50,254,"weighted")
In the url you gave smoothiq (http://forum.doom9.org/showthread.php?s=&threadid=30354) you can download the AviSynth version (note that this contains a dll-file: SmoothHiQ.dll). Which can be used as follows:
LoadPlugin("F:\SmoothHiQ.dll") # or wherever you put it
ConvertToYUY2() # probably not necessary
SmoothHiQ(7,15,15,254,0)
Please have a look at Q&A: Q21, Q27 and Q32.
theReal
2nd August 2002, 11:10
lovelegend, first I had the same problem because there are two versions of smoothhiq.
You can find the avisynth version here:
http://forum.vcdhelp.com/userguides/99389.php
It's not on Donald Graft's site (only the VDub version) and nowhere else. I wonder why, it's a good filter...
**EDIT: Wilbert, you were faster :)
lovelegend
3rd August 2002, 03:51
Oh, it's my mistake then, thanks for telling and giving me the link for the filter. Thanks Wilbert and theReal...
However, I'm leaving and I will read the steps for importing virtual dub plugins later........ :)
Shayne
4th August 2002, 14:02
Hi guys this thread is helping me out greatly on my TV captures since i am a newbie to tv always using dvd prior.
I ussally run vdubs filters
stevens/avery dynamic noise deduction and
avery warp sharpen
but its slow
I just have 1 question
it appears to me that some of these scripts run filters prior to decomding or droping the frame rate. Why would i want to do this is there some avantage to cropping a droped frame or runing any filter prior to decomb
theReal
4th August 2002, 19:29
it appears to me that some of these scripts run filters prior to decomding or droping the frame rate.
Which ones do you mean? I haven't seen any scripts that do this (and I also think it wouldn't make any sense to do so).
You can run smoothing filters before resizing to make filtering artefacts less visible, but to run smoothing filters before ivtc or deinterlacing would only reduce the effectiveness of ivtc and deinterlacing filters and result in a crappy video.
lovelegend
4th August 2002, 19:40
@Shayne
as theReal said, I haven't seen a script using filters before ivtc too... although I didn't know the reason (thanks theReal for the explanation... :) )
@All
I've got another problem using Acaila's filter chain... here's my script of trying to use Acaila's filter chain:
movie=AVISource("D:\movie.avi")
LoadPlugin("F:\ASDLL\mpeg2dec\mpeg2dec.dll")
LoadPlugin("F:\ASDLL\SmoothHiQ\SmoothHiQ.dll")
LoadPlugin("F:\ASDLL\TemporalSoften2\TemporalSoften2.dll")
Temporal=movie.TemporalSoften2(1,5,25).MergeChroma(movie)
Spatial=SmoothHiQ(Temporal,7,25,15,192,3).MergeLuma(Temporal)
return Spatial
But the script gave me the error message: Avisynth: illegal instruction at 0x00dfed28 (I'm using avisynth 2.02)
Hope I didn't do any silly mistake as I did last time... :D
@theReal
I remember you said I didn't need to write very fancy script in the beginning, but I just wanna try other people's filter chains as a reference. :)
Dreassica
4th August 2002, 19:44
Try using a more up to date version of Avisynth!!
theReal
4th August 2002, 20:05
@lovelegend, I learned a lot in this thread, too. I didn't know before about the benefits of seperate luma and chroma filtering.
It can be very good for tv-captures, though.
For most normal DVDs I'm still a fan of no filtering and the strongest filter I accept is Precise Bilinear Resizing in VDub instead of neutral Bicubic in avisynth :)
Marc FD
4th August 2002, 20:37
@lovelegend
sounds like it needs an emms somewhere. lemme guess, you used Bicubic resize of avs b5 or something like that ??
To process TV sources, i will use the new filters of the "smooth in time and space" thread. they are still experimental, but i think there would be soon improvements there : Convolution3D and MAM are well suited for very noisy sources or to get a very good quality (for DVDs )
Cnr2 will be added in the CVS when it would be good tested
Wilbert
5th August 2002, 09:56
He is using 2.02 and not 1.0b5. There's a problem with MergeChroma in 2.02. Try using a newer version given in: http://forum.doom9.org/showthread.php?s=&postid=161254#post161254
Shayne
7th August 2002, 03:10
Hi again i am tring to run these filter chains but keep getting the following error
"Script error: there is no function named mergechroma"
is this an external function and if so where can we download it ........ and MergeLuma.
Thanks for ur time
theReal
7th August 2002, 03:16
http://forum.vcdhelp.com/userguides/99389.php
it's the "Merge 1.0" package - each command is a seperate dll
Shayne
7th August 2002, 03:19
I thank u my friend for that speedy reply
jarthel
8th August 2002, 12:16
You mentioned this AVS script in one of your messages here.
-----------
Source=MPEG2source("D:\DivX Rip\DivX\X-Men\X-Men_64bit.d2v").Crop(16,74,696,432)
LumaFiltered=Source.TemporalSoften2(1,5,25)
ChromaFiltered=LumaFiltered.Cnr2().MergeLuma(LumaFiltered)
Movie=ChromaFiltered.Trim(0,136800).BicubicResize(672,288,0,0.5)
Credits=Source.Trim(136801,0).TemporalSmoother(10).BilinearResize(672,288)
Return Movie+Credits
-----------
Where is the good place to place an IVTC line?
Thanks
Jayel
Richard Berg
8th August 2002, 12:19
Before any smoothing. The sharper the comb artifacts, the easier they are to detect.
Acaila
8th August 2002, 12:32
I've never had to do any IVTC (yet), but isn't it also better to do it before cropping so the deinterlace filter can use the full frame/field resolution?
In which case this would mean:
Source=MPEG2source("D:\DivX Rip\DivX\X-Men\X-Men_64bit.d2v").PutWhateverIVTCFiltersYouWantToUseInThisSpot.Crop(16,74,696,432)
Richard Berg
8th August 2002, 12:37
I can only see it mattering if you crop an odd number of pixels off the top, in which case you'll simply need to flip a parameter somewhere.
Disclaimer: I didn't write any of the IVTC plugins.
soulfx
8th August 2002, 13:22
If levels and tweak are nessisary use them before the IVTC as well.
jarthel
8th August 2002, 13:28
just a question
I just made this quick AVS file
----
LoadPlugin("D:\downloads\windows\utilities\divx\GordianKnot\mpeg2dec.dll")
LoadPlugin("D:\downloads\windows\utilities\divx\GordianKnot\decomb.dll")
#LoadPlugin("D:\downloads\windows\utilities\divx\GordianKnot\InverseTelecine.dll")
#LoadPlugin("D:\downloads\windows\utilities\divx\GordianKnot\Avisynth_Spatial.dll")
LoadPlugin("D:\downloads\windows\utilities\divx\GordianKnot\TemporalSoften2.dll")
LoadPlugin("D:\downloads\windows\utilities\divx\GordianKnot\SimpleResize.dll")
LoadPlugin("D:\downloads\windows\utilities\divx\GordianKnot\SmoothHiQ.dll")
LoadPlugin("D:\downloads\windows\utilities\divx\GordianKnot\cnr2.dll")
Source=mpeg2source("D:\dvdrips\dual7\dual7.d2v").Crop(16,74,696,432)
LumaFiltered=Source.TemporalSoften2(1,5,25)
ChromaFiltered=LumaFiltered.Cnr2().MergeLuma(LumaFiltered)
Movie=ChromaFiltered.Trim(0,136800).BicubicResize(672,288,0,0.5)
Credits=Source.Trim(136801,0).TemporalSmoother(10).BilinearResize(672,288)
Return Movie+Credits
----------
it's telling me it can't find mergeluma function? Where can I download the dll? Thanks
Jayel
ps. I'm using avisythn 1.06
Wilbert
8th August 2002, 13:38
it's telling me it can't find mergeluma function? Where can I download the dll? Thanks
Download either the external plugin (see faq Q12), or download AviSynth v2.04 http://sourceforge.net/project/showfiles.php?group_id=57023&release_id=103898.
jarthel
8th August 2002, 14:59
I encode only animes.
Can you suggest temporalsoften2 settings is possible? The settings will be use in the code you posted.
Thanks :)
Jayel
Acaila
8th August 2002, 15:15
Anime is an entirely different story. You'll need both spatial and temporal filters there, not just temporal. With anime you'll need filtering to get rid of artifacts, with normal movies you should use filtering to get rid of noise only because getting rid of artifacts kills too much detail.
For TemporalSoften2 I would think (1,10,15) should do the trick. But I'd use it on both luma and chroma plane, not just luma as I did in my chain.
But anyway, just do a search for anime and you'll find a hundred or so filter suggestions.
Ps. Anyone else agree with me that we need a seperate anime/cartoon encoding section? There's enough posts around (spread over all sections) that could justify it I believe.
Marc FD
8th August 2002, 15:48
Anime is something else. :cool:
@acalia
I do tons of anime encode and what you said makes sense ;)
You can do temporal filtering with separate luma/chroma
without mergechroma/mergeluma :
TemporalSoften2(.,.,0) for luma only
Cnr2() for chroma only
Acaila
8th August 2002, 16:38
Marc FD wrote:
You can do temporal filtering with separate luma/chroma
without mergechroma/mergeluma :
TemporalSoften2(.,.,0) for luma only
Cnr2() for chroma onlyWell yes, but I meant that slight temporal filtering alone isn't enough for anime, so there's no need (IMO) to split the planes up with different filters, might as well use one filter (TemporalSoften2) on both planes at once.
And could you please get my nick right by now, it's Acaila, not Acalia :D
Ps. If I'm not mistaken (Dividee please correct me if I am), but using TemporalSoften2(..,..,0) will only start to smooth luma if there is no chroma difference. It does not smooth luma or chroma seperately, but only when both thresholds are passed.
So to smooth luma regardless of chroma value you'll still need TemporalSoften2(..,..,255).MergeChroma(..)
Marc FD
8th August 2002, 16:55
hmm, i didn't really thinked at that too ...
I think i should better work on my filters :)
and sorry for your nick, i always write it wrong, and sometimes i doesn't check. no offense :)
Maybe a MAM with strong settings could do some "magic". i hope at least, because it's why i created it :D
dividee
8th August 2002, 17:49
Ps. If I'm not mistaken (Dividee please correct me if I am), but using TemporalSoften2(..,..,0) will only start to smooth luma if there is no chroma difference. It does not smooth luma or chroma seperately, but only when both thresholds are passed.
No, that's the opposite. TemporalSoften smooth luma and chroma separately (but SpatialSoften smooth only if luma and chroma passed).
That's one of the reason for it's speed.
Note that if you use avisynth 2.04, you don't need the TemporalSoften2 plugin anymore, I replaced the built-in TemporalSoften with my implementation.
Acaila
8th August 2002, 19:05
Oh.
Well thanks for clearing that up :)
WarpEnterprises
8th August 2002, 21:36
I want to add a function which helps me quite a lot.
It is inspired by the VD-plugin "rmPAL" by Peter Schweizer (see here) (http://homepages.fh-giessen.de/~hg6423/rmPal/index.englische-uebersetzung--translated-into-english.html) , which removes the alternating line colors often seen when capturing from video.
LoadPlugin("c:\programme\videotools\plugins\mpeg2dec.dll")
# ...
# your code
# ...
function rmPal(clip c) {
c = c.AssumeFrameBased.SeparateFields.AssumeFrameBased
MergeChroma( c, c.BlendFields(), 1 )
AssumeFieldBased()
return Weave()
}
This blends the color only of two lines per field.
The AssumeFrameBased are necessary to fool BlendFields and SeparateFields to always work.
theReal
8th August 2002, 21:49
@dividee, do you know if there is any updated avisynth reference that includes all the internal changes being made since the original reference was published?
It seems to me that there are a lot of commands and possibilities in newer versions of avisynth that I only hear of by chance (like in this thread :))
baz00ie
8th August 2002, 22:21
Well, i've been following the "Smooth in Time and Space..." thread - http://forum.doom9.org/showthread.php?s=&threadid=29829 - and i've put together a simple script that provides excellent results when applied to very noisy video.
#################################################
# ASYNTH v2.04 De-Interlace + Noise reduction #
#################################################
LoadPlugin("C:\Programs\avisynth\Convolution3D.dll")
LoadPlugin("C:\Programs\avisynth\TomsMoComp.dll")
LoadPlugin("C:\Programs\avisynth\mam.dll")
LoadPlugin("C:\Programs\avisynth\MPEG2DEC.dll")
LoadPlugin("C:\Programs\avisynth\SmoothHiQ.dll")
LoadPlugin("C:\Programs\avisynth\Cnr2.dll")
AVISource("D:\...")
Convolution3D(8,16,0)
TomsMoComp(1,0,1)
MAM(TemporalSmoother(3,1),SmoothHiQ(3,10,0,75,1))
Cnr2()
SmoothHiQ(3,0,15,75,1)
Tweak(hue=9.0)
#end
I've found that doing all the smoothing in the YUV colorspace seemed to add a little green to the image... Tweak(9.0) shifts it back about 5%.
To see the results, please download the "before n' after" images here: http://www3.sympatico.ca/joseph.cooke/de-noise_results.zip
Thank you, to Marc FD, Vlad59 and everyone else for there hard work in providing some great video tools.
Later
baz
jarthel
8th August 2002, 23:46
Originally posted by Acaila
Anime is an entirely different story. You'll need both spatial and temporal filters there, not just temporal.
Thanks for the reply acaila. But can you tell me where should I place these filters in relation to your code.
Thanks
Jayel
ps. I'm fairly new to this manual advance editing as I've used gknot ever since. :)
dividee
8th August 2002, 23:59
@theReal
Things are getting into place, and documentation is catching up.
Look here (still largely incomplete, anybody can help):
avisynth.org
and here (sh0dan's doc update):
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/avisynth2/avisynth/docs/index.html
lovelegend
9th August 2002, 08:11
Thanks jarthel and Acaila (I hope didn't spell wrong... :D )
I thought anime was the same as movie.... ^^"
Just knew that I needed a different filter chain for it... ^^"
I think I need to search and read a lot of threads in this "Doom9 Avisynth Library" again.... ;) :D
MaTTeR
9th August 2002, 14:38
Originally posted by Acaila
@Marc FD:
However on closer examination I noticed a kind of 'chroma ghosting' effect. During fast motion the residual chroma image would linger a frame or two behind the real image (which at 25fps during playback won't be noticable, that's why I didn't see it earlier). This can probably be reduced/avoided by using custom settings, however it still means the default values are too aggressive.
Marc FD,
Have the default values been tweaked to address the ghosting issue Acaila mentioned? Or is this more of an internal code problem that your looking into? I plan on doing some tests real soon with X-Men so I'm just curious. Thanks for the nice work on the filter.
theReal
9th August 2002, 15:23
@dividee, thanks! Those links help a lot! :)
vidiot
12th August 2002, 22:12
...havenīt read everything in this thread...,
but did someone mentioned the beautyful script:
Edit with avysnth @vcdhelp.com?
http://forum.vcdhelp.com/userguides/99389.php
and another (old, from 2001...), which helped me much to understand
how avisynth works.
I couldnīt find this thread anymore @vcdhelp, but on my HD:
(Hope nobody gets angry about posting such scripts from somewhere else...)
#######################################################
# Copyright 2001 Eric Warnke
# Free for non-commercial use, please give credit
#######################################################
#
# Generic .avi to VCD, and SVCD conversion
# script. Allows converion between PAL->NTSC
# frame rates. Please use AVISynth 1.0b3, as not all
# functions work under 0.3
#
# Follow directions and uncomment lines where necessary
# when done you should have a complete conversion sctipt.
# For simplicity I assume..
# VCD = 352x240/288 with a frmae rate of 23.976,29.97/25
# SVCD = 480x480/576 @ 23.976,29.97/25
#
# I do not answer simple questions at above email address
# but I will take any corrections/alterations.
#
########################################################
#
# Load video source
#
# Uncomment ONE of the following lines to load
# your source. Make sure to include the full path to
# your avi source or this may not work.
#
#1 Use for most normal .avi files including Divx
#AVIFileSource("moviename.avi")
#2 Use next line only for LARGE .avi's
#OpenDMLSource("moviename.avi")
#3 Use Next line only for virtualdub/avi_io segmented .avi's
#SegmentedAVISource("moviebase.avi")
#4 Use for odd formats that play though MP see AVIsynth doc
# for more info. Can open MS DV files.
#DirectShowSource("movie.mpg")
#4a if you notice off colored lines when using Directshowsource
# use the following line
#FixBrokenChromaUpsampling()
#
#########################################################
#
# Load external audio source ( if necessary )
#
# This will overlay an .wav file over the movie. Great for use
# with program like DVD2AVI that produce a seperate .wav file.
#
#1 If necessary load external .wav file for movie
#audioDub ( WAVSource("Mymovieaudio.wav") )
#2 bump audio if necessary -in seconds-
#delayaudio(1)
#
##########################################################
#
# Video size / bordering
#
# Use one of the following to get a properly resized borderd
# video based on input and output. All resize values have
# been rounded to the nearest 16 to prevent macroblock waste.
#
# NOTE: These are only applicable to PROGRESSIVE material
# do not attempt to use these for interlaced material as
# you will end up with a big mess.
#
# If you input is -- 4:3 -- and you are going to ....
# NTSC and a format of
#1 VCD
#bicubicresize(352,240)
#2 SVCD
#bicubicresize(480,480)
# PAL and a format of
#3 VCD
#bicubicresize(352,28
#4 SVCD
#bicubicresize(480,576)
#
# If you input is -- 16:9 -- and you are going to ....
# NTSC and a format of
#5 VCD
#bicubicresize(352,176).addborders(0,32,0,32)
#6 SVCD
#bicubicresize(480,352).addborders(0,64,0,64)
# PAL and a format of
#7 VCD
#bicubicresize(352,20.addborders(0,40,0,40)
#8 SVCD
#bicubicresize(480,432).addborders(0,72,0,72)
#
# If you input is -- 2.35:1 -- and you are going to ....
# NTSC and a format of
#9 VCD
#bicubicresize(352,144).addborders(0,48,0,4
#10 SVCD
#bicubicresize(480,272).addborders(0,104,0,104)
# PAL and a format of
#11 VCD
#bicubicresize(352,160).addborders(0,64,0,64)
#12 SVCD
#bicubicresize(480,320).addborders(0,128,0,12
#
##########################################################
#
# Misc functions
#
#1 Clean up head noise or other garbage at top and bottom
# of the video frame by adding black borders VCD only
#letterbox(8,
#2 Clean up head noise SVCD
#letterbox(16,16)
#3 If you get a technicolor mess as your mpeg output, this option
# may be necessary. If you have YUY2 or huffyuv as source and
# going to CCE you will probably need this option.
#ConvertToRGB()
#4 PC -> TV brightness correction
#levels(0,1,255,16,239)
#5 Audio rate correction. If your audio is not already 44,100
# many encoders will complain, use this to correct
#resampleaudio(44100)
#6 Fix for broken codecs that decompress upside-down
#FlipVertical()
#
#########################################################
#
# Frame rate converion ( if necessary )
#
# Uncomment one of the assumefps or change fps lines if
# frame rate conversion is necessary. If you video is
# already in one of the three following 23,976,25,29,97
# and not chaning it's format you do not need to use
# one of the following lines.
#
# First three add and drop frames, last two speed/slow
# video and audio to proper FPS ( 1.0b3 only ) it's a
# better method, but is only applicable to two specific
# conversion senarios.
#
#1 Irregualr FPS converison to NTSC film rate
# use this for 10,15,20 -> NTSC film conversion
#ChangeFPS(23.976)
#2 Irregualr FPS -> NTSC frame rate
# use for 10,15,20 -> NTSC conversion
#ChangeFPS(29.76)
#3 Irregular FPS to PAL frame rate
#ChangeFPS(25)
#4 NTSC film 23.976 -> PAL 25
#assumeFPS(25,sync_audio=true)
#5 PAL 25 -> NTSC film 23.976
#assumeFPS(23.976,sync_audio=true)
#
#
# Thats all folks, assuming you have everything installed properly
# You can now open this file in TMPGenc, CCE, MP, and most other video
# applications.
#
# END OF SCRIPT
-----------
Hope this helps
Harald
Marc FD
18th August 2002, 10:14
@Matter
in Cnr2 the values are the defaults of the VDub version.
Wide luma 192/45 near chroma 255/37 (from what i remember)
i think you would get better results using Cnr2 BEFORE tempsoften.
matrix
18th August 2002, 17:33
I felt somewhat shy about posting this, it's really long, but then it looks so good; so.... why not?
So, here it goes:
It creates a motion menu with animated thumbnails.
x1=480
y1=480
x2=60
y2=60
x3=160
y3=160
hgap1=50
hgap2=20
hgap3=20
hgap4=20
hgap5=20
hgap6=50
vgap1=140
vgap2=40
vgap3=80
dur=980
tf1=0
tf2=0
tf3=0
tf4=0
tf5=0
tf6=0
tf7=0
bvid=AviSource("C:\Movie\menu.avi").AddBorders(24,28,24,16).BilinearResize(1920,1920).Animate(80,130,"subtitle","the",960,260,80,80,"Rackham Italic",0,$FFFFFF,"the",920,260,130,130,"Rackham Italic",96,$FFFFFF).Animate(100,150,"subtitle","LORD",1960,360,100,100,"Snipple",144,$EEAD0E,"LORD",720,360,150,150,"Snipple",144,$EEAD0E).Animate(100,150,"subtitle","of the",-240,348,100,100,"Airstream",96,$FFFFFF,"of the",1032,348,150,150,"Airstream",96,$FFFFFF).Animate(130,180,"subtitle","RINGS",960,464,130,130,"Europa",0,$FFD700,"RINGS",676,484,180,180,"Europa",144,$FFD700).Subtitle("the",920,260,130,550,"Rackham Italic",96,$FFFFFF).Subtitle("LORD",720,360,150,550,"Snipple",144,$EEAD0E).Subtitle("of the",1032,348,150,550,"Airstream",96,$FFFFFF).Subtitle("RINGS",676,484,180,550,"Europa",144,$FFD700).Animate(550,600,"subtitle","the",920,260,550,550,"Rackham Italic",96,$FFFFFF,"the",960,260,600,600,"Rackham Italic",0,$FFFFFF).Animate(550,600,"subtitle","LORD",720,360,550,550,"Snipple",144,$EEAD0E,"LORD",1960,360,600,600,"Snipple",144,$EEAD0E).Animate(550,600,"subtitle","of the",1032,348,550,550,"Airstream",96,$FFFFFF,"of the",-240,348,600,600,"Airstream",96,$FFFFFF).Animate(550,600,"subtitle","RINGS",676,484,550,550,"Europa",144,$FFD700,"RINGS",960,464,600,600,"Europa",0,$FFD700).BilinearResize(x1,y1).trim(0,dur).Subtitle("Main Menu",30,400,0,980,"Johnny Fever",16,$BDB76B).Subtitle("Play Movie",368,400,0,980,"Johnny Fever",16,$BDB76B).Subtitle("1. The Bridge",50,210,0,980,"Times New Roman",13,$CDAF95).Subtitle("of Khazad-Dum",50,223,0,980,"Times New Roman",13,$CDAF95).Subtitle("2. Lothlorien",130,210,0,980,"Times New Roman",13,$CDAF95).Subtitle("3. The Mirror",210,210,0,980,"Times New Roman",13,$CDAF95).Subtitle("of Galadriel",210,223,0,980,"Times New Roman",13,$CDAF95).Subtitle("4. Farewell",290,210,0,980,"Times New Roman",13,$CDAF95).Subtitle("to Lorien",290,223,0,980,"Times New Roman",13,$CDAF95).Subtitle("5. Parth ",370,210,0,980,"Times New Roman",13,$CDAF95).Subtitle("Galen",390,223,0,980,"Times New Roman",13,$CDAF95).Subtitle("6. The Departure",50,310,0,980,"Times New Roman",13,$CDAF95).Subtitle("of Boromir",50,322,0,980,"Times New Roman",13,$CDAF95).Subtitle("7. Credits",370,310,0,980,"Times New Roman",13,$CDAF95)
tvid1=AviSource("C:\Movie\t1.avi").BilinearResize(x2,y2).Trim(tf1,tf1+dur)
tvid2=AviSource("C:\Movie\t2.avi").BilinearResize(x2,y2).Trim(tf2,tf2+dur)
tvid3=AviSource("C:\Movie\t3.avi").BilinearResize(x2,y2).Trim(tf3,tf3+dur)
tvid4=AviSource("C:\Movie\t4.avi").BilinearResize(x2,y2).Trim(tf4,tf4+dur)
tvid5=AviSource("C:\Movie\t5.avi").BilinearResize(x2,y2).Trim(tf5,tf5+dur)
tvid6=AviSource("C:\Movie\t6.avi").BilinearResize(x2,y2).Trim(tf6,tf6+dur)
tvid7=AviSource("C:\Movie\t7.avi").BilinearResize(x2,y2).Trim(tf7,tf7+dur)
V01=AviSource("C:\Movie\t1.avi").AddBorders(0,0,0,60)
V02=AviSource("C:\Movie\t2.avi").AddBorders(0,0,0,60)
V03=AviSource("C:\Movie\t3.avi").AddBorders(0,0,0,60)
V04=AviSource("C:\Movie\t4.avi").AddBorders(0,0,0,60)
V05=AviSource("C:\Movie\t5.avi").AddBorders(0,0,0,60)
V06=AviSource("C:\Movie\t6.avi").AddBorders(0,0,0,60)
V07=AviSource("C:\Movie\t7.avi").AddBorders(0,0,0,60)
V01=Trim(BicubicResize(V01,160,160),1,138).Subtitle("1",7,133,0,980,"Johnny Fever",13,$CD9B1D).Subtitle("The Bridge of Khazad-Dum",2,158,0,980,"Johnny Fever",12,$CD9B1D)
V02=Trim(BicubicResize(V02,160,160),141,278).Subtitle("2",7,133,0,980,"Johnny Fever",13,$CD9B1D).Subtitle("Lothlorien",48,158,0,980,"Johnny Fever",13,$CD9B1D)
V03=Trim(BicubicResize(V03,160,160),281,418).Subtitle("3",7,133,0,980,"Johnny Fever",13,$CD9B1D).Subtitle("The Mirror of Galadriel",10,158,0,980,"Johnny Fever",12,$CD9B1D)
V04=Trim(BicubicResize(V04,160,160),421,558).Subtitle("4",7,133,0,980,"Johnny Fever",13,$CD9B1D).Subtitle("Farewell to Lorien",18,158,0,980,"Johnny Fever",13,$CD9B1D)
V05=Trim(BicubicResize(V05,160,160),561,698).Subtitle("5",7,133,0,980,"Johnny Fever",13,$CD9B1D).Subtitle("Parth Galen",34,158,0,980,"Johnny Fever",14,$CD9B1D)
V06=Trim(BicubicResize(V06,160,160),701,838).Subtitle("6",7,133,0,980,"Johnny Fever",13,$CD9B1D).Subtitle("The Departure of Boromir",8,158,0,980,"Johnny Fever",11,$CD9B1D)
V07=Trim(BicubicResize(V07,160,160),841,978).Subtitle("7",7,133,0,980,"Johnny Fever",13,$CD9B1D).Subtitle("Credits",56,158,0,980,"Johnny Fever",14,$CD9B1D)
V01=Reverse(FadeOut(Reverse(FadeOut(V01,25)),25))
V02=Reverse(FadeOut(Reverse(FadeOut(V02,25)),25))
V03=Reverse(FadeOut(Reverse(FadeOut(V03,25)),25))
V04=Reverse(FadeOut(Reverse(FadeOut(V04,25)),25))
V05=Reverse(FadeOut(Reverse(FadeOut(V05,25)),25))
V06=Reverse(FadeOut(Reverse(FadeOut(V06,25)),25))
V07=Reverse(FadeOut(Reverse(FadeOut(V07,25)),25))
tvid8=V01+V02+V03+V04+V05+V06+V07
h1=hgap1+x2
h2=hgap1+x2+hgap2+x2
h3=hgap1+x2+hgap2+x2+hgap3+x2
h4=hgap1+x2+hgap2+x2+hgap3+x2+hgap4+x2
h5=hgap1+x2+hgap2+x2+hgap3+x2+hgap4+x2+hgap5+x2
h6=hgap1+x2+50+x3
h7=50+x2+hgap6
v1=vgap1
v2=vgap1+y2
v3=vgap1+y2+vgap2
v4=vgap1+y2+vgap2+y2
v5=vgap1+y2+vgap2+y2+100
part1=bvid.Crop(0,0,x1,v1)
part2=StackHorizontal(bvid.Crop(0,v1,hgap1,y2),tvid1,bvid.Crop(h1,v1,hgap2,y2),tvid2,bvid.Crop(h2,v1,hgap3,y2),tvid3,bvid.Crop(h3,v1,hgap4,y2),tvid4,bvid.Crop(h4,v1,hgap5,y2),tvid5,bvid.Crop(h5,v1,hgap6,y2))
part3=bvid.Crop(0,v2,x1,vgap2)
part4=StackHorizontal(bvid.Crop(0,v3,hgap1,y2),tvid6,bvid.Crop(h1,v3,hgap2+30,y2),tvid8.Crop(0,0,x3,y2),bvid.Crop(h6,v3,30+hgap5,y2),tvid7,bvid.Crop(h5,v3,hgap6,y2))
part5=StackHorizontal(bvid.Crop(0,v4,h1+50,100),tvid8.Crop(0,y2,x3,100),bvid.Crop(h6,v4,h7,100))
part6=bvid.Crop(0,v5,x1,vgap3)
mvid=StackVertical(part1,part2,part3,part4,part5,part6)
return mvid
I'll attach a pic of how it looks like, if "they"(the moderators) will make it show.
The larger thumbnail plays a few seconds from each chapter (this btw was "pko" idea), I liked it, and addopted it(with some minor changes).
The text is animated too, some words come from different directions, some zoom in, it looks nice, well, I like it.
Hmm.... How do I post that picture?
Edit.
Can't seem to be able to post that picture. ..something wrong with the forum database...(whatever that means):mad:
iago
18th August 2002, 17:45
@Acaila and everybody
This is my first attempt to use Acaila's filter chain in one of my rips, with a rather difficult to compress movie, aiming for 1CD 645000kb video size, using Koepi's latest (18082002-1) build :).
Encoding parameters will be:
1st pass: 6.UltraHigh/MPEG/Lumi enabled
2nd pass: 6.UltraHigh/MPEG or MODULATED/Lumi enabled
(unnecessary to mention other parameters I guess)
(Avisynth 2.04+)
Can you please analyze and verify that the following avs script is correct:
---------------------------------------------------------------------
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\TemporalSoften2.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\cnr2.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\SimpleResize.dll")
SetMemoryMax(40)
Source=mpeg2source("D:\RIP\RIP.d2v").crop(0,11,718,452)
LumaFiltered=Source.TemporalSoften2(1,5,25)
ChromaFiltered=LumaFiltered.Cnr2().MergeLuma(LumaFiltered)
Movie=ChromaFiltered.Trim(0,205210).SimpleResize(512,272)
Credits=Source.Trim(205211,0).TemporalSmoother(10).BilinearResize(512,272)
Return Movie+Credits
----------------------------------------------------------------------
(My first try somehow crashed during encoding in VirtualDub 1.4.10 without any error messages, with my PC restarting, but I'm not sure if it was due to something wrong with the avs script above.)
And any other suggestions would surely be appreciated :).
Thanks a lot in advance,
iago
Marc FD
18th August 2002, 18:34
Originally posted by iago
@Acaila and everybody
Can you please analyze and verify that the following avs script is correct:
---------------------------------------------------------------------
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\TemporalSoften2.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\cnr2.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\SimpleResize.dll")
SetMemoryMax(40)
Source=mpeg2source("D:\RIP\RIP.d2v").crop(0,11,718,452)
LumaFiltered=Source.TemporalSoften2(1,5,25)
ChromaFiltered=LumaFiltered.Cnr2().MergeLuma(LumaFiltered)
Movie=ChromaFiltered.Trim(0,205210).SimpleResize(512,272)
Credits=Source.Trim(205211,0).TemporalSmoother(10).BilinearResize(512,272)
Return Movie+Credits
----------------------------------------------------------------------
from what i now from Tempsoften now, this script is totally outdated ;)
try this :
---------------------------------------------------------------------
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\cnr2.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\SimpleResize.dll")
SetMemoryMax(40)
Source=mpeg2source("D:\RIP\RIP.d2v").crop(0,11,718,452)
TemporalSoften(1,5,0)
Cnr2()
Movie=Trim(0,205210).SimpleResize(512,272)
Credits=Source.Trim(205211,0).TemporalSmoother(10).BilinearResize(512,272)
Return Movie+Credits
----------------------------------------------------------------------
or maybe even that (faster and should be quite accurate)
---------------------------------------------------------------------
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\cnr2.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\SimpleResize.dll")
SetMemoryMax(40)
Source=mpeg2source("D:\RIP\RIP.d2v").crop(0,11,718,452).SimpleResize(512,272)
Movie=Trim(0,205210).TemporalSoften(1,5,0).Cnr2()
Credits=Source.Trim(205211,0).TemporalSmoother(10)
Return Movie+Credits
----------------------------------------------------------------------
and take a look on smooth in time and space, Convolution3D and MAM can be used to gain even more quality and compressibility !
iago
18th August 2002, 19:14
@Marc FD
Thanks a lot for the reply :). I'll try your settings asap.
And, yes, surely I'm keeping my eyes on the related avisynth threads, and admire all this great effort around.
Thanks again.
Best regards,
iago
matrix
18th August 2002, 22:45
Can't seem to be able to post that picture.
Here's what I'm talking about:
iago
18th August 2002, 23:02
@Marc FD
try this :
---------------------------------------------------------------------
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\cnr2.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\SimpleResize.dll")
SetMemoryMax(40)
Source=mpeg2source("D:\RIP\RIP.d2v").crop(0,11,718,452)
TemporalSoften(1,5,0)
Cnr2()
Movie=Trim(0,205210).SimpleResize(512,272)
Credits=Source.Trim(205211,0).TemporalSmoother(10).BilinearResize(512,272)
Return Movie+Credits
I think Line8 of the above script you provide should be corrected as:
Movie=Source.Trim(0,205210).SimpleResize(512,272)
and
or maybe even that (faster and should be quite accurate)
---------------------------------------------------------------------
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\cnr2.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\SimpleResize.dll")
SetMemoryMax(40)
Source=mpeg2source("D:\RIP\RIP.d2v").crop(0,11,718,452).SimpleResize(512,272)
Movie=Trim(0,205210).TemporalSoften(1,5,0).Cnr2()
Credits=Source.Trim(205211,0).TemporalSmoother(10)
Return Movie+Credits
I guess Line6 of the above script should be corrected as:
Movie=Source.Trim(0,205210).TemporalSoften(1,5,0).Cnr2()
Right? ;)
thanks,
iago
MoonWalker
18th August 2002, 23:11
Yes that's right..
Daring to ask
What exactly SetMemoryMax(40)does??
MoonWalker
iago
18th August 2002, 23:32
@MoonWalker
Thanks for confirming the scripts. :)
And,
Daring to ask
What exactly SetMemoryMax(40)does??
I remember this issue being discussed (in several threads here, one started by neuron2 as I recall) as a serious matter regarding the low performance/slowness of Avisynth 2.04. It was discussed that allocating more memory to versions since 1.0beta6 is required, because versions after 1.0beta6 have very limited memory usage.
Found it here: "Avisynth 2.04 is SLOOOOW !!! What gives?" thread.
so long,
iago
Marc FD
19th August 2002, 08:58
i use SMM(64) . personnaly i gain nothing, just a smoother playback and maybe some fps in a very long term (several hours)
@iago
Mhh, thinking of it, use Cnr2 BEFORE tempsoften, or you'll be ghosted to ill !
it gives :
---------------------------------------------------------------------
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\cnr2.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\SimpleResize.dll")
SetMemoryMax(40)
MPEG2source("D:\RIP\RIP.d2v").crop(0,11,718,452).SimpleResize(512,272)
TemporalSoften(1,5,0)
Cnr2()
Trim(0,205210)+Trim(205211,0).TemporalSmoother(10)
---------------------------------------------------------------------
iago
19th August 2002, 12:24
@Marc FD
use Cnr2 BEFORE tempsoften, or you'll be ghosted to ill !
it gives:
---------------------------------------------------------------------
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\cnr2.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\SimpleResize.dll")
SetMemoryMax(40)
MPEG2source("D:\RIP\RIP.d2v").crop(0,11,718,452).SimpleResize(512,272)
TemporalSoften(1,5,0)
Cnr2()
Trim(0,205210)+Trim(205211,0).TemporalSmoother(10)
---------------------------------------------------------------------
I guess you mean rewriting the above script and using that one below:
---------------------------------------------------------------------
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\cnr2.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\SimpleResize.dll")
SetMemoryMax(40)
MPEG2source("D:\RIP\RIP.d2v").crop(0,11,718,452).SimpleResize(512,272)
Cnr2()
TemporalSoften(1,5,0)
Trim(0,205210)+Trim(205211,0).TemporalSmoother(10)
---------------------------------------------------------------------
:confused:
iago
Marc FD
19th August 2002, 16:37
it's the same. at least it would gives the same result, i think.
Just try script against eachothers :)
i always prefer quality vs speed, but when you can have both, why not ? :devil:
iago
19th August 2002, 18:17
@Marc FD
Ok, thanks a lot. I've started a first pass with Koepi's latest aiming for 1CD (700mb or 800mb I haven't decided yet. After the first pass I will ;).) with this one:
---------------------------------------------------------------------
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\cnr2.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\SimpleResize.dll")
SetMemoryMax(40)
MPEG2source("D:\RIP\RIP.d2v").crop(3,7,714,460).SimpleResize(512,272)
Cnr2()
TemporalSoften(1,5,0)
Trim(0,205210)+Trim(205211,0).TemporalSmoother(10)
---------------------------------------------------------------------
Hope the result comes out fine for this "difficult-to-compress" case, in which actually I don't mind a bit smoothing as long as too much detail is not taken away.
best wishes,
iago
iago
20th August 2002, 13:39
Well, after the first pass with:
----------------------
Cnr2()
TemporalSoften(1,5,0)
----------------------
(avisynth 2.04+/simple resize/after resizing)
1stPass/2ndPass ratio is 2.55 (which was originally 3.93/without filtering), aiming for 650000kb (635mb) video size.
Now, I'm trying:
----------------------------
Convolution3d(0,10,22,8,8,0)
----------------------------
(avisynth 1.06b/simple resize/before resizing)
And I want to have a look at the 1stPass/2ndPass ratio before going on.
Then, I will make a 2nd pass with both of the above (guess it will take some time :)) to compare the results both visually and in terms of quantizers, etc.
best regards,
iago
vlad59
20th August 2002, 13:52
@iago
In theory, convolution3D(0, ...) will keep more details but the movie will be less compressible whereas Convolution3D(1, ...) will provide a smoother (more compressible) movie.
When you look frame by frame in vdub it's hard to see the quality difference.
iago
20th August 2002, 13:56
@vlad59
Thanks for your comment, clearing the issue further up for me :).
best wishes,
iago
Marc FD
20th August 2002, 17:25
i dont know if Convolution3D will gives you an outstanding result, but i'm sure of one thing : Cnr2().temporalSoften(1,5,0) is the faster filterchain you can use (you have 25-30 fps, right ??)
So i would be very interessed by a quality comparison (maybe screenshots ?) to see if encoding 2x slower really worth it.
iago
20th August 2002, 18:21
Originally posted by Marc FD
i'm sure of one thing : Cnr2().temporalSoften(1,5,0) is the faster filterchain you can use (you have 25-30 fps, right ??) Hi Marc, there's no doubt about the speed of Cnr2().temporalSoften(1,5,0), it's really as fast as a cheetah :), though not breaking such records as 25-30fps on my poor Celeron900/256RAM system ;).
So, to be fair in the comparison by equalizing the conditions :), and to inrease compressibility, and after taking vlad59's comments, I changed the convolution3d filter settings to matrix 1 and decided to apply it "after" simple resize, which gives:
----------------------------
Convolution3d(1,10,22,8,8,0)
----------------------------
avisynth 1.06b/simple resize/after resizing
(any comments vlad59?)
Originally posted by Marc FD
So i would be very interessed by a quality comparison (maybe screenshots ?) to see if encoding 2x slower really worth it. I will try to do that (yes, with screenshots) as soon as the long long encoding stage is finished :). That's what I've been considering from the beginning, but I doubted there would be any demand ;).
so long,
thanks and best regards to all,
iago
vlad59
20th August 2002, 19:08
Originally posted by iago
So, to be fair in the comparison by equalizing the conditions :), and to inrease compressibility, and after taking vlad59's comments, I changed the convolution3d filter settings to matrix 1 and decided to apply it "after" simple resize, which gives:
----------------------------
Convolution3d(1,10,22,8,8,0)
----------------------------
avisynth 1.06b/simple resize/after resizing
(any comments vlad59?)
No comments except that I know that Convolution3D can't really compete in speed because of its slowlyness (I'm working on it, but due to the spatial AND temporal work it'll be impossible to beat any optimized temporal only filter).
But in quality term (meaning keeping enought details and removing noise), it can compete.
Let's wait for the result.
iago
20th August 2002, 19:35
@vlad59
First of all, thanks for the reply. And I must say that I actually don't see the speed issue so much matter of concern and absolutely prefer to focus on quality, because imho the major purpose of all this respectable effort going on here is what you've already pointed out: quality (keeping enough details as well as removing the noise).
And another point regarding the speed of convolution3d: with matrix1 (1, ...) and applying it after simple resize [just like in the case of Cnr2().temporalSoften(1,5,0) chain], the difference in performance is not really "that" big (sth like -25%) compared to the previous filter chain. Actually, ATM I'm quite pleased with the current encoding speed.
And yes, the best thing to say for now is: "Let's wait for the result." :)
best regards,
iago
N3m1515
17th September 2002, 12:42
Well heres mine lol :o
loadplugin("C:\WINDOWS\system32\vobsub.dll")
loadplugin("c:\dvd\mpeg2dec.dll")
v=mpeg2source("C:\TEMP\SW.d2v")
a=wavsource("C:\TEMP\SW.wav")
audiodub(v,a)
bicubicresize(480,576)
VobSub("C:\Temp\SW")
Although I am happy wih the results, comparing mine to the others I feel I am missing something. All these filters etc that I dont understand make me feel I could improve upon my rips. I do mainly dvd rips so if I could try a few improvements could someone please advise as to what I should experiment with?
Thanks in advance:)
sh0dan
17th September 2002, 12:58
Convolution3D might help - it's very widely used to improve compression - see the thread. Otherwise, supply more on what you're encoding.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.