digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: I need Anime encoding script (http://www.digitalfaq.com/archives/avisynth/6033-avisynth-anime-encoding.html)

BloodAngel 10-10-2003 04:43 PM

Avisynth: I need Anime encoding script
 
I want to make KSVCDs with anime. But when I use the script I have everything gets green. When you see something of the anime it stays like that. The whole ep long. Plz help me with this.

CheronAph 10-11-2003 12:18 AM

Use the MA script from here, http://www.kvcd.net/forum/viewtopic.php?t=3483
For Anime/Cartoon material:
Same as DVD clean material, but shorten the GOP to 12 frames (PAL) or 15 (NTSC)

BloodAngel 10-11-2003 03:16 AM

I'm using TMPGEnc and don't know where to set this rating.

CheronAph 10-11-2003 06:26 AM

Open TMPGEng, go to setting, choose GOP structure and there change the MAX number of frames in a GOP to 12 or 15

BloodAngel 10-11-2003 09:41 AM

So I need to use that Clear DVD code, I've installed AviSynth 2.5 and what do I do with the code then? I've found the GOP setting thank you, but it still doesn't work.

CheronAph 10-12-2003 12:31 AM

Here´s my script, just change the roots to your own files,

LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\MPEG2Dec3.dll")
LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\GripFit_YV12.dll")
LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\STMedianFilter.dll")
LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\asharp.dll")
LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\unfilter.dll")
LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\undot.dll")
LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\VSFilter.dll")

MaxTreshold = 1.50
nf = 0

Mpeg2Source("D:\DVDtoKVCD\vts_01.d2v")

undot()
Limiter()
asharp(1, 4)
GripCrop(352, 576, overscan=3)
TextSub("D:\DVDtoKVCD\vts_01.srt")
GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(MaxTreshold))
MergeLuma(blur(0,1))
GripBorders()

SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= SwitchThreshold ? \
unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ) : \
TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) , 1, 1) ")

Limiter()

function fmin( int f1, int f2) {
return ( f1<f2 ) ? f1 : f2
}

Latexxx 10-12-2003 01:55 AM

Quote:

Originally Posted by CheronAph
LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\MPEG2Dec3.dll")
LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\GripFit_YV12.dll")
LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\STMedianFilter.dll")
LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\asharp.dll")
LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\unfilter.dll")
LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\undot.dll")
LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\VSFilter.dll")

Isn't that l33t. :) :) :) :)

Dialhot 10-12-2003 05:43 AM

That's the same for this that I see in every scripts with noone seeing that is completly useless :

Quote:

MaxTreshold = 1.50
...
MergeChroma(blur(MaxTreshold))
That's make me laughting every time.

CheronAph 10-12-2003 07:18 AM

Quote:

Originally Posted by Dialhot
That's the same for this that I see in every scripts with noone seeing that is completly useless :

Quote:

MaxTreshold = 1.50
...
MergeChroma(blur(MaxTreshold))
That's make me laughting every time.

What´s making you laugh? A script that Kwaq made? How is it useless?

CheronAph 10-12-2003 07:19 AM

Quote:

Originally Posted by Latexxx
Quote:

Originally Posted by CheronAph
LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\MPEG2Dec3.dll")
LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\GripFit_YV12.dll")
LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\STMedianFilter.dll")
LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\asharp.dll")
LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\unfilter.dll")
LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\undot.dll")
LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\VSFilter.dll")

Isn't that l33t. :) :) :) :)

What is l33t?

Dialhot 10-12-2003 07:44 AM

Quote:

Originally Posted by CheronAph
What´s making you laugh? A script that Kwaq made? How is it useless?

Where is the need to define a variable that is used only in ONE place in the script ?
The definition of MaxThreshold was done in the very first MA script because we used it in TWO places (the blur and the first scripclip lines, because first MA scripts used 2 scripclip instruction). There were a lot of modification in the script since this time, and Maxthreshold is now use only in the blur command.

And it makes me laughing (or more accuratly, smiling, because I do not want to laught abotu anyone) because people just copy/paste the script whithout trying to understand what it does, and it's always weird for me (that's surely the results of 20 years of programming experience :-))

Trust me, you can securely change the top of the script by dropping the line "MaxThreshold=1.50" and put directly "MergeChroma(Blur(1.50))"

(note: by the way, blur can go till 1.58. that makes you gain a little more bytes).

BloodAngel 10-12-2003 09:01 AM

Damn I still don't get it. CheronAph, so I need to change the roots to my files. What files :S, I can't find them in the Avisynth directory. Can't someone mail me a script or something, so that I don't have to do it myself. :roll:

CheronAph 10-13-2003 01:18 AM

If I put the line, MergeChroma(Blur(1.50)) doesn´t that use the blurring throughout the movie?
The line, MergeChroma(blur(MaxTreshold)) means that it changes the chroma blur from 0.0 to 1.50 depending on the scene!
And yes, not everyone is a genius like you Dialhot! :roll:

Dialhot 10-13-2003 02:46 AM

You know, if not everyone is a genius, avisynth isn't either :-). And when it sees "Blur(MaxThreshold)" with MaxThreshold = 1.50, it understand "Blur(1.50)'. Nothing more, nothing else.

Your reply is a perfect hint that this line is very confusing ! If other people like you thought the blur will be from 0 to 1.50, for sure, there is a problem.

Didn't you even ask yourself " changes the chroma blur from 0.0 to 1.50 depending on the scene" but according to what ? How can avisynth decide wich value to use ?

Do not take yourself as a dumb CheronAph, you're not; Your computer is a lot dumber than you :-). Comparing to it, you are a perfect genius ;-)

CheronAph 10-13-2003 02:52 AM

I was referring to this post, http://www.kvcd.net/forum/viewtopic.php?t=6389

Dialhot 10-13-2003 03:29 AM

Yes but in this (very old :-)) time, MaxThreshold was modified in the MA part of the script and was not a constant like it is in the current version of the script. In this time your question was correct, and so the answer of Kwag.

That what I was refered in the begin of the tread : the modification of MaxTreshold in the MA part of the script was removed but the line "MaxTreshold = 1.50" is still there while it became completly useless.

That gives the impression that MaxThreshold is a variable where it is actually a constant.

incredible 10-13-2003 03:53 AM

I'll go further..:

undot()
Limiter()
asharp(1, 4)
GripCrop(352, 576, overscan=3)
GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(MaxTreshold))
MergeLuma(blur(0,1))
GripBorders()

Why Asharpen when blurring again afterwards? And even with an A(daptive)sharpen image StMedianFilter has to work harder. Even when the sharpen advantage from Asharp() is also softened by directly performing a bicubic resize afterwards.
I stuck with this modificated Part of the MA Skript and it gave me perfect Outputs:

undot()
Limiter()
GripCrop(480, 576, overscan=2)
GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
GripBorders()

The sharpness was almost the same and if I want to receive MORE CQ I just add the MergeLuma etc. Blurring Lines afterwards as it was (without the integration of Asharp() before. This gives me about 5-10% CQ more.

undot()
Limiter()
GripCrop(480, 576, overscan=2)
GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(1.50))
MergeLuma(blur(0,1))
GripBorders()

But this is only my opinion ... I feel free for everyones statement, especially from Dialhot :wink:

Dialhot 10-13-2003 05:03 AM

Effectively, as I told some times, I NEVER use any sharpening filters in my scripts (asharp or unfilter with negative values)
(I even never used the optimal MA script as it is given on the site except when I tested it when it was released).

Kwag explained why there is this "sharpening then bluring" operation in the script but I never stuck with the explanation and, like you, I prefer to remove it (and use Lanczosresize to obtain an sharper image than with bicubic).

CheronAph 10-13-2003 05:15 AM

Can you give the the MA script that you use if it´s better? I´d like to try that.

incredible 10-13-2003 06:24 AM

@ CheronAph

As shown above ... just remove the asharp line and if CQ Value is high enough (or movie gots short length or less action) even remove the Merge/Blur Lines (before prediction!).
In Case of low CQ just add the Merge/Blur lines and do a prediction again cause mergeLuma/Chroma-Blur "breaks" the edges which is very useful to obtain higher predictionned CQ Values and to avoid "mosquito"-Artefakts even at low CQ values ;-)
A little effect you see as a little, little blurred movie on Tv but a very big step to obtain more CQ, .. thats it.

This is one m1v Result by using even a non-MA script. Asharp() removed, bicubic resized followed by mergeLuma/chroma-blur lines in the script. The result was a CQ of about 55.
Media: One CD-R 80
Lenght: 180min !
Size: 480x576, 25fps PAL @ mpeg1
Audio: 128kbit audio
Source: orig. DVD

http://www.digitalfaq.com/archives/error.gif

http://www.digitalfaq.com/archives/error.gif

@ Dialhot

I testet a lot using Lanczos but as I said in another Thread it seems that this resize option sharpens the picture as a whole. 8O
So this would mean a bigger senseless job for temp. or spat. cleaners by processing the surfaces

If I still want a sharper Picture (processing short movies / or less action etc.) I often use this modified part of the MA Script (if MA Script is really used)

undot()
Limiter()
GripCrop(480, 576, overscan=2)
GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
Asharp(1, 2) # second value 2 to maintain the surfaces untouched as already handled by spat. Values of StMedian
GripBorders()

... following the MA routine

:wink:


All times are GMT -5. The time now is 07:34 AM  —  vBulletin © Jelsoft Enterprises Ltd

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.