digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Optimal Script? (http://www.digitalfaq.com/archives/avisynth/13092-avisynth-optimal-script.html)

Shibblet 12-27-2004 12:41 PM

Avisynth: Optimal Script?
 
I've been playing "search" and I keep seeing talk about an Optimal Script... well, I can't find it anywhere? Anyone know where it can be found?

rds_correia 12-27-2004 12:43 PM

You can find it here :arrow: http://www.kvcd.net/forum/viewtopic.php?t=3483

Shibblet 12-27-2004 05:00 PM

Thanks!

Shibblet 12-28-2004 07:07 PM

Optimal Script give me a lot of flicker.
 
I tried it on 3 different movies, and I get a lot of flicker in the solid colored areas in the background. Is this normal?

kwag 12-28-2004 07:17 PM

Hi Shibblet,

No, that's not normal.
Maybe it's a color space issue :?:
Are you using the latest version of AviSynth :?:

-kwag

Dialhot 12-28-2004 07:30 PM

1/ What is your source type ?
2/ Check that you are using K-Notch Matrix.
2bis/ What is your encoder ?

Shibblet 12-29-2004 04:54 PM

Using TMPEG Ver. 2.524.63.181
AviSynth 2.5.5

Source is DVD - Forced Film / Progressive - No interlaced frames

My CQ Was up around 82...
Any Ideas?

rds_correia 12-29-2004 05:03 PM

You're not using directshow filters to read your script are you?
That is, you did install ReadAVS.dll on your system so Tmpg can read *.avs scripts, right?
Otherwise it's a jungle out there when it comes to directshow filters...
Cheers

Shibblet 12-29-2004 07:29 PM

8O Holy underwear stains Batman! 8O I've never used ReadAVS.dll in my life. I am going to have to go and get that one.

Any of the DirectDraw / DirectSound / DirectShow drivers seem to be quite a problem in just about any app.

Thanks, I'll give that one a try.

rds_correia 12-30-2004 02:41 AM

Then go ahead and download it from http://www.avisynth.org/warpenterprises/.
Unzip it.
Read the readme.txt.
Just copy the ReadAVS.dll and ReadAVS.reg to your Tmpgenc's directory.
Open the ReadAVS.reg with notepad.
Change it's last line to the Drive letter and full path (using double backslashes) of Tmpgenc's directory.
Save and close the *.reg file.
Double click on the *.reg file and answer yes when prompted to merge that information into your registry file.
Close and restart Tmpgenc, if running.
Open Tmpgenc's "Option>Environmental settings..." menu.
Open the "VFAPI plug-in" tab.
Check that the item "ReadAVS.dll" does not read something like "the file cannot be loaded.".
When configured properly it should read "Avisynth/VirtualDub script reader v0.1".
And last you can untick all options in that window besides "ReadAVS.dll" and "TMPGEnc.vfp" since most probably you won't need them.
Close and restart Tmpgenc, again so it saves the options.
Load your Avisynth script with TMPGEnc and happy encodings ;-)
Am I missing something here, guys :?:
Cheers

Shibblet 12-31-2004 08:35 PM

Well, the flickering seems to be block noise. So it might be the compression, however, 70+ CQ is normally not an issue...

The ReadAVS.dll didn't seem to make that big of difference. And I am sure that I am using ReadAVS.dll instead of DirectShow.

Any other ideas?

kwag 12-31-2004 08:58 PM

Quote:

Originally Posted by Shibblet
And I am sure that I am using ReadAVS.dll instead of DirectShow.

Sure about that :?:
Did you "Uncheck" " :arrow: Directshow Multimedia Reader" in TMPEG :?:

-kwag

Shibblet 01-01-2005 05:36 AM

Positive about that one. The only things checked are

ReadAVS
DVD2AVI Project File Reader
TMPEG Project File Reader

Now, when I use the optimal script, and downsample to 352x240, I have noticed that every frame just before a scene change is incredibly blurry. Just one frame, that's weird. But it's just before every scene change. Maybe that will help with my problem.

Dialhot 01-01-2005 08:49 AM

Quote:

Originally Posted by Shibblet
Just one frame, that's weird. But it's just before every scene change.

This is the normal behaviour of the... very old MA script ! It was enhanced to reduce the phenomena. So either you use a very old MA script, either your eyes are eagle sharp :-)

Nevertheless, I do not use ever the MA script because of that blurry "thing".

Shibblet 01-01-2005 10:05 PM

The script that I am using is the one from RDS's link. It's the one from the top of the forum. Is this the script that everyone is using? And if so, does anyone know what causes the flicker and blurred frames before scene changes?

Now that I've had plenty of testing, seems to me that this version of TMPEG almost twice as fast as it used to be.

rds_correia 01-02-2005 06:30 AM

Hey Shibblet :),
Don't use the 1st one.
That one is for old Avisynth 2.0.x.
Since I bet you're using Avisynth 2.5.5, use the 2nd one from that list.
And if you're not using Avisynth 2.5.5 yet, please upgrade ASAP :D.
Though, I'm not sure the blurrying has anything to do with the Avisynth release you're using and the script you're using.
Cheers

Shibblet 01-02-2005 04:23 PM

Right, I am using the one for AviSynth 2.5x and I still get that problem. I did make some minor alterations. I took out the Grip-sizing. Here, I'll post it.

Code:

LoadPlugin("D:\Video\MovieStacker\Filters\MPEG2Dec3.dll") 
LoadPlugin("D:\Video\MovieStacker\Filters\STMedianFilter.dll")
LoadPlugin("D:\Video\MovieStacker\Filters\asharp.dll")
LoadPlugin("D:\Video\MovieStacker\Filters\unfilter.dll")
LoadPlugin("D:\Video\MovieStacker\Filters\undot.dll")

Mpeg2Source("D:\Video\Rips\My Movie.d2v")
 
undot()
asharp(1, 4)
BicubicResize(448, 256, 0, 0.6, 2, 59, 716, 358)
AddBorders(16, 112, 16, 112)
STMedianFilter(3, 3, 1, 1 )
MergeChroma(blur(1.5))
MergeLuma(blur(0.1))

ScriptClip("nf = YDifferenceToNext()" + chr(13) + "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) ")

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

I prefer to do Bicubic resizing and make my black borders evenly divisible by 8. I kept the Linear Motion Adaptive Filtering, and that seems to be the problem with the blurry frames, and sometimes the flickering.
Any suggestions?

Dialhot 01-02-2005 05:08 PM

Of course the problem is in the MA part : that is the way the filtering is done (blurring a lot when the pictures change a lot, so at a scene change, that is a mess). That's what I told you already. And there is no solution except to stop using it, as I do (and as I once mentioned).

kwag 01-02-2005 06:04 PM

Time for me to fix that :!:
I'll get on it after I finish some CQMatic stuff ;)

-kwag

Icarus3000 01-03-2005 10:06 PM

Dialhot:

Can you post a link to the thread that discusses YOUR latest optimal script?

rds_correia 01-04-2005 01:42 AM

Quote:

Originally Posted by Icarus3000
Dialhot:

Can you post a link to the thread that discusses YOUR latest optimal script?

Grab it here Icarus :) http://www.kvcd.net/forum/viewtopic.php?t=14790

I edited your post rui because Icarus asked for my script for one movie DVD, not for AVI->KVCD
Phil

incredible 01-04-2005 03:08 AM

Quote:

Originally Posted by kwag
Time for me to fix that :!:
I'll get on it after I finish some CQMatic stuff ;)

-kwag

Karl, once I did generate a script which recognises Scenechanges (exclusive fast motions for shure ;) ) and the Framenumbers where written into a text file using the filewriter command in avisynth.

The logic for detecting a REAL SC was to calculate the average between ydifferencetonext() and ydifferencefromprevious() .... that works.
Ill send you the script this week. :)

kwag 01-04-2005 09:00 AM

Ok thanks Andrej :)

-kwag

Shibblet 01-04-2005 02:50 PM

So, DialHot, I checked out the link to your script.

The script you have is pretty much just RemoveGrain, Temporal Soften, and Deen.

Do you prefer to not use the Linear Adaptive Motion Filtering?

Dialhot 01-04-2005 04:06 PM

Yes it is. That is exactly what I told you twice yet :-)

At least I can't stand the fuzzy effect introduced by the current script. Trust me or not but I can distinguish it after half a second of camera movement. That is a lot too boring to be watched.

kwag 01-04-2005 04:32 PM

Quote:

Originally Posted by Dialhot
At least I can't stand the fuzzy effect introduced by the current script.

Then why don't you change the values, so the blurring treshold happens only after a very high movement :?:
The way it's set now, it does start to take effect on medium action.
So it's just a matter of changing it to kick in at a higher activity point.

-kwag

Dialhot 01-04-2005 04:57 PM

Quote:

Originally Posted by kwag
Then why don't you change the values, so the blurring treshold happens only after a very high movement :?:

Because the values that pleased my eyes didn't please the 800 MB I had on a KVCD :-). I'd try again now as I do at most 3-movie DVD and that gives twice the space for each movie. I'll give this a chance next time I encode a movie.

Shibblet 01-05-2005 02:17 AM

I can see the fuzzy effect too, however, I am constantly having issues with RemoveGrainS.

This is the only one that I can actually use. I am running an Athlon XP, so the SSE version, and the RemoveGrain version will not actually function.

The problems with RemoveGrainS add to the linear motion issue badly, and seem to cause one toned skin and background areas (kind of like an old lady wearing too much makeup, ie. Cher)

I have been adjusting the values, but I thought you told me once before that UnDot will do the same thing.

Dialhot 01-05-2005 03:19 AM

Quote:

Originally Posted by Shibblet
I have been adjusting the values, but I thought you told me once before that UnDot will do the same thing.

Undot is equivalent to (D)RemoveGrain(mode=1). But I do not know RemoveGrainS.

Boulder 01-05-2005 03:57 AM

RemoveGrainS is the version which includes one dll that is required to use the filter. The function is exactly the same as DRemoveGrain/RemoveGrain. DRemoveGrain uses SSE2 instructions and RemoveGrain iSSE which means it's usable with Athlon XP.


All times are GMT -5. The time now is 01:33 PM  —  vBulletin © Jelsoft Enterprises Ltd

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