digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Trouble with MA-Script in PAL? (http://www.digitalfaq.com/archives/avisynth/4574-avisynth-trouble-ma.html)

Avalon 07-17-2003 08:06 AM

Avisynth: Trouble with MA-Script in PAL?
 
The MA-Part won´t work with PAL!!!! NEED HELP!!!

No fuction named 'chr' in line 41...

Source is a 16:9 PAL DVD-VOB:

Code:

## DLL Section ##
#
LoadPlugin("C:\Filters25\mpeg2dec3_25_dll_20030119\MPEG2Dec3.dll")
LoadPlugin("C:\Filters25\GripFit_YV12\GripFit_YV12.dll")
LoadPlugin("C:\Filters25\stmedianfilter_25_dll_20030122\Avisynth_2.5a_Version\STMedianFilter.dll")
LoadPlugin("C:\Filters25\asharp_25_dll_20030118\asharp.dll")
LoadPlugin("C:\Filters25\unfilter_25_dll_20030116\UnFilter_Avisynth_2.5_Alpha\UnFilter.dll")
LoadPlugin("C:\Filters25\undot_25_dll_20030118\UnDot.dll")
#
####

## Defined Variables and Constants ##
#
MaxTreshold = 1.50
nf =  0 # Current frame.
#
####

## Main section and static filters ###
#
Mpeg2Source("E:\dcd\test25\25dvd2avi.d2v")
#
undot()
Limiter()
asharp(1, 4)
GripCrop(352, 288, overscan=1)
GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(MaxTreshold))
MergeLuma(blur(0.1))
#
#

## Linear Motion Adaptive Filtering ##
#
# ( Portions from AviSynth's manual ) - This will apply temporalsoften to
# very static scenes, and apply variable blur on moving scenes.
# We also assign a variable - and this is why a line break is inserted:

SwitchThreshold = (Width<=352) ? 4 : (Width<=576) ? 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( Your_Values_Here ) # Depends on situation. Use MovieStacker!
Limiter()

#
#
## Functions ###


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

#
####

But i can open this script with 2.0.8.0...

Code:

#======================================================#
# -= AviSynth script by MovieStacker v2.0.0 (beta3) =- #
#======================================================#

LoadPlugin("C:\Programme\MovieStacker\Filters\MPEG2Dec.dll")
LoadPlugin("C:\Programme\MovieStacker\Filters\STMedianFilter.dll")
LoadPlugin("C:\Programme\MovieStacker\Filters\GripFit_preview.dll")
LoadPlugin("C:\Programme\MovieStacker\Filters\BlockBuster.dll")
LoadPlugin("C:\Programme\MovieStacker\Filters\UnFilter.dll")
LoadPlugin("C:\Programme\MovieStacker\Filters\LegalClip.dll")

Mpeg2Source("E:\dcd\test25\25dvd2avi.d2v")
LegalClip()
GripCrop(352, 288)
GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0, 8, 32)
UnFilter(50, 50)
TemporalSmoother(1, 1)
MergeChroma(blur(1.5))
MergeLuma(blur(0.2))
BlockBuster(method="noise", detail_max=7, seed=1)
GripBorders()
LegalClip()

What is wrong?

Avalon 07-17-2003 08:48 AM

In this way i can open it...
 
Quote:

## DLL Section ##
#
LoadPlugin("C:\Filters25\mpeg2dec3_25_dll_20030119 \MPEG2Dec3.dll")
LoadPlugin("C:\Filters25\GripFit_YV12\GripFit_YV12 .dll")
LoadPlugin("C:\Filters25\stmedianfilter_25_dll_200 30122\Avisynth_2.5a_Version\STMedianFilter.dll")
LoadPlugin("C:\Filters25\asharp_25_dll_20030118\as harp.dll")
LoadPlugin("C:\Filters25\unfilter_25_dll_20030116\ UnFilter_Avisynth_2.5_Alpha\UnFilter.dll")
LoadPlugin("C:\Filters25\undot_25_dll_20030118\UnD ot.dll")
#
####

## Defined Variables and Constants ##
#
MaxTreshold = 1.50
nf = 0 # Current frame.
#
####

## Main section and static filters ###
#
Mpeg2Source("E:\dcd\test25\25dvd2avi.d2v")
#
undot()
Limiter()
asharp(1, 4)
GripCrop(352, 288, overscan=1)
GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(MaxTreshold))
MergeLuma(blur(0.1))
#
#

## Linear Motion Adaptive Filtering ##
#
# ( Portions from AviSynth's manual ) - This will apply temporalsoften to
# very static scenes, and apply variable blur on moving scenes.
# We also assign a variable - and this is why a line break is inserted:

#SwitchThreshold = (Width<=352) ? 4 : (Width<=576) ? 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( Your_Values_Here ) # Depends on situation. Use MovieStacker!
Limiter()

#
#
## Functions ###

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

#
####
So the MA-part is gone!!!! Need Help for PAL!!!!

audioslave 07-17-2003 09:35 AM

That's wierd! 8O I haven't had any problems with encoding PAL movies. Let's hope someone else can help you.

Avalon 07-17-2003 09:47 AM

This won´t work...

Quote:

## Linear Motion Adaptive Filtering ##
#
# ( Portions from AviSynth's manual ) - This will apply temporalsoften to
# very static scenes, and apply variable blur on moving scenes.
# We also assign a variable - and this is why a line break is inserted:

SwitchThreshold = (Width<=528) ? 4 : (Width<=576) ? 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) ")

## older version, replaced by above 06.28.03
# 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) ")
Post one of Your last script and I try it!!!!

Dialhot 07-17-2003 09:52 AM

The problem is not related to PAL or NTSC, you have a problem in the syntax of the script !

chr is an internal function of avisynth so it's strange it answers you it doesn't know it.

I used this script everyday in PAL and it's ok.

Do you have avs2.52 ?

Avalon 07-17-2003 09:58 AM

Thats the error message of VD:

http://www.digitalfaq.com/archives/error.gif

kwag can U help me, or somebody else?

Code:

## DLL Section ##
#
LoadPlugin("C:\Filters25\mpeg2dec3_25_dll_20030119\MPEG2Dec3.dll")
LoadPlugin("C:\Filters25\GripFit_YV12\GripFit_YV12.dll")
LoadPlugin("C:\Filters25\stmedianfilter_25_dll_20030122\Avisynth_2.5a_Version\STMedianFilter.dll")
LoadPlugin("C:\Filters25\asharp_25_dll_20030118\asharp.dll")
LoadPlugin("C:\Filters25\unfilter_25_dll_20030116\UnFilter_Avisynth_2.5_Alpha\UnFilter.dll")
LoadPlugin("C:\Filters25\undot_25_dll_20030118\UnDot.dll")
LoadPlugin("C:\Filters25\decomb_25_dll_20030327\decomb406b7\Decomb.dll")
#
####

## Defined Variables and Constants ##
#
MaxTreshold = 1.50
nf =  0 # Current frame.
#
####

## Main section and static filters ###
#
Mpeg2Source("E:\dcd\test25\2.d2v")
#
FieldDeinterlace()
undot()
Limiter()
asharp(1, 4)
GripCrop(528, 576, overscan=1)
GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(MaxTreshold))
MergeLuma(blur(0.1))
#
#

## Linear Motion Adaptive Filtering ##
#
# ( Portions from AviSynth's manual ) - This will apply temporalsoften to
# very static scenes, and apply variable blur on moving scenes.
# We also assign a variable - and this is why a line break is inserted:

SwitchThreshold = (Width<=528) ? 4 : (Width<=576) ? 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) ")

## older version, replaced by above 06.28.03
        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) ")

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


#
#
#

GripBorders()
#LetterBox( Your_Values_Here ) # Depends on situation. Use MovieStacker!
Limiter()

#
#
## Functions ###

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

#
####


Dialhot 07-17-2003 10:09 AM

What do you think we are trying to do ? :x

Answer to my question : DO YOU HAVE AVS 2.52 :?:

By the way (it"s not the cause of your problem but) you modified the script in a bad way. You should have :

SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2

Avalon 07-17-2003 10:17 AM

YES I´ve 2.52!!!!! and I didn´t regonize your first post... sorry

http://www.digitalfaq.com/archives/error.gif

Code:

## DLL Section ##
#
LoadPlugin("C:\Filters25\mpeg2dec3_25_dll_20030119\MPEG2Dec3.dll")
LoadPlugin("C:\Filters25\GripFit_YV12\GripFit_YV12.dll")
LoadPlugin("C:\Filters25\stmedianfilter_25_dll_20030122\Avisynth_2.5a_Version\STMedianFilter.dll")
LoadPlugin("C:\Filters25\asharp_25_dll_20030118\asharp.dll")
LoadPlugin("C:\Filters25\unfilter_25_dll_20030116\UnFilter_Avisynth_2.5_Alpha\UnFilter.dll")
LoadPlugin("C:\Filters25\undot_25_dll_20030118\UnDot.dll")
LoadPlugin("C:\Filters25\decomb_25_dll_20030327\decomb406b7\Decomb.dll")
#
####

## Defined Variables and Constants ##
#
MaxTreshold = 1.50
nf =  0 # Current frame.
#
####

## Main section and static filters ###
#
Mpeg2Source("E:\dcd\test25\2.d2v")
#
FieldDeinterlace()
undot()
Limiter()
asharp(1, 4)
GripCrop(528, 576, overscan=1)
GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(MaxTreshold))
MergeLuma(blur(0.1))
#
#

## Linear Motion Adaptive Filtering ##
#
# ( Portions from AviSynth's manual ) - This will apply temporalsoften to
# very static scenes, and apply variable blur on moving scenes.
# We also assign a variable - and this is why a line break is inserted:

SwitchThreshold = (Width<=352) ? 4 : (Width<=576) ? 3 : 2
ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= 2 ? \
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( Your_Values_Here ) # Depends on situation. Use MovieStacker!
Limiter()

#
#
## Functions ###

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

#
####

Same error

Dialhot 07-17-2003 10:24 AM

Does TMPGEnc gives the same error if you open the script with it ?

Krassi 07-17-2003 10:25 AM

Seems to be an old Avisynth Version. Can you please make a text file with the following entry:
Code:

Version()
Open this avs-file in wmp and let us know the outpout 8) .

Avalon 07-17-2003 10:29 AM

Now it works!!! I reinstall AVISYNTH 2.5 and with this it works:

Code:

## DLL Section ##
#
LoadPlugin("C:\Filters25\mpeg2dec3_25_dll_20030119\MPEG2Dec3.dll")
LoadPlugin("C:\Filters25\GripFit_YV12\GripFit_YV12.dll")
LoadPlugin("C:\Filters25\stmedianfilter_25_dll_20030122\Avisynth_2.5a_Version\STMedianFilter.dll")
LoadPlugin("C:\Filters25\asharp_25_dll_20030118\asharp.dll")
LoadPlugin("C:\Filters25\unfilter_25_dll_20030116\UnFilter_Avisynth_2.5_Alpha\UnFilter.dll")
LoadPlugin("C:\Filters25\undot_25_dll_20030118\UnDot.dll")
LoadPlugin("C:\Filters25\decomb_25_dll_20030327\decomb406b7\Decomb.dll")
#
####

## Defined Variables and Constants ##
#
MaxTreshold = 1.50
nf =  0 # Current frame.
#
####

## Main section and static filters ###
#
Mpeg2Source("E:\dcd\test25\2.d2v")
#
FieldDeinterlace()
undot()
Limiter()
asharp(1, 4)
GripCrop(528, 576, overscan=1)
GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(MaxTreshold))
MergeLuma(blur(0.1))
#
#

## Linear Motion Adaptive Filtering ##
#
# ( Portions from AviSynth's manual ) - This will apply temporalsoften to
# very static scenes, and apply variable blur on moving scenes.
# We also assign a variable - and this is why a line break is inserted:

SwitchThreshold = (Width<=352) ? 4 : (Width<=576) ? 3 : 2
ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= 2 ? \
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( Your_Values_Here ) # Depends on situation. Use MovieStacker!
Limiter()

#
#
## Functions ###

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

#
####

BTW AviSynth 2.52, build: Jun 1 2003 [23:05:51]

It seems AviSynthSwitcher 0.1 by akabob created all this, because if i switch it will bie AviSynth 2.5.0

Dialhot 07-17-2003 10:42 AM

That should have be my next questrion : how do you switch from 2.08 to 2.52 :-))

Note : i edited my post where I suggest you to change the value of the formula giving SwitchThreshold because I did error in it the first time. Check again. You shouldhave :

SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2

jorel 07-17-2003 03:26 PM

excuse me all...

Avalon and all,
:)
download the new 17 july avisynth 252 here:

http://www.kvcd.net/forum/viewtopic.php?t=5009

:!:

Avalon 07-17-2003 04:23 PM

The program is called Avisynthswitcher 0.01 by akabob and u can find it at www.avisynth.org.

But it seems it creates AviSynth 2.0.7 (of 2.08 ) and 2.5.0.0 (of 2.5.2.0)

Maybe in the next version is this fixed

Avalon 07-17-2003 04:33 PM

My last Script for today:

Code:

######
###        AVISYNTH-Script (für Version 2.5.2) von Avalon
###                DCD 4.0
###        ScriptVersion 170703/2305/Normal
######
##
##          Es werden alle Filter geladen, aber nicht alle sind aktiviert. Um dies zu ändern
##          entfernt die # vor den jeweiligen Zeilen.
##
## DLL Sektion ##
#
LoadPlugin("C:\Filters25\mpeg2dec3_25_dll_20030119\MPEG2Dec3.dll")
LoadPlugin("C:\Filters25\GripFit_YV12\GripFit_YV12.dll")
LoadPlugin("C:\Filters25\stmedianfilter_25_dll_20030122\Avisynth_2.5a_Version\STMedianFilter.dll")
LoadPlugin("C:\Filters25\asharp_25_dll_20030118\asharp.dll")
LoadPlugin("C:\Filters25\unfilter_25_dll_20030116\UnFilter_Avisynth_2.5_Alpha\UnFilter.dll")
LoadPlugin("C:\Filters25\undot_25_dll_20030118\UnDot.dll")
LoadPlugin("C:\Filters25\decomb_25_dll_20030327\decomb406b7\Decomb.dll")
LoadPlugin("C:\Filters25\msmooth_25_dll_20030124\msmooth200b1\Msmooth.dll")
LoadPlugin("C:\Filters25\dctfilter_25_dll_20030221\DctFilter.dll")
LoadPlugin("C:\Filters25\blockbuster_25_dll_20030204\blockbuster.dll")
LoadPlugin("C:\Filters25\convolution3dyv12_25_dll_20030329\Convolution3DYV12.dll")
LoadPlugin("C:\Filters25\temporalcleaner_25_dll\TemporalCleaner.dll")
LoadPlugin("C:\Filters25\dup220b1/Dup.dll")
LoadPlugin("C:\Filters25\atc_25_dll_20030118\atc.dll")
LoadPlugin("C:\Filters25\AddGrain\AddGrain.dll")
LoadPlugin("C:\Filters25\deen_25_dll_20030119\Deen.dll")
#
####
##
##
## Definierte Variablen und Konstanten ##
#
MaxTreshold = 1.50
nf =  0 # Current frame.
#
####
#
##### Haupt Sektion und statische Filter ###
#
Mpeg2Source("e:\dcd\test25\testfinal.d2v")
#
undot()
Limiter()
asharp(1, 4)
#
#
#####Bei GripCrop die gewünschte Auflösung angeben.###
#
#
GripCrop(352, 288)
#
#Erlaubt sind folgende Auflösungen für PAL:
#352x288 (VCD); 352x576 (1/2 DVD); 480x576 (SVCD); 528x576 (2/3 DVD half); 544x576 (2/3 DVD full); 704x576 (DVD)
#Für NTSC sind es dann:
#352x240 (VCD); 352x480 (1/2 DVD); 480x480 (SVCD); 528x480 (2/3 DVD half); 544x480 (2/3 DVD full); 704x480 (DVD)
#
#
#
GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(MaxTreshold))
MergeLuma(blur(0.1))
#
##### Optionale Filter ###

#Deinterlancer braucht man, wenn das Bild doppelt kommt.###
#Kommt meist von NTSC-Filmen###
#
FieldDeinterlace()
#
#
#####TemporalCleaner glätten das Bild on the fly##
#
#TemporalCleaner (ythresh=5, cthresh=10)
#atc(3,6,9,0.5,false)
#
#
#####MSSmooth wird bei Animies empfohlen. Er entfernt das Rauschen###
#####bei den Köpfen z.B.##
#
#
#MSmooth(strength=1, highq=true, threshold=5)
#
#
#
#####Variablen strength kann man von 1-25 wählen; highq kann true oder false sein; threshold kann man##
#####von 0 - 255 einstellen;##
#
#
#DuPFilter kopiert nebeneinanderstehende gleiche Frames zu einem##
#Variablen: threshold von 0.0 - 100; chroma kann ture oder false sein; maxcopies von 1-20; blend##
#kann true oder false sein;
#
#
#Dup(threshold=5,copy=true,maxcopies=5,chroma=true)
#
#
#
#####Convolution3d fügt eine spezielle Matrix hinzu. Je nach Quelle kann man folgendes einstellen
#
#Convolution3d (preset="movieHQ") // Movie Hi Quality (gute DVD Quelle)
        #is an alias for Convolution3D (0, 3, 4, 3, 4, 2.8, 0)
#Convolution3d (preset="movieLQ") // Movie Low Quality (verrauschte DVD Quelle)
        #is an alias for Convolution3D (0, 6, 10, 6, 8, 2.8, 0)
#Convolution3d (preset="animeHQ") // Anime Hi Quality (gute DVD Quelle)
        #is an alias for Convolution3D (0, 6, 12, 6, 8, 2.8, 0)
#Convolution3d (preset="animeLQ") // Anime Low Quality (verrauschte DVD Quelle)
        #is an alias for Convolution3D (1, 8, 16, 8, 8, 2.8, 0)
#Convolution3d (preset="animeBQ") // Anime Bad Quality (???)
        #is an alias for Convolution3D (1, 12, 22, 8, 8, 2.8, 0)
#Convolution3d (preset="vhsBQ") // VHS capture Bad Quality (???)
        #is an alias for Convolution3D (0, 32, 128, 16, 64, 10, 0)
#
#
Convolution3D(preset="movieHQ")
#
#
#
####BlockBuster versucht die entstehenden Blöcke zu minimieren#

###Variante normal:##
#
#
BlockBuster(method="noise", detail_max=7, seed=1)
#
#
###Variante stark:##
#
#
#Blockbuster(method="noise", detail_min=15, detail_max=23, variance=1.3, seed=6)
#
#
####DCTFilter splittet Blöcke in noch kleinere###
#
#DctFilter(1,1,1,1,1,1,.5,0)
#
#deen("a3d",1,10,12)
#
####Extra Grain!!! Fügt Rauschen hinzu.##
AddGrain(6,0,0)
#
#
### Linear Motion Adaptive Filtering ##
#
# ( Portions from AviSynth's manual ) - This will apply temporalsoften to
# very static scenes, and apply variable blur on moving scenes.
# We also assign a variable - and this is why a line break is inserted:
#
#
#SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
#ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= 2 ? \
#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( Your_Values_Here ) # Depends on situation. Use MovieStacker!
Limiter()
#
#
#
##### Functions ###
#
function fmin( int f1, int f2) {
  return ( f1<f2 ) ? f1 : f2
}

#
########

I edit the Script

Dialhot 07-17-2003 04:36 PM

Much, much, much filters. TOO much !

atc + msmooth + temporalsoften = 3 temporal filters

convolution3d + deen("a3d") = 2 convolution filters

blockbuster(noise) + grain = 2 noizers

...


Note: and you still have an error in the formula of SwitchTreshold ! Look at the optimal script or look at my two other posts in the present thread.

jorel 07-17-2003 04:36 PM

Quote:

Originally Posted by Dialhot
That should have be my next questrion : how do you switch from 2.08 to 2.52 :-))

Phil my friend.
Avisynthswitcher!
this was posted here a long time ago in the avisynth forum :!:

use the "search"!
:lol: :lol: :lol:

Dialhot 07-17-2003 04:57 PM

Jorel, my friend : I knew the answer :-)

I just wanted to know if Avalon uses this crappy tool or switch by hand
(after all, all that the tool does is to copy avisynth.dll to c:\windows\system !)

The problem is, as Avalon just discovered here : the tool provides it's own versions of avisynth.dll so it has to be updated each time a new version of avs is produced :!:

Avalon 07-17-2003 05:52 PM

I`ll try again the optimal script...

kwag 07-17-2003 05:53 PM

Quote:

Originally Posted by Dialhot
Much, much, much filters. TOO much !

Yep, I agree too.
The basic rule is this: Use the minimum amount of filtering necessary to do the job. No more, no less.
I believe the current script already does that. A minimum of static filters to clean the source on every frame, followed by a dynamic temporal linear filter (TemporalSmoother) for slow action scenes and a dynamic blurring linear filter (unfilter) for fast action scenes. That's it :!: Anything else will start to spoil the picture quality. However, that doesn't mean that the current filters are the filters required. The idea is to use the script as a basic framework, and plug in different filters. So if a new temporal filter comes out, it's a matter of substituting the current temporalsmoother. Same for the blurring. If something else (better) comes out, then we substitute unfilter :)

-kwag

Avalon 07-17-2003 06:15 PM

Code:

######
###        AVISYNTH-Script (für Version 2.5.2) von Avalon
###                DCD 4.0
###        ScriptVersion 180703/0056/Normal
######
##
## DLL Sektion ##
#
LoadPlugin("C:\Filters25\mpeg2dec3_25_dll_20030119\MPEG2Dec3.dll")
LoadPlugin("C:\Filters25\GripFit_YV12\GripFit_YV12.dll")
LoadPlugin("C:\Filters25\stmedianfilter_25_dll_20030122\Avisynth_2.5a_Version\STMedianFilter.dll")
LoadPlugin("C:\Filters25\asharp_25_dll_20030118\asharp.dll")
LoadPlugin("C:\Filters25\unfilter_25_dll_20030116\UnFilter_Avisynth_2.5_Alpha\UnFilter.dll")
LoadPlugin("C:\Filters25\undot_25_dll_20030118\UnDot.dll")
LoadPlugin("C:\Filters25\decomb_25_dll_20030327\decomb406b7\Decomb.dll")
####
##
#
####

## Defined Variables and Constants ##
#
MaxTreshold = 1.50
nf =  0 # Current frame.
#
####

## Main section and static filters ###
#
Mpeg2Source("E:\dcd\test25\2.d2v")
#
FieldDeinterlace()
undot()
Limiter()
asharp(1, 4)
GripCrop(352, 288)
GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(MaxTreshold))
MergeLuma(blur(0.1))
#
#

## Linear Motion Adaptive Filtering ##
#
# ( Portions from AviSynth's manual ) - This will apply temporalsoften to
# very static scenes, and apply variable blur on moving scenes.
# We also assign a variable - and this is why a line break is inserted:

SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= 2 ? \
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( Your_Values_Here ) # Depends on situation. Use MovieStacker!
Limiter()

#
#
## Functions ###

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

#
####

Is this OK?

Avalon 07-17-2003 06:27 PM

I used the MA Script. I only add an Deinterlacer.

This was the Output. Original 352x288

http://www.digitalfaq.com/archives/error.gif

What can I do, to get the blocky picture smoother?[/IMG]

jorel 07-17-2003 06:40 PM

yes,
just like i post here many times ago and today,and i see more..
the skin color is too green(means less red) and see the white
in her eyes are yellow/green too!

see my last post trying to explain it...
Posted: Thu Jul 17, 2003 8:45 pm here:
http://www.kvcd.net/forum/viewtopic.php?t=4983&start=16


:!:

Dialhot 07-17-2003 06:46 PM

Quote:

Originally Posted by Avalon
What can I do, to get the blocky picture smoother?[/IMG]

Raise the CQ :idea:

jorel 07-17-2003 06:52 PM

i'm back to answers Phil!

if with 480x480 in 83 minutes movie i got blocky and
"everybody" with more resolution(544x or 702x)with more than 83 minutes
:arrow: don't got blocks... :?
the script is the same used for all...
if i "Raise the CQ" the final file size will encrease,of course and i say
bye,bye to one cdr 700mb.
:lol:
what i do?
:? :?

Avalon 07-17-2003 07:01 PM

If I use this script:

Code:

#======================================================#
# -= AviSynth script by MovieStacker v2.0.0 (beta3) =- #
#======================================================#

LoadPlugin("C:\Programme\MovieStacker\Filters\MPEG2Dec.dll")
LoadPlugin("C:\Programme\MovieStacker\Filters\DecombLegacy.dll")
LoadPlugin("C:\Programme\MovieStacker\Filters\GripFit_preview.dll")
LoadPlugin("C:\Programme\MovieStacker\Filters\BlockBuster.dll")
LoadPlugin("C:\Programme\MovieStacker\Filters\UnFilter.dll")
LoadPlugin("C:\Programme\MovieStacker\Filters\LegalClip.dll")

Mpeg2Source("E:\dcd\test25\testfinal.d2v")
LegalClip()
FieldDeinterlace()
GripCrop(352, 288, overscan=1)
GripSize(resizer="BilinearResize")
UnFilter(50, 50)
TemporalSmoother(1, 2)
MergeChroma(blur(1.58))
MergeLuma(blur(0.2))
BlockBuster(method="noise", detail_max=7, seed=1)
GripBorders()
LegalClip()

The Output will be this: Original again 352x288

http://www.digitalfaq.com/archives/error.gif

Why? Can I get of of the blocks or not?

Min.Bit 300; Max.Bit. 1800; CQ 60.

I´ll try it again with CQ 90...

AviSynthSwitcher: I fixed the problem. I looked into the folder of the program. I found older versions of AVISynth and updated it to 2.0.8 and 2.5.2. Now i can switch without problems!!!!!

kwag 07-17-2003 07:10 PM

@Avalon,

Blockbuster(noise) is not effective with CQ. Use CQ_VBR for resolutions of 352x240(288).

-kwag

Avalon 07-17-2003 07:24 PM

Now i tested all.

d2v directly loaded in TMPGEnc:

http://www.digitalfaq.com/archives/error.gif

sometimes blocky.

d2v across AVS 2.0.8 (KVCD Script):

http://www.digitalfaq.com/archives/error.gif

blocky

d2v across AVS 2.5.2 (MA Script):

http://www.digitalfaq.com/archives/error.gif

The hole sample blocky!!!

Avalon 07-17-2003 07:27 PM

Quote:

Blockbuster(noise) is not effective with CQ. Use CQ_VBR for resolutions of 352x240(288).
I´ll try it...

Result:

http://www.digitalfaq.com/archives/error.gif

now i try it with 2.5.2...

Dialhot 07-17-2003 07:33 PM

Quote:

Originally Posted by jorel
i'm back to answers Phil!

if with 480x480 in 83 minutes movie i got blocky and
"everybody" with more resolution(544x or 702x)with more than 83 minutes
:arrow: don't got blocks... :?
the script is the same used for all...
if i "Raise the CQ" the final file size will encrease,of course and i say
bye,bye to one cdr 700mb.
:lol:
what i do?
:? :?

You :

1/ lower the min video rate to 64Kbs (I encode everything at this rate)
2/ lower the audio rate to 112
3/ lower the res to 352*480
4/ blur the chroma to 1.58 insteed of 1.50 (Maxthreshold in the MA script)
4/ use TemporalCleaner(6+nf,13+nf) insteed of temporalsoften
5/ add DCT(1,1,1,1,1,1,0.5,0) at the end of the script
6/ blur luma a little bit more (0.2)
7/ add Dup(threshold=1,blend=true) just before DCT
8/ use an overscan of 2

Do this step by step until you have correct result. I generaly stop to 5 even with movie monger than 1h40 !

And finaly, if nothing works, change the movie :-)

PS: I forgot "0/ use a 90min CD" :-))

Avalon 07-17-2003 07:38 PM

@ Dialhot: Can u post your script?
Do U use CQ or VBR_CQ?

Will it be like this?

Code:

######
###        AVISYNTH-Script (für Version 2.5.2) von Avalon
###                DCD 4.0
###        ScriptVersion 180703/0246/Normal
######
##
##          Es werden alle Filter geladen, aber nicht alle sind aktiviert. Um dies zu ändern
##          entfernt die # vor den jeweiligen Zeilen.
##
## DLL Sektion ##
#
LoadPlugin("C:\Filters25\mpeg2dec3_25_dll_20030119\MPEG2Dec3.dll")
LoadPlugin("C:\Filters25\GripFit_YV12\GripFit_YV12.dll")
LoadPlugin("C:\Filters25\stmedianfilter_25_dll_20030122\Avisynth_2.5a_Version\STMedianFilter.dll")
LoadPlugin("C:\Filters25\asharp_25_dll_20030118\asharp.dll")
LoadPlugin("C:\Filters25\unfilter_25_dll_20030116\UnFilter_Avisynth_2.5_Alpha\UnFilter.dll")
LoadPlugin("C:\Filters25\undot_25_dll_20030118\UnDot.dll")
LoadPlugin("C:\Filters25\decomb_25_dll_20030327\decomb406b7\Decomb.dll")
LoadPlugin("C:\Filters25\dctfilter_25_dll_20030221\DctFilter.dll")
LoadPlugin("C:\Filters25\temporalcleaner_25_dll\TemporalCleaner.dll")
LoadPlugin("C:\Filters25\dup220b1/Dup.dll")
#
####
##
##
## Definierte Variablen und Konstanten ##
#
MaxTreshold = 1.50
nf =  0 # Current frame.
#
####
#
##### Haupt Sektion und statische Filter ###
#
Mpeg2Source("tragt hier den Pfad zu Eurer d2v-Datei ein.")
#
# z.B.          MPEG2Source("C:\dcd\dvd.d2v")
undot()
Limiter()
asharp(1, 4)

GripCrop(352, 288)

GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(1.58))
MergeLuma(blur(0.2))

FieldDeinterlace()
TemporalCleaner(6+nf,13+nf)

# ( Portions from AviSynth's manual ) - This will apply temporalsoften to
# very static scenes, and apply variable blur on moving scenes.
# We also assign a variable - and this is why a line break is inserted:
#
#
SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= 2 ? \
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( Your_Values_Here ) # Depends on situation. Use MovieStacker!
Limiter()
#
#
#
##### Functions ###
#
function fmin( int f1, int f2) {
  return ( f1<f2 ) ? f1 : f2
}

Dup(threshold=1,blend=true)
DctFilter(1,1,1,1,1,1,0.5,0)

#
########


kwag 07-17-2003 07:45 PM

Hi Avalon,

When you have some time, and I mean a very long time :) , take a look at this (LONG) thread: http://www.kvcd.net/forum/viewtopic.php?t=2073
There you'll find all the tests we made, comparing CQ vs. CQ_VBR.

-kwag

Avalon 07-17-2003 07:54 PM

Thanks!

I´ll look to Your samples:

Quote:

Here's another view. Please pay special attention to the water and fire scenes:

These are shorter samples:
http://www.kvcd.net/k19-cq-vbr.m1v
http://www.kvcd.net/k19-cq.m1v

jorel 07-17-2003 08:49 PM

Quote:

Originally Posted by Avalon
Thanks!

I´ll look to Your samples:

Quote:

Here's another view. Please pay special attention to the water and fire scenes:

These are shorter samples:
http://www.kvcd.net/k19-cq-vbr.m1v
http://www.kvcd.net/k19-cq.m1v

and more:
frame 86 in vdubmod:
the cord(cable) between the leg of the guy walking
and the head of other guy..in cqvbr show strange artefacts,cq is clean,
and more details in this scene,easy too see.

frame 140 in the water,cq is champion comparing with cqvbr.
frame 208 in the fire,cq is champion comparing with cqvbr that is blocky.
frame 290 with H.Ford,cq is champion again comparing with cqvbr.
and in general details cq is better!

ps:
8O
the strange:
H.Ford seems to me , but i'm really much more beautiful!
:lol: :lol: :lol: :mrgreen:
hey,....but he have more hair.
:bawl:

Avalon 07-17-2003 08:53 PM

This is quite good... Im on page 39 of 43 :wink: :wink: :wink: :wink:

Quote:

0. Encoder: Use TMPGEnc
1. Matrix: Q.Matrix Notch
2. Rate control mode: CQ (use ToK to predict value)
3. Min BR: does not really matter. Use 0.
4. Max BR: 2520
5. GOP: 1-24-2-1-24 (for cartoons 1-12-2-1-15 NTSC, 1-24-2-1-12 PAL)
6. Res: 528x480
7. Stream: MPEG-1 if the average video BR < 1800, MPEG-2 otherwise.
8. Don't detect scene change
9. Use Moviestacker, load the suggested script for KVCDx3 and tweak it to match the "Latest Optimal Script". Use Gripfit and Bicubic resize. Use overscan = 2.
10. Motion search precision: Use High Quality
11. DC component precision: 8 bit
12. Audio: 128 kbps, Joint stereo
13. VBV buffer size: 0 (Auto)
14. Picture spoilage: 0 0
15. No motion search for still picture part by half pixel: Checked
16. Soften block noise: Unchecked
17. Burn as SVCD if your player supports it, else use VCD.
18. File prediction factor: 0.98
19. In NTSC, use Force Film if possible, IVTC if Telecined, and Deinterlace as a last resort.
20. Don't use "Add SVCD scan offsets" nor "Align sequece headers".
21. Use CD size 810 and overburn a minute or so if your CD-Writer supports it. Use 8x at most when overburning.
And Kwags replay:

Quote:

Hi r6d2,

A couple of corrections on the latest achievemnts and findings :

"3. Min BR: does not really matter. " Use 0. -> If your player supports going down to 0, by all means use it
Most DVD players have problems below 300Kbps, so we settled for 300 as a safety factor.

"7. Stream: MPEG-1 if the average video BR < 1800, MPEG-2 otherwise." -> I would say up to 2,500, use MPEG-1. Above that, use MPEG-2.

"10. Motion search precision: Use High Quality" -> If you are going to use the new motion adaptive script for AviSynth 2.52, change that to "Motion Estimation". It produces better video with less visible artifacts.

"12. Audio: 128 kbps, Joint stereo" -> Joint stereo is a No No
Use "Dual channel", and you can also go down to 112Kbps if you encode with HeadAC3he. If you encode "Joint Stereo", you will kill "Surround 2" signals, and the sound will be messed up on a Prologic II receiver.

"13. VBV buffer size: 0 (Auto)" -> Don't use auto Use TMPEG's default. It's more compatible.

"15. No motion search for still picture part by half pixel: Checked" -> Uncheck that

Everything else is fine

Avalon 07-17-2003 08:58 PM

My last test will go with Motion Estimation and the MA-Script in 528x576...

I´m very tired!!!! Now in Germany it is 3:57 AM and I´ve today a long day...

Good night everyone (or goodmorning...)

BTW...

can I edit the Video.en1-file to VBR-CQ or Motion Estimation ?

An nother question...

is there a good Deinterlacer out... where and if posible a sample ASV-Script...

jorel 07-17-2003 09:35 PM

@ Avalon
good night my friend!
:)
i'm using fielddeinterlace(decomb) but maybe someone can show us
another better choice.

@ Phil
ok friend,i will try all of your recomendations posted....
seems a "brain surgery" in the script!
:lol:
thank you very much!
:wink:

Avalon 07-18-2003 02:50 AM

I changed the testing source... The Princess Blade sample wasn´t the good choice!!!!

I´ll try it now with the full Tomb Raider 2 Trailer out of a DVD...
Looks better...

Post U then my results...

Dialhot 07-18-2003 05:03 AM

Quote:

Originally Posted by Avalon
@ Dialhot: Can u post your script?

I don't have it here at the office so I'll just modify you own script to show you where are the errors.

Quote:

Do U use CQ or VBR_CQ?
CQ

Now the script :

MaxTreshold = 1.50
nf = 0 # Current frame.

Mpeg2Source("tragt hier den Pfad zu Eurer d2v-Datei ein.")
undot()
Limiter()
asharp(1, 4)

GripCrop(352, 288) <-- you can try (352,576)

GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(1.58))
MergeLuma(blur(0.2))

FieldDeinterlace()
TemporalCleaner(6+nf,13+nf) <-- REMOVE

SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= 2 ? \
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) ") <-- REPLACE by the "TemporalCleaner" line shown above

GripBorders()
MovieStacker!
Limiter()

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

Dup(threshold=1,blend=true) <-- move before function
DctFilter(1,1,1,1,1,1,0.5,0) <-- move before function

#
########[/code][/quote]

Wilbert 07-18-2003 06:48 AM

Two mistakes:

1) You smooth before deinterlacing. Deinterlace first and then do the rest.

2) You sharp first and then smooth again. Better do it the other way around.


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