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)

incredible 10-21-2003 03:29 AM

Quote:

Originally Posted by CheronAph
@ 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

64-3000????
What do you mean?

Well, first look at the movie. If its a Movie including high action scenes?
Or does it contain almost only calm scenes?
My Movie sample "Rendezvous with Joe Black" does not contain action szenes like StarWars for example thats one advantage for very low bitrate encoding. For "Pet Sementary" I would assume a max of 1900 or 2000.
But anyway ... 98 Minutes are not a lot and we can rise your quality if the quality of the source is good.
What's the condition of your source? good or bad (noisy).
The pic looks already very treated (I can see this in very soften parts of the ladys hair). Thats not a DVD Source right? Seems to be an Avi.

I do determine the my max bitrate of CQ by feeling. But you also can try Kwags advice to take a 20sec sample of the highest "bright" action scene of your movie, encoding it at CQ 90. Open the Sample using BitrateViewer and watch the Birate peak, there you can see how much max. bitrate is really needed and thats the value u set at max Bitrate in CQ Mode. Afterwards do your prediction.
The movie in my samples used a max bitrate of 1800kbit and every scene was fine.

As I see in your script you used ONLY STmedian's spatial settings.
Try also to add a ...

TemporalSoften(1,3,5,3,2) # if source gots less noise or
TemporalSoften(2,5,8,5,2) # if source contains more noise

... after StMedianfilter

And although you got that bad quality the side borders of your encode are too big! Maybe they fit the overscan of your Tv but mine would show some parts of the borders you can see in your sample.

or use a MA script including Deen for spatial noisefiltering instead of StMedian:

Code:

#####################################
nf = 0
Mpeg2Source("Your_D2V_Source_Here")
#
undot()
Limiter()
# asharp(1, 4) # only on good noiseless sources, activating this on bad sources the noise will be boosted even more
GripCrop(Your_GripCrop_Parameters_Here)
GripSize(resizer="BicubicResize")
deen("a2d",2,10,15) # the last two values stand for luma and chroma threshold - you can finetune this
MergeChroma(blur(1.50))
MergeLuma(blur(0.1))
#
######################################
#
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) ")
#
######################################
#
GripBorders()
LetterBox(16,16,16,16) # 16px are macroblock based and enough
Limiter()
#
######################################
#
## Functions ###
function fmin( int f1, int f2) {
return ( f1<f2 ) ? f1 : f2
}
#
######################################


CheronAph 10-21-2003 03:41 AM

The source is an original dvd, bit noisy though!
64 ~ 3000 means min and max bitrate, as it is a horror movie, itŽs pretty dark with no high action scenes!

incredible 10-21-2003 04:37 AM

If its dark and doesn't contain high action,
set the min to 270 (or 300) and the max to 1800 (as I do assume) .... use the MA-Deen Script as shown above ... and try to encode at "motion est prec." High (slow).
Do your "prediction only" using CQ matic, rename the suffix of CQmatic's Testfile to .m1v, open it into Vdub ... and tell me how does it look and what CQ value did come out of your prediction.

CheronAph 10-21-2003 05:06 AM

I did with temporalsoft, 704x576 min 300 max 1800 CQ 54 and it came out like this, http://www.digitalfaq.com/archives/error.gif
480x576 doesnŽt even work on my standalone, 544x576 does!

incredible 10-21-2003 06:14 AM

Quote:

Originally Posted by CheronAph
I did with temporalsoft, 704x576 min 300 max 1800 CQ 54 and it came out like this,
480x576 doesnŽt even work on my standalone, 544x576 does!

You can see by lowerng the bitrate value even at 704x576 it won't hurt the quality (in this scene!) and still a CQ of 54 comes out.

BUT ???
I don't know what you're doing cause I thought we're talking about an encoded 480x576 Image and now you send an encoded 704x576. And if I understand you right, you treated it by using Temp.Soften only??

If 480x576 using mpeg1 won't work on your standalone give mpeg2 @ 480x576 a try! There are some players with problems playing back 480x576 @ mpeg1. Second: 544x576??? I thought 528x576 would be the next higher size for KVCD?

So first .... post exactly the same pic/frame and maybe one from another scene of your source UNFILTERED!!
Using this script and nothing else, no encoding, just oben this .avs in Vdub and do a screenshot .... so I can see in which condition is the untreated original!:

Code:

######## Just previewing the movie letterboxed ########

Mpeg2Source("D:\DVDtoKVCD\vts_01.d2v")
GripCrop(720, 576) 
GripSize(resizer="BicubicResize") 
GripBorders()

#########################################


CheronAph 10-21-2003 11:00 AM

528x576 doesnŽt work either, I think IŽve already tried them with mpeg2!
IŽll post the pics later!

CheronAph 10-21-2003 11:14 AM

Not exatly the same but here are 2 pics,
http://www.digitalfaq.com/archives/error.gif
http://www.digitalfaq.com/archives/error.gif

incredible 10-21-2003 11:25 AM

Oh I see, I forgot the "source_anamorphic= false" argument ;-) , but no matter.
Did you try the MA script including Deen I posted above?

CheronAph 10-21-2003 11:41 AM

Not yet, IŽll try it a little later tonight!

CheronAph 10-21-2003 12:04 PM

704x576, the deen script, CQ 56,894,
http://www.digitalfaq.com/archives/error.gif

incredible 10-21-2003 12:22 PM

CheronAph, I think this is getting a bit confused cause it seems that you do a prediction of a 704x576 stream to fit on ONE CDr80. My stream was encoded by using 480x576 and this means a big difference in CQ value and Quality when doing a prediction refering to one CD-R80!
Shure you received less CQ like in your last prediction, at least try to encode at 544x576 which are accepted by your player OR try 480x576 / mpeg2.
If you still want to encode your movie at 704x576 so encode it using two disks so it will bring you a higher CQ and quality.

And I see rendalunit is right that this Thread is going out of subject "anime".
Cause the comparisons will go further. Ok I started this by posting my images but I recommend that you open a new thread in the "KVCD Success/Failure" topic so we can use that new/right to come to a solution. I think thats a good Idea.
ok? :wink:

CheronAph 10-21-2003 12:32 PM

I was just trying to compare the scripts, after all, my movie 90 mins shorter.
IŽll make a sample with 544x576 and open a new thread!


All times are GMT -5. The time now is 03:54 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.