Quantcast Avisynth: Optimal Script Now Fully Adaptive - digitalFAQ.com Forums [Archives]
  #1  
06-28-2003, 04:34 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
@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
This should buy us even higher CQ values

-kwag
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
06-28-2003, 05:15 PM
audioslave audioslave is offline
Free Member
 
Join Date: Mar 2003
Location: Sweden
Posts: 725
Thanks: 0
Thanked 0 Times in 0 Posts
@kwag,

That's fantastic ! I'll try it out right away!
__________________
AudioSlave
Reply With Quote
  #3  
06-28-2003, 05:32 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #4  
06-28-2003, 05:45 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
@ 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
-vhelp
Reply With Quote
  #5  
06-28-2003, 06:11 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
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

-kwag
Reply With Quote
  #6  
06-28-2003, 06:15 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
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

-kwag
Reply With Quote
  #7  
06-28-2003, 06:29 PM
audi2honda audi2honda is offline
Free Member
 
Join Date: Jun 2003
Location: Orange County, CA
Posts: 291
Thanks: 0
Thanked 0 Times in 0 Posts
Great kwag awesome job. I just hope prediction isn't off again.
Reply With Quote
  #8  
06-28-2003, 06:57 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by audi2honda
Great kwag awesome job. I just hope prediction isn't off again.
It's not, I tried it
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
Reply With Quote
  #9  
06-28-2003, 06:58 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #10  
06-28-2003, 07:08 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
@ 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 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
Reply With Quote
  #11  
06-28-2003, 07:42 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
@ 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
Reply With Quote
  #12  
06-28-2003, 07:49 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
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

-kwag
Reply With Quote
  #13  
06-28-2003, 08:07 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
@ Kwag..

Your script must be working, cause my test encode of "Ice Age" is really
slowing up my system 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!!
Reply With Quote
  #14  
06-28-2003, 09:17 PM
J-Wo J-Wo is offline
Free Member
 
Join Date: Nov 2002
Location: Toronto, Canada
Posts: 454
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #15  
06-28-2003, 09:23 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #16  
06-28-2003, 09:37 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
@ 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
Reply With Quote
  #17  
06-28-2003, 09:47 PM
J-Wo J-Wo is offline
Free Member
 
Join Date: Nov 2002
Location: Toronto, Canada
Posts: 454
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Reply With Quote
  #18  
06-28-2003, 09:55 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
@ 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
Reply With Quote
  #19  
06-28-2003, 10:18 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
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
Reply With Quote
  #20  
06-28-2003, 10:27 PM
ovg64 ovg64 is offline
Free Member
 
Join Date: Jan 2003
Location: Puerto Rico
Posts: 423
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ovg64
Being that you use a different gop for cartoons, what kind of GOP do you use for a movie like Space Jam
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth: MaskTools based adaptive script? marcellus Avisynth Scripting 3 04-21-2004 01:00 PM
Avisynth: Difference between MA script and optimal script? mistermickster Avisynth Scripting 2 08-01-2003 09:36 AM
Avisynth: Next changes to optimal script. kwag Avisynth Scripting 21 06-27-2003 12:31 PM
Avisynth: add subtitles with the new adaptive script? audioslave Avisynth Scripting 13 06-18-2003 12:26 PM
Avisynth: AVS 2.5x Script, Motion Adaptive Filtering problems? Bchteam Avisynth Scripting 15 05-31-2003 12:38 PM

Thread Tools



 
All times are GMT -5. The time now is 11:47 PM  —  vBulletin Jelsoft Enterprises Ltd