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.
|
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) |
I'm using TMPGEnc and don't know where to set this rating.
|
Open TMPGEng, go to setting, choose GOP structure and there change the MAX number of frames in a GOP to 12 or 15
|
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.
|
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 } |
Quote:
|
That's the same for this that I see in every scripts with noone seeing that is completly useless :
Quote:
|
Quote:
|
Quote:
|
Quote:
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). |
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:
|
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: |
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 ;-) |
I was referring to this post, http://www.kvcd.net/forum/viewtopic.php?t=6389
|
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. |
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: |
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). |
Can you give the the MA script that you use if itīs better? Iīd like to try that.
|
@ 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: |
@ CheronAph
I'll post it tonight because I'm at the office right now. @incredible A resizer sharpen only the edges of the pictures, not the plan area. IN fact, we should say that Bicubicresize soften the edges that are normally sharpened by bicubic interpolation, where Lanczos doesn't (I guess, not sure). Because it's a mathematical reality that applying bicubic equations leads to sharpening the edges. If you want you have a version of unfiltered bicubicresize (that means, a bicubic that do not do this softening) in the library bicublinresize there : http://ziquash.chez.tiscali.fr/ |
Well, I know the "bicubic" algorithms from Photoshop. There its explained that a bicubic algorithm will do an precise "interpolated" resize in comparison to a just "pixel cropped/moved/doubled" resize.
Or does Avisynth got its own definitions :?: And "Lanczos" .... hmmmm I did a lot of tests (also with the resizers in the link you posted, thanks :) ) and by using lanczos instead of bicubic I had to set the values of the following cleaners higher (to handle the plain parts in the movie!) and if not set higher the picture got still noise, cause of the paradoxing-Effect ;-) But I'll test again Hey Phil, doing Forum Jobs at Work like me? :) |
No no, avisynth have the same definition. But "interpolating" means "introducing an error'". After this, all depend on what you decide to do with this error : drop it completly, or try to counterbalance it with the next pixel you have to interpolate (kind of "error diffusion" for make it short). When you arrive on an edge, the algorithm do not have "next pixel" to use to counterbalance the error acumulated from the previous ones. That is where the problems occur.
This are old memories of my studies, so I'm not very sure of anything :-) For your last point, that sure that Lanczos introduces some artefacts, but my point is "Lanczos > Asharp+Bicubic". In your case, as you do not use Asharp, that is a different situation. I agree with you. The problem now : what are you doing if you find the picture too soft :?: |
In my last post I meant the option "bicubicresize & Asharp(1,2)", sorry for my english. :wink:
First bicubic then asharp gave me a well adaptive sharpened, cleaned and still detailed (espec. in hairs, skins etc.) image on tv in comparison to Lanczos. The pics above are in deed handled by using only bicubic in combination with mergeLuma/Chroma-blur without asharp(). Ok, its looks a little softer but so this 180 minutes movie @ 480x576 fits on one CD-R80 and it appears a very very lot more sharper in comparison to a 352x288 encode, even sharper as a 352x576. If I got an 120-140min, I remove the Merge... Lines ;-) cause of more CQ and shure by doing this it looks even sharper But testing continues .... as there will release new filters and techniques :D |
Ok, if I understand well your point :
- Bicubic then asharp = nice image, nice details - Asharp then Bicubic = image with noises I do not really see where can be the difference (except if you put some filters between the two lines). But I never tested the first order. |
Quote:
- Bicubic then asharp = more size, less details! - Asharp then Bicubic = less size, more details and :arrow: more contrast ! - Bicubic without Asharp = less size, loss details! - Lanczos without Asharp = more size(big), more details and :arrow: strange artefacts in the edges! :!: <edited> oops...i forgot: my taste... encrease the resolution to 702x480, then you don't need asharp or lanczos. use only bicubic! :wink: |
Quote:
Quote:
|
Phil,
"and more noise because you sharpen a noisy picture..." yeah,can be but my sources are clean dvds,then i don't got this problems. the "strange artefacts" using lanczos seems "moving ants" in the edges on low resolutions like 480x480 or less. do you want pictures or little samples with and without lanczos? :wink: |
Wow it seems that this thread is getting a little confused .... but even mor interesting.
Quote:
Quote:
I meat that if you first use Lanczos (which sharpens the movie and in my opinion it also sharpens to much other things than only the edges) and if after a laczos there will be a temporal or spatial cleaner the work will be a little paradox. So I meant: - "bicubic" then "cleaner" then "a little asharp (if really needed and with threshold set only to handle the edges)" = nice image, nice details, sharp - "lanczos" then cleaner = almost the same noise when using the same values in the cleaner-filter, so we have to rise up the values = maybe less quality in hairs & skins cause of more agressive cleaning values. - "bicubic" then "cleaner" = nice image, enough details on Tv AND more CQ! - "bicubic" then "cleaner" then a bit "mergel-uma/chroma-blur" to break the edges = nice image, still enough details on full vertical sizes like 576px (as seen in my pics above) just a touch softer on Tv but a rised CQ when predictioning for example long movies like my 180min sample above On the other hand, if we use a sharpening with values of asharp(1,4) before resizing, the sharpen advantage can be killed again by the following downscaling. Ok, maybe we will receive in relation an image condition as before resizing?! Like a compensation? I don't know, cause every source is different. Quote:
I mean if a picture is sharpened to much it will look very good on a pc, well amazing, but a Tv and its interlacing can produce "flickering" when used to much sharpened streams. And I think we should keep in mind that if our source is for example an 720x576 anamorph DVD/m2v stream we resize "down" to our desired resolution, so its not really necessary to do a sharpen before or after resizing cause we will preserve enough sharpeness when scaling down from a bigger detailed source. The case will be different if we have to "scale up" like Dvix/Xvid sources. Well IMHO everything depends upon the quality of the source, of someones taste and so on. All this all is only my opinion based upon my experiences and testings but shurely even for me not definitive ;-) and thats what I like in here.. the discussion |
Quote:
Quote:
|
Quote:
Quote:
I often mention a clip I have where the hero has a 2-day beard. Lanczos is the only resizer that does not litteraly shave the actor. Bicubic isn't only a resizer, it's a Mach 3 razor :-) Quote:
Quote:
Quote:
Quote:
That perhaps were all is our difference :!: Quote:
|
yes friends,you are very clear in your explanations...thanks!
or we have eagles eyes or it depend of the source, don't? :lol: in the end is just a little differences! .." that depends upon the threshold-value in Aharp() I think." .."It is not Lanczos that sharpens, but Bicubic that softens ! " ..."I never do upscaling." yeah! :wink: "... litteraly shave the actor. " :rotf: |
@ Dialhot
Quote:
@ Jorel Quote:
:D |
You guys are going way off topic :x , I still haven's solved that stupid problem. Can't i download the right script for the job somewhere? 8O
|
The answer to your question was in the second post of this tread :evil:
It seems that your problem isn't to DL the script, but to know what to do with it. For that you can go on the home page of KVCD.net and find guides on the right panel. They'll give you all informations needed to do a KVCD. |
Quote:
|
@ incredible
I donīt get it, I used your script, 480x576 mpeg1 bitrates 64 ~ 3000 lenght 98 minutes audio 128 CQ 63,160 http://www.digitalfaq.com/archives/error.gif |
Hereīs the script I used, have I done it wrong,
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\undot.dll") LoadPlugin("E:\-=[ KVCD ]=-\Filters\Avisynth_2.5\VSFilter.dll") Mpeg2Source("D:\DVDtoKVCD\vts_01.d2v") undot() Limiter() GripCrop(480, 576, overscan=3) TextSub("D:\DVDtoKVCD\vts_01.srt") GripSize(resizer="BicubicResize") STMedianFilter(8, 32, 0, 0 ) MergeChroma(blur(1.50)) MergeLuma(blur(0.1)) GripBorders() |
I'm not sure what the topic is here but one little tip is to put the dll's into the PLUGINS directory where Avisynth is installed and then you don't need the 'LoadPlugin' lines in your script
|
Iīll do that!
|
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.