digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Optimal script now fully adaptive (http://www.digitalfaq.com/archives/avisynth/4230-avisynth-optimal-script.html)

kwag 06-28-2003 04:34 PM

Avisynth: Optimal script now fully adaptive
 
@All,

Here it is for you to try it before I post it on the optimal script section :)

Code:

ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf > 2.5 ? \
unfilter( -(fmin(round((nf/0.5)), 100)), -(fmin(round((nf/0.5)), 100)) ) : \
TemporalSoften(4, round(2.5/nf)*3 , round(2.5/nf)*3 , 15, 2) ")

The original script would blur as action increases after a treshold, but the TemporalSoften had static values. So now this change makes the TemporalSoften function to operate at very high values on minimal movement, and as movement starts to increase, it decrease the values linearly. So now we have full linearity on both functions :D
This should buy us even higher CQ values ;)

-kwag

audioslave 06-28-2003 05:15 PM

@kwag,

That's fantastic :D ! I'll try it out right away!

vhelp 06-28-2003 05:32 PM

hi Kwag.. :)

Great work on everything here..

Question...

* Have you tested this latest "code fragment" out on Animation ie, like
movies such as "Shrek" or "Ice Age" (<-- you have?? )

Unfortunately, I don't have any Animation movies like these on DVD, but
shortly, I'm going out and make a purchase on "Ice Age" - spooze to be
a good movie.. and looks good when I pass it by while playing on a 42"
wideScreem. Anyways..

I'm testing your latest "snipplet" out on the lostest, vcd4ever's posted
file (hope he doesn't mind) until I get an actual DVD shortly (above)

Oops.. just heard TMPG's ding. let me see how it looks and filesize. I'll get
back ta you shortly. But, this is not the best test I have.

Thanks for any input.
-vhelp

vhelp 06-28-2003 05:45 PM

@ all..

Ok, just finished prepping my sample test file.

* Unfortunatly, I got some color washout cause of the re-encode and the
...added ConvertToYV12 conversion that the MA script requires, else
...I'd get the YV12 error (per vdub) ***
...But, this is not due to the MA script, just the conversion to YV12 :!:

* Still need to "nail" that bug when BfDfAf.. in any case, it still works
...great, and you don't notice this issue anyways when you play it.. just
...that it would be nice to "nail" it once and for all. But I like :)

* final size: I saved an extra 600kb !! on a 26 second test clip

*** we gotta try and put our heads together and find ONLY the YV12 filters
to use in our MA scripting or what-have-you, and "pefect" them and scripts.
These color conversions are killing our encodes (at least mine)

Well, I'm off to the store for "Ice Age".. see you in a bit.

So, good work - - success thus far :wink:
-vhelp

kwag 06-28-2003 06:11 PM

Quote:

Originally Posted by vhelp
Question...

* Have you tested this latest "code fragment" out on Animation ie, like
movies such as "Shrek" or "Ice Age" (<-- you have?? )

No, I'm trying it out on a same movie (K-Pax) for consistency checks. The stills and almost still scenes look even better now :mrgreen:

-kwag

kwag 06-28-2003 06:15 PM

Quote:

Originally Posted by vhelp

* Unfortunatly, I got some color washout cause of the re-encode and the
...added ConvertToYV12 conversion that the MA script requires, else
...I'd get the YV12 error (per vdub) ***

You definitely have a CODEC problem :!:
I don't have to use ConvertToYV12() with the current MA script :!:

Let us know how your "Ice Age" encode comes out 8)

-kwag

audi2honda 06-28-2003 06:29 PM

Great kwag awesome job. I just hope prediction isn't off again.

kwag 06-28-2003 06:57 PM

Quote:

Originally Posted by audi2honda
Great kwag awesome job. I just hope prediction isn't off again.

It's not, I tried it :mrgreen:
However, and I warn you :!:, there are some small discrepancies between using the fast prediction and the normal prediction. I'm settling for the normal (longer) prediction, because it's much more accurate.

-kwag

vhelp 06-28-2003 06:58 PM

hi Kwag pal..

I'm back. poowy.. I walked in looking for one Movie, and here's what I
walked out with:

* Ice Age (yeah)
* Monsters, Inc. (another yeah, cause it's a great movie)
* Toy Story (came w/ BOTH movies, price cut)

So, I guess I walked out w/ 4 DVD titles, sheesh!!

Quote:

Let us know how your "Ice Age" encode comes out
You bet!!

Hay, funny short story.. K? .. .. ..
--- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
I was at the counter, with my back turned, watching the TV (Dune was
playing at the time)...
And, this cute Spanish cashier was checking me out while I wasn't looking or
noticing. So she thought hehe.. She didn't know that I could see her eyeing
my BUTT while the TV screen was reflecting the darker scenes hehe..
I played a nasty joke, and quickly turned around "..ain't that a great movie??"
she was stunned!! Busted!! hehe.. but I was nice enough, and played it off
like I didn't know.. "cought in the cookee-jar" hehe..
--- --- --- --- --- --- --- --- --- --- --- --- --- --- ---

Take it easy.
-vhelp

vhelp 06-28-2003 07:08 PM

@ Kwag..

Quote:

No, I'm trying it out on a same movie (K-Pax) for consistency checks. The stills and almost still scenes look even better now
Yes, Yes, I agree. Good show.

I can't wait to mess around even more now.

But, Kwag.. I'm still haing problems w/ setting the resolution to
704x480. I need this res set in TMPGnec.. NOT in my scripts!! It's my personal
opinion that I have "better" cuts and accurate (AR and tighter compression)
when I go for the 704x480 and 16:9 encodes for MPEG-2. I'm trying even
for MPEG-1 (even though 16:9 arent supported) but for some reason, even
so, I ToK keeps re-writing an NEW video.tpr file. I noticed this because it
always as the same date 8O What the heck am I doing wrong ??

* Is there a way to change this, so that I can have TMPG set my final resolution
...to 704x480 (or any other resolution) ??
Or.... ....
* Do I have to resort to trickery (prob. won't work anyways, and might end
...up requiring "manual" process instead of ToK) Hmmm... that would mean
...I would have to come up w/ a NEW app (of my creation) to pretty much
...do basically the same thing that ToK does.. hmm...

Looking forward to your (or anyone elses) assistance on the issue, cause I
really need it !!

So, what-da-ya think about my problems.. can help me ??

Well, Spaggetti is for dinner hehe.. My favorite for Weenend meals, w/ a nice
Coca-Cola and some burps)
-vhelp

vhelp 06-28-2003 07:42 PM

@ all..

YV12 issues...
Here's what I've got, in hopes of fixing my ealier color washout experience.

The following two lines are producing errors:

* TemporalSoften(2,7,7,3,2) - - - give me an "YUV" error message
* unfilter(1,100) - - - - - - - - - - - give me an "YV12" error message

Please forget about the values I used inside the filters. I just needed them
to work and produce the error messages.

Below is some code showing How I'm arriving at the color washout ??
Code:

x="d:\01.vdr"

## v2.52 DLL Filters go here ##
 
 txt_dir252="c:\dlls252\"

 LoadPlugin(txt_dir252+"MPEG2Dec3.dll")
 LoadPlugin(txt_dir252+"decomb.dll")
 LoadPlugin(txt_dir252+"STMedianFilter.dll")
 LoadPlugin(txt_dir252+"asharp.dll")
 LoadPlugin(txt_dir252+"UnDot.dll")
 LoadPlugin(txt_dir252+"GripFit_YV12.dll")
 LoadPlugin(txt_dir252+"atc.dll")
 LoadPlugin(txt_dir252+"UnFilter.dll")

 ## Older DLL Filters go here ##
 txt_dir25x="c:\dlls\"

 LoadPlugin("d:\LoadPluginEx.dll")
 ## LoadPlugin(txt_dir25x+"mpeg2dec.dll")  ## -- only use sparingly
 LoadPlugin(txt_dir25x+"DustV5.dll")
 LoadPlugin(txt_dir25x+"FluxSmooth.dll")

 segmentedAVISource(x)

## Mpeg2Source("h:\dogma.rgb.1.d2v")

I don't see any temporalSoften() .DLL's anywheres.

Thanks a bunch all.
-vhelp

kwag 06-28-2003 07:49 PM

Quote:

Originally Posted by vhelp

I don't see any temporalSoften() .DLL's anywheres.

TemporalSoften is built in AviSynth 2.52. Could your problem be that you are using an older version of MPEG2DEC3.dll :idea:

-kwag

vhelp 06-28-2003 08:07 PM

@ Kwag..

Your script must be working, cause my test encode of "Ice Age" is really
slowing up my system 8O on this DVD. I must be doing something wrong.
There's a pause in every keystroke I make... Most be something else..

Anyways.. as far as MPEG3Dec.DLL .. .. ..

Here is my current specs:
* Size: 100KB (102,400 bytes), 114,688 bytes uses
* Dated: Sun, Janury 15, 2003 - 5:46:20 PM

-vhelp
PS: The movie is GREAT!! Go get it!! Hurry!!

J-Wo 06-28-2003 09:17 PM

Kwag it looks like you might be right, I think the faster prediction leads to sligggghtly higher CQs than full prediction, at least in the case of one test. However the latest change in your script seems to be really slowing down my encodes! And by a good 50% even! Can you confirm this? I'm not certain if it's worth the speed decrease if I don't see any big visual difference, cause the way things were my encodes looked pretty damn good.

kwag 06-28-2003 09:23 PM

Quote:

Originally Posted by J-Wo
However the latest change in your script seems to be really slowing down my encodes! And by a good 50% even! Can you confirm this?

Not at all :!:
At least on my P4 @1.6Ghz, encoding speed is almost identical.
I'm almost finished with K-Pax right now ( 89% done ), and the total encoding time will be about the same as my prior encode. ~5 hours, 30 minutes.

-kwag

vhelp 06-28-2003 09:37 PM

@ Kwag.. and J-Wo..

hmm... interesting.. Maybe it as something to do w/ the type of Movie it
is. At least I'm not the only one experiencing this "slow up".

But, I think that if this latest MA script (snipplet part) is as good as it gets,
then it may be worth it after all. I mean, how many of you are actally
Ripping a DVD and encoding them every single day ?? I might do a few
a week or none at all.. just depends.. but once is usually enought unless
you find an NEW encoding technique that changes everthing (quality)

Well, that's my two cents worth, but J-Wo is right, it's deffinately slowing
down the encoding time (and my keyboard) Anyways..

My "Ice Age" encoding is going great. That is, the test clips I've ben doing
so far. I'm currently testing a few things out. Kwag I remember
you saying something about changing the GOP to 12. Now, I don't know
where in the line are you suppose to, so, below is what I have:
Code:

  Number of I picture in GOP:      [1    ]
  Number of P picture in GOP:      [24    ]
  Number of B picture in GOP:      [1    ]

  Output interval of seq. header:  [1    ]
  MAX number of frames in a GOP:  [24    ]

I also found an issue w/ some artifacts using the above GOP setting.
I noticed that the color will bleed on some STILL shots. When I changed
the MAX (last GOP setting above) it went away.

Can anyone explain this "bleeding" thing ta me ??

Other than that, the Movie "Ice Age" is fantastic !!

Thanks for any response.
-vhelp

J-Wo 06-28-2003 09:47 PM

ya I'm encoding the Dune miniseries, and each disc is about 1hr 30min long. On my Athlon XP 2500+ Barton, previous encodes would finish in about 2hrs, but with the latest change the encode is now taking 3hrs. I can see it chugging away too in the preview screen. I have it on preview with thinning, and before I'd see the picture change a steady, fast rate. But now I can see on some scenes it's fast but on others it slows down right away. I suspect it has to do with the "full linearity" aspect of MA.

vhelp 06-28-2003 09:55 PM

@ J-Wo..

Come to think of it..

THAT'S HOW IT'S SUPPOSE TA WORK !! :) :) !!

This is what I've ben trying to describe (mechanism'ly speaking) for a very
long time. And, it looks like Kwag finally got it !! And, it's working !!

So, the only thing left to do now, is fune-tune this "mechanism" for speed,
and the other issue I mentioned above.

@ Kwag..
Looks like you got it !!

@ anybody.. Hay, what about my GOP ??
-vhelp

kwag 06-28-2003 10:18 PM

Hi vhelp,

Ice Age is a computer generated movie. It's not like old cartoons or anime movies that have very sharp edges and contrast. For that movie, you use the same GOP that you would use with a regular movie.

-kwag

ovg64 06-28-2003 10:27 PM

Being that you use a different gop for cartoons, what kind of GOP do you use for a movie like Space Jam :twisted:


All times are GMT -5. The time now is 01:10 PM  —  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.