digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Motion adaptive green? (http://www.digitalfaq.com/archives/avisynth/3975-avisynth-motion-adaptive.html)

CheronAph 06-14-2003 12:15 AM

Motion adaptive green?
 
Just tried the script, I get a green screen in tmpgenc, I have avisynth 2.52 installed!

## DLL Section ##
#
LoadPlugin("E:\KVCD Converting\Filters\Avisynth_2.5\MPEG2Dec3.dll")
LoadPlugin("E:\KVCD Converting\Filters\Avisynth_2.5\STMedianFilter.dll ")
LoadPlugin("E:\KVCD Converting\Filters\Avisynth_2.5\asharp.dll")
LoadPlugin("E:\KVCD Converting\Filters\Avisynth_2.5\undot.dll")
#
####

## Defined Variables and Constants ##
#
MaxTreshold = 1.50
scd_trigger = 25 # Scene change trigger value.
nf = 0 # Current frame.
#
####

## Main section and static filters ###
#
AviSource("E:\KVCD Converting\KVCD CACHE\Kääntämättömät\Topi ja Tessu Divx Finnish.avi")
#
undot()
Limiter()
asharp(2, 4)
BicubicResize(672, 542, 3, 0, 634, 512)
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(MaxTreshold))
MergeLuma(blur(0.2))
#
#

## Dynamic Linear Adaptive Filtering and Scene Change Detection ##
#
# ( 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:

ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf > 2.5 ? asharp( -(fmin((nf/30), 1)), 0 ) : \
TemporalSoften(2,7,7,3,2) ")

#
# Scene change detection ( kwag ) - If a scene change is detected, we
# blur heavily. This affects the scene before and the one after the
# scene change, thus providing a softer transition for the encoder instead
# of a sharp "spike".
# If it's not a scene change, then we just blur dynamically, depending on
# the action.

ScriptClip("nf > scd_trigger ? asharp( -2,0) : asharp(0,0) ")

#
#
#

#LetterBox( Your_Values_Here ) # Depends on situation. Use MovieStacker!
AddBorders(16, 17, 16, 17) # Depends on situation. Use MovieStacker!
Limiter()

#
#
## Functions ###

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

#
####

kwag 06-14-2003 12:29 AM

Hi CheronAph,

The problem is probably in your source. Open your .avs with Vdub, and see if it looks the same. There, you'll probably get an error. Check your DivX CODEC version too :!:

-kwag

CheronAph 06-14-2003 12:40 AM

It has to be in the script, I tried an .avi that I have already encoded with a normal script which worked fine, with the new script it´s the green screen again!

Boulder 06-14-2003 04:46 AM

Re: Motion adaptive green?
 
Quote:

Originally Posted by CheronAph
Just tried the script, I get a green screen in tmpgenc, I have avisynth 2.52 installed!

BicubicResize(672, 542, 3, 0, 634, 512)

This line could be the problem. You should always crop in even numbers!

EDIT: There's something wrong with that line. It should be BicubicResize(672, 542, 19, 15, 634, 512) but that's not correct either (for the reasons above)

CheronAph 06-14-2003 05:19 AM

I used moviestacker to get that line!

CheronAph 06-14-2003 05:26 AM

I used fitcd to get the right rezise and it works, now the problem is that tok won´t do the predict when it starts to make the samples, only black screen appears?

black prince 06-14-2003 08:34 AM

@CheronAph,

Double check BicubicResize paramaters:

Example of 704x480 with tv-overscan of 2:

BicubicResize(672,446,0,0.6,0,1,720,478)

-bp

CheronAph 06-14-2003 08:36 AM

Quote:

Originally Posted by black prince
@CheronAph,

Double check BicubicResize paramaters:

Example of 704x480 with tv-overscan of 2:

BicubicResize(672,446,0,0.6,0,1,720,478)

-bp

I´m using BicubicResize(672,544,0,0.6,4,0,632,512) to 704x576 and I can encode it but prediction with tok doesn´t work???

Jellygoose 06-14-2003 09:19 AM

Did you point TOK to the Sample-2.5.dll :?:

CheronAph 06-14-2003 01:44 PM

No I didn´t, I´ll try that!

CheronAph 06-14-2003 02:02 PM

Quote:

Originally Posted by Jellygoose
Did you point TOK to the Sample-2.5.dll :?:

Uhmmm, where can I find it?

CheronAph 06-14-2003 02:55 PM

I´ve got it now, it´s working, thanks all for your help!

CheronAph 06-14-2003 03:40 PM

Arrrgh, what´s this,
================================================== ===========
ToK Log: E:\KVCD Converting\Topi ja Tessu Motion Adaptive.avs
================================================== ===========

Resolution (fps):704x576 (25.000 fps)
Total Frames: 118956
Total Time : 01:19:18
-------------------------------------------------------------

Audio Size: 76*132*102
Required Video Size: 735*637*219

Factor: 60.000
Desired Sample Size: 12*260*620

-------------------------------------------------------------
New Faster Prediction
-------------------------------------------------------------

Full Sample
Next CQ: 70.000. Sample Size: 21*517*576
Small Sample
Next CQ: 70.000. Sample Size: 1*608*967
Predicting...
Next CQ: 39.886. Sample Size: 14*849*225
Next CQ: 26.775. Sample Size: 13*357*714
Next CQ: 19.273. Sample Size: 12*741*582
Next CQ: 14.360. Sample Size: 12*196*637

Exit Condition: 1.000 % reached ! yahoo !
Tries : 5


Final CQ: 14.360
Total Time For Predicition: 00:14:34

Total Time (all operations): 00:14:34

Finished

kwag 06-14-2003 03:46 PM

What kind of movie is that 8O
Seems it's a very high activity movie or something, because the CQ that ToK gave you, is close to the wanted sample size. So that's it :!:

-kwag

CheronAph 06-15-2003 01:48 AM

It´s a cartoon, Fox and a hound, old Disney movie!

kwag 06-15-2003 01:54 AM

Well I think you're going to have to go lower in resolution for that movie. Maybe 352x576 :idea:

-kwag

CheronAph 06-15-2003 02:11 AM

Does this motion adaptive thing have the same compression or does it automatically make larger files?

kwag 06-15-2003 02:17 AM

Quote:

Originally Posted by CheronAph
Does this motion adaptive thing have the same compression or does it automatically make larger files?

The motion adaptive filter script will make WAY smaller files than using static filters. Like the ones used on 2.0x series.
Bed time, see you all tomorrow ;)


-kwag

CheronAph 06-15-2003 03:59 PM

Then something is wrong, same movie optimal script!

================================================== ===========
ToK Log: E:\KVCD Converting\Topi ja Tessu.avs
================================================== ===========

Resolution (fps):704x576 (25.000 fps)
Total Frames: 118956
Total Time : 01:19:18
-------------------------------------------------------------

Audio Size: 76*132*102
Required Video Size: 735*637*219

Factor: 60.000
Desired Sample Size: 12*260*620

-------------------------------------------------------------
New Faster Prediction
-------------------------------------------------------------

Full Sample
Next CQ: 70.000. Sample Size: 18*878*152
Small Sample
Next CQ: 70.000. Sample Size: 1*439*749
Predicting...
Next CQ: 45.462. Sample Size: 13*872*852
Next CQ: 31.763. Sample Size: 12*350*443

Exit Condition: 1.000 % reached ! yahoo !
Tries : 3


Final CQ: 31.763
Total Time For Predicition: 00:14:19

Total Time (all operations): 00:14:19

Finished

kwag 06-15-2003 04:15 PM

8O Don't now what to say, because my results are just the opposite :!:
But then, I'm doing NTSC, so I can't compare to any PAL stuff :?

-kwag


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