digitalFAQ.com Forums [Archives]

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

kwag 06-06-2003 10:29 AM

Quote:

Originally Posted by Jellygoose
However I'm still searching for a way to get rid of artifacts around objects and DCT Blocks in dark areas...

Hi Jellygoose,

That I'm afraid is something we'll probably never be able to accomplish with any pre-processing filtering :!:
That would be the work of motion estimation internal to the encoder.
Unless we decide to encode with a heavier blur, and then we can design some "sharpen goggles" and put them on to watch TV :mrgreen:

-kwag

Jellygoose 06-06-2003 10:34 AM

Where can I get those goggles man? :lol:
Nevermind, I just go over to the next movie... :)

kwag 06-06-2003 10:38 AM

Quote:

Originally Posted by Jellygoose
Where can I get those goggles man? :lol:

You have to talk to SansGrip, so he can make the "NoMoFluxGripFitOnYourEyes" goggles LOL :mrgreen:

girv 06-06-2003 10:45 AM

Quote:

Originally Posted by kwag
You have to talk to SansGrip, so he can make the "NoMoFluxGripFitOnYourEyes" goggles LOL :mrgreen:

What about a MotionAdaptiveChoppingLumaBlurWithNoBugsThatDoesnt TakeTwoWeeksToEncodeAMovie() plugin while he's at it?

bman 06-06-2003 12:21 PM

Quote:

Originally Posted by girv
Quote:

Originally Posted by kwag
You have to talk to SansGrip, so he can make the "NoMoFluxGripFitOnYourEyes" goggles LOL :mrgreen:

What about a MotionAdaptiveChoppingLumaBlurWithNoBugsThatDoesnt TakeTwoWeeksToEncodeAMovie() plugin while he's at it?

Can u say agin that filter name :lol: :lol: :lol: ?
bman

girv 06-06-2003 01:03 PM

Quote:

Originally Posted by bman
Can u say agin that filter name :lol: :lol: :lol: ?

Sorry, I don't have the bandwidth to transmit it again :wink:

rendalunit 06-06-2003 03:39 PM

Quote:

Originally Posted by girv
What about a MotionAdaptiveChoppingLumaBlurWithNoBugsThatDoesnt TakeTwoWeeksToEncodeAMovie() plugin while he's at it?

Man I can't wait for this MotionAdaptiveChoppingLumaBlurWithNoBugsThatDeosnt TakeTwoWeeksToEncodeAMovie filter :wink:

http://www.digitalfaq.com/archives/i.../2003/06/1.png

:cry: :cry: :cry: :cry:

black prince 06-06-2003 08:43 PM

@Kwag,

Removed all avisynth files and re-installed avisynth 2.52. Performed
system-tune up and tried steps to encode KVCD. This time everything
worked much better and faster. The movie “Abandon” is 96 minutes,
resolution I picked 528x480, audio 128kb @44.1 khz (Headac3he) and
Tok predicated CQ 71.23. Encoding time was 8 hrs, for one 80 minute CD.
This is much better. There were a few problems thought.

1) Picture quality is the best I’ve ever seen for KVCD (near DVD) :D

2) This error message from the avi script appeared:

I don’t know what “nf” means ([ScriptClip], line 1) :?

3) Computer stop responding with Tok at 49% complete :roll:

4) Undot() is suppose to clean-up source with Gibbs Effect and not clean source

5) How do I include “tv-overscan” with this script? :?:

-bp

kwag 06-06-2003 09:22 PM

Hi bp,

Check that you have the latest script. There shouldn't be any errors related to "nf". nf is just a temporary variable. For blocks overscan, I use MovieStacker, and after I set all my values, I copy+paste the mpeg2source, resize, addborders and letterbox lines into the basic skeleton script.

-kwag

black prince 06-06-2003 09:48 PM

@Kwag,

Here's the latest optimal script I'm using:

Quote:

LoadPlugin("E:\DVD BACKUP\1 - DVD2KVCD\3 - MOVIESTACKER\Filters25\MPEG2Dec3.dll")
LoadPlugin("E:\DVD BACKUP\1 - DVD2KVCD\3 - MOVIESTACKER\Filters25\asharp.dll")
LoadPlugin("E:\DVD BACKUP\1 - DVD2KVCD\3 - MOVIESTACKER\Filters25\undot.dll")
LoadPlugin("E:\DVD BACKUP\1 - DVD2KVCD\3 - MOVIESTACKER\Filters25\Unfilter.dll")
LoadPlugin("E:\DVD BACKUP\1 - DVD2KVCD\3 - MOVIESTACKER\Filters25\STMedianFilter.dll")


## Defined Variables and Constants ##
#
MaxTreshold = 1.50
scd_trigger = 15 # Scene change trigger value.
cf = 0 # Current frame.
lf = 0 # Last frame
val = 0 # Dynamic value applied to filters
#
####

## Main section and static filters ###
#

Mpeg2Source("D:\Temp\movie.d2v")

undot()
Limiter()
asharp(2, 4)
BicubicResize(704,480)
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/35), 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( -(fmin((nf/35), 1)), 0) ") #
#
#

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

#
#
## Functions ###

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

#
####
The bold line in the above script is giving me this error. Everytime
I use Moviestacker, it gives a message that the version of avisynth
has to be 2.0x and will not open my d2v file. What am I doing wrong?

-bp

rendalunit 06-06-2003 10:13 PM

Quote:

Originally Posted by black prince
Everytime
I use Moviestacker, it gives a message that the version of avisynth
has to be 2.0x and will not open my d2v file.

MovieStacker will open the .d2v if you hit "ignore" when the error window pops up.

Check to make sure that you've pointed the "Sampler" directory to the Sampler.dll for avisynth 2.5x in ToK.

ren

black prince 06-06-2003 10:27 PM

@ren,

Thanks, I tried ignor and it opened, I still can't figure out why this avs
script statement is causing an error?

Quote:

ScriptClip("nf > scd_trigger ? asharp( -2,0) : asharp( -(fmin((nf/35), 1)), 0) ") #
It's not recognizing "nf" for some reason and this is the latest script
cut and pasted from the Optimal Script Forum :roll: This function will
not execute due to the error :?:

-bp

ovg64 06-06-2003 10:52 PM

Quote:

Originally Posted by black prince
@ren,

Thanks, I tried ignor and it opened, I still can't figure out why this avs
script statement is causing an error?

Quote:

ScriptClip("nf > scd_trigger ? asharp( -2,0) : asharp( -(fmin((nf/35), 1)), 0) ") #
It's not recognizing "nf" for some reason and this is the latest script
cut and pasted from the Optimal Script Forum :roll: This function will
not execute due to the error :?:

-bp

Try this one as the script was updated today :!:

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

kwag 06-06-2003 11:07 PM

Quote:

Originally Posted by ovg64

Try this one as the script was updated today :!:

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

Thanks ovg :!:
I was going to mention that too :)

@Black Prince,
Update your complete script, your script is ancient.
"Ancient = >1 day" in KVCD terms :mrgreen:
Hopefully, the script is now very stable, and we can start doing some encodes 8)
At least for me it is :!:

-kwag

black prince 06-07-2003 11:11 AM

@Kwag,

Finished a complete backup of "Abandon". Movie time 98 minutes,
resolution 528x480, audio 128kb @44.1 khz, target size one 80 min CD.
Time to encode was ~11 hrs. Results, WOOOOOoooooooooWWWW 8O
Picture quality near DVD. :mrgreen: Filesize 776MB, Tok file prediction was perfect. :D
Small problems though, from 2 to 3 feet viewing 23" standard screen, Gibbs
visible and distracting. From 5 to 8+ feet, Gibbs barely noticable. Picture
is sharp and very clear. Color is vivid with no bleeding. In short, if you
didn't know it was KVCD, you would think it was DVD. I'm glad I switched
to avisynth 2.52 and hope a solution can be found for DCT and Gibbs
problems. :)

-bp

BTW, I did update my script and still kept getting the same error message
in the same line. My next step will be to delete the script and write the
same script from scratch. Some characters may be unprintable but are
being scaned as invalid.

kwag 06-07-2003 11:29 AM

Quote:

Originally Posted by black prince
Small problems though, from 2 to 3 feet viewing 23" standard screen, Gibbs
visible and distracting.

Hi bp,

It could be this particular source :!:
Have you tried another movie :?:
Maybe going to 704x480 reduces the Gibbs :idea:
On my "Red Planet" encode, there are barely any Gibbs", and that movie is ~1:46 long 8O :D

-kwag

jorel 06-07-2003 12:38 PM

:)

after prediction,i got CQ 61,54 in 480x480,
and got only CQ 40,61 in 704x480.

of course is the new wonderfull script that give
the better quality in all my samples..... :wink:

after read some posts here,i see that everyone got
more or less CQ66 with 704x480. 8O

my source is dvd with 88 minutes and i never
got more than CQ 40 with 704x480 size! :(

can anyone help me to find what is wrong,
if have some wrong?
i can't believe why i got few CQ from this resolutions.
:?:

the quality in 480x480 is good and i try to make the first
with 704 but with this little prediction,i can't.

all help will be fantastic,i see all samples from Kwag and
want to got the same.... :wink:

i did thousands times the prediction and got
all CQs under 40 or 42 max for full movie 88 minutes,
audio 128 source Resolution (fps):704x480 (29,970 fps)

h e l p ... :(
thanks.

ps:
athlon xp+2000,512mbram,60gb maxtor 7200,
avisynth252,all new filters and last new script.

kwag 06-07-2003 12:57 PM

@Black Prince ( and all! ),

I just did a quick test, by changing the motion estimation to "Fast" in TMPEG, and there are CLEARLY less Gibbs. Maybe with the new adaptive method of filtering, we can use this motion estimation, and even though the CQ might be slightly smaller than with "High Quality" estimation, the final quality will be better :idea:

Edit: I just did two encodes with ToK. One with "High quality" and another with "Fast"

Here are the results:

http://www.kvcd.net/red-planet-sampl...on-cq62.70.mpg
http://www.kvcd.net/red-planet-sampl...y-cq63.031.mpg

I can clearly see less Gibbs with motion estimation set to "Fast".
If you want to try this with ToK, change the line in the file "video.en1" that reads:

Job.MPEG.Video.MotionSearchSpeed=MPEGVideoEncoder_ MotionSearchSpeed_Slow

To:
Job.MPEG.Video.MotionSearchSpeed=MPEGVideoEncoder_MotionSearchSpeed_MotionEstimate

Not to mention that the encoding speed is now a rocket :)

-kwag

kwag 06-07-2003 01:00 PM

Hi jorel,

Are you using ToK or DVD2SVCD to calculate your CQ :?:

-kwag

jorel 06-07-2003 01:09 PM

Quote:

Originally Posted by kwag
Hi jorel,

Are you using ToK or DVD2SVCD to calculate your CQ :?:

-kwag

i'm using the best dear friend,
ToK of course :!:

vhelp 06-07-2003 01:24 PM

Hi all..

Ok, I'm finally bustin in here.. ben quiet for far too long hehe.. So, let me
start w/ an request if I may 8)

@ BP..

Quote:

Picture quality near DVD. Filesize 776MB, Tok file prediction was perfect.
Small problems though, from 2 to 3 feet viewing 23" standard screen, Gibbs
Any chance on see those GIBs you were talking about on page 26 dude ??
A small 2 mb should do it, else maybe Kwag can do it for ya w/ your
script and movie.

I'm asking because I got an NEW monitor and I'm seeing things that I never
rally saw, in my encodes. So, it's an enlightment really. And, an aid or tool
too, cause I can fine-tune even more, certain areas in my encodes.

Basically, my LCD monitor is like a mini HDTV. Like, I've ben playing some
of my DVD's in PDVD, and am noticing things I can never see on a regular
CRT monitor (and TV set)

So, I'd like to use my LCD as a guage (maybe help you all out too) or tool
in fine-tuning encodes and things - pretty anal but a :idea: great idea if we are
serious in our altimate encoding quality !!

Hope you can help.
-vhelp

kwag 06-07-2003 01:27 PM

Quote:

Originally Posted by vhelp
Any chance on see those GIBs you were talking about on page 26 dude ??

I just posted two samples 8O

jorel 06-07-2003 01:43 PM

@ Kwag
:!:

after my last post i try to find the prediction in ToK again using:

LoadPlugin("C:\Filters25\MPEG2Dec3.dll")
LoadPlugin("C:\Filters25\undot.dll")
LoadPlugin("C:\Filters25\asharp.dll")
LoadPlugin("C:\Filters25\decomb.dll")
LoadPlugin("C:\Filters25\STMedianFilter.dll")

MaxTreshold=1.50
scd_trigger=15
nf=0

Mpeg2Source("D:\La Luna\Segment2\DVD2AVI_PROJECT_FILE.d2v")
undot()
Limiter()
asharp(2,4)
FieldDeinterlace()
BicubicResize(688,464,0,0.6,0,0,712,480)
STMedianFilter(8,32,0,0)
MergeChroma(blur(MaxTreshold))
MergeChroma(blur(0.2))

ScriptClip("nf=YDifferenceToNext()"+chr(13)+"nf>2. 5?asharp(-(fmin((nf/35),1)),0):\
TemporalSoften(2,7,7,3,2)")
ScriptClip("nf>scd_trigger?asharp(-2,0):asharp(0,0)")
AddBorders(8,8,8,8)
Limiter()
function fmin(float f1,float f2){return(f1<f2)?f1:f2}

and got:
================================================== ===========
ToK Log: C:\Delete\01last.avs
================================================== ===========

Resolution (fps):704x480 (29,970 fps)
Total Frames: 159614
Total Time : 01:28:46
-------------------------------------------------------------

Audio Size: 85.216.000
Required Video Size: 726.644.160

Factor: 59,940
Desired Sample Size: 12.122.858

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

Full Sample
Next CQ: 60,000. Sample Size: 16.971.001
Small Sample
Next CQ: 60,000. Sample Size: 1.648.270
Predicting...
Next CQ: 42,860. Sample Size: 13.055.615
Next CQ: 30,899. Sample Size: 11.562.205
Next CQ: 36,135. Sample Size: 12.610.961
Next CQ: 33,608. Sample Size: 11.766.030
Next CQ: 34,773. Sample Size: 11.770.684
Next CQ: 35,399. Sample Size: 12.132.690

Exit Condition: 1,000 % reached ! yahoo !
Tries : 7


Final CQ: 35,399
Total Time For Predicition: 00:13:50

Total Time (all operations): 00:13:50

Finished

:?
do you see something wrong in the script?
i don't see,for me is perfect!
all the filters are new and avisynth252... :?


thanks for the hint ... "ToK MotionEstimate".
:wink:

kwag 06-07-2003 01:52 PM

Hi jorel,

Maybe it's your 29.97fps movie you're trying to encode :!:
Have you tried the script on a 23.976 Force FILM .d2v :idea:

-kwag

kwag 06-07-2003 02:01 PM

Here's a 19 second sample with motion estimation set to "Fast" and CQ set to 62.7 ( target for one CD, predicted with ToK ):
www.kvcd.net/red-planet-19second.mpg

-kwag

ovg64 06-07-2003 02:25 PM

Quote:

Originally Posted by kwag
Here's a 19 second sample with motion estimation set to "Fast" and CQ set to 62.7 ( target for one CD, predicted with ToK ):
www.kvcd.net/red-planet-19second.mpg

-kwag

Hey Kwag is that 704 or 528 :?: cause i got that movie to encode,
I know it should fit in 1 cd sence is Letter Box and the hole movie is Dark. :!:

Yes it brakes up Doesn't it Vhelp :?:

vhelp 06-07-2003 02:27 PM

@ Kwag..

Sorry for late reply.

Yes, I D/L'ed both those sample :wink:

What I observed...
* http://www.kvcd.net/red-planet-sampl...on-cq62.70.mpg
your GIBS and patchy blocks.

What I liked...
* http://www.kvcd.net/red-planet-sampl...y-cq63.031.mpg
MUCH less gibs, but some patchy blocks*** still.

*** I have some things to talk about on this - short followup
comming.

Both clips looked much good, but the 2nd looked much better 8)

-vhelp
PS: sorry, but my image fallups and your server got my timing wrong w/
each post - I've correct it w/ right order.

vhelp 06-07-2003 02:34 PM

@ Kwag..

warning..
Something happend to your clip (below) ..it's mostly garbled w/ artifacts.

* http://www.kvcd.net/red-planet-19second.mpg

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

I use paint-shop w/ Gamma set to 2.0 to give a better visual of what's
being seen. Sorry for the fallups w/ the image.

-vhelp

kwag 06-07-2003 02:52 PM

Quote:

Originally Posted by vhelp
@ Kwag..

warning..
Something happend to your clip (below) ..it's mostly garbled w/ artifacts.

Thanks vhelp
I'm re-uploading now :!:

Edit:
Done!. Just downloaded it to check it. It's ok now :)


-kwag

vhelp 06-07-2003 03:03 PM

@ Kwag..

it's raining very heavily here in NY (all day) So, we'll see how it comes out.
D/L'ing now.

I just love this new toy, LCD monitor. Some minor CONS about it, but
other than that, it's great - - yeah, my mini HDTV hehe..


-vhelp
PS: oh, i need a new keyboard.

Sagittaire 06-07-2003 03:18 PM

Ca makes a long time that I did not come on this forum and thus I does not know too much or are to you... But I post the new versions of my scripts

Script Detect Motion Filter

Quote:

################################################## ##############################

# AviSynth 2.52 #

# Script Motion Detection Filter YV12 02/06/03 #

################################################## ##############################


################################## Faq ...;-) ##################################


# Plugin MPEG2Dec3.dll #
# Plugin Convolution3DYV12.dll #
# Plugin FluxSmooth.dll #

# Source : Path projet .d2v of DVD2AVI 1.76 #
# CPU_type : you will choose 5 for Pentium IV and 6 for the other processors #

# Threshold : adjustment of the threshold of detection of the scenes #

# Top : Crop top of the image #
# Left : Crop left of the image #
# Right : Crop right of the image #
# Bottom : Crop bottom of the image #

# DimX : Width of the image #
# DimY : Height of the image #

# Start : Start Frame #
# End : End Frame #



################################## Variables ###################################


Source = "C:\Stock\azerty.d2v"
CPU_type = 6

threshold_sm = 5
threshold_hm = 15

Left = 16
Top = 76
Right = 16
Bottom = 74

DimX = 640
DimY = 272

Start = 0
End = 0



############################### Script Principal ###############################


clip = Mpeg2Source( Source, idct = CPU_type)
clip = Trim( clip, Start, End)
clip = Crop( clip, Left, Top, -Right, -Bottom)
clip = DMF( clip, DimX, DimY, threshold_sm, threshold_hm)
clip = FluxSmooth( clip, 5, 3)
Return clip



################################## Fonctions ###################################


# Motion_Hight : function of filtering of fast scenes #

function Motion_Hight( clip Hight, float X, float Y)

{

Hight = Convolution3D( Hight, 0, 12, 16, 3, 4, 3, 0)
Hight = BicubicResize( Hight, X, Y, 0.33, 0.33)
Return Hight

}



# Motion_Medium : function of filtering of Mediums scenes #

function Motion_Medium( clip Medium, float X, float Y)

{

Medium = Convolution3D( Medium, 0, 6, 8, 6, 8, 3, 0)
Medium = BicubicResize( Medium, X, Y, 0, 0.5)
Return Medium

}



# Motion_Slow : function of filtering of Slow scenes #

function Motion_Slow( clip Slow, float X, float Y)

{

Slow = Convolution3D( Slow, 0, 3, 4, 12, 16, 3, 0)
Slow = BicubicResize( Slow, X, Y, 0, 0.7)
Return Slow

}



# Detect_Motion : function of detection of scenes slow, medium and rapid #

function Detect_Motion( clip detect, clip Slow, clip Medium, clip Hight, float threshold_sm, float threshold_hm)

{

global detect = detect

output1 = Conditionalfilter( detect , Slow, Medium, "diff_Previous", "<", "threshold_sm", false)

output2 = Conditionalfilter( detect , output1, Medium, "diff_Next", "<", "threshold_sm", false)

output3 = Conditionalfilter( detect , Hight, output2, "diff_Previous", ">", "threshold_hm", false)

output4 = Conditionalfilter( detect , output3, output2, "diff_Next", ">", "threshold_hm", false)

output4 = frameevaluate( output4, "diff_Previous = YDifferenceFromPrevious( detect ) + UDifferenceFromPrevious( detect ) + VDifferenceFromPrevious( detect )")

output4 = frameevaluate( output4, "diff_Next = YDifferenceToNext( detect ) + UDifferenceToNext( detect ) + VDifferenceToNext( detect )")


return output4

}



# DMF : function of filtage of scenes slow, medium and rapid #

function DMF( clip filter, float X, float Y, float threshold_sm, float threshold_hm)

{

filter = ConvertToYV12( filter)

Slow = Motion_Slow( filter, X, Y)
Medium = Motion_Medium( filter, X, Y)
Hight = Motion_Hight( filter, X, Y)

output = Detect_Motion( filter, Slow, Medium, Hight, threshold_sm, threshold_hm)

return output

}

################################################## ##############################
Script ZodiaqueSoften


Quote:

################################################## ##############################

# AviSynth 2.52 #

# Script ZodiaqueSoften YV12 2/06/03 #

################################################## ##############################


################################## Faq ...;-) ##################################


# MPEG2Dec3.dll #

# Source : Path projet .d2v of DVD2AVI 1.76 #
# CPU_type : you will choose 5 for Pentium IV and 6 for the other processors #
# Motion_Type : choose 1 for light, 2 for medium and 4 for strong filtering #

# Top : Crop top of the image #
# Left : Crop left of the image #
# Right : Crop right of the image #
# Bottom : Crop bottom of the image #

# DimX : Width of the image #
# DimY : Height of the image #

# Start : Start Frame #
# End : End Frame #



################################## Variables ###################################


Source = "C:\Stock\azerty.d2v"
global CPU_type = 6

global Motion_Type = 1

global Left = 16
global Top = 76
global Right = 16
global Bottom = 74

global DimX = 640
global DimY = 272

global Start = 0
global End = 0


############################### Script Principal ###############################


clip = Mpeg2Source( Source, idct = CPU_type)
clip = Trim( clip, Start, End)
clip = crop( clip, Left,Top, -Right, -Bottom)
clip = ZodiaqueSoften( clip)
clip = bicubicResize( clip, DimX, DimY, 0, 0.5)
Return clip



################################## Fonctions ###################################


# ZodiaqueSoften : function of adaptatif motion filter #

function ZodiaqueSoften( clip video)

{

global video = ConvertToYV12( video)

video = scriptclip( video,"filter_Motion( video, Threshold_Y, Threshold_UV)")

video = frameevaluate( video, "Threshold_Y = ( 0.5*YDifferenceFromPrevious( video.trim( 1, 0)) + 0.5*YDifferenceToNext( video.trim( 1, 0)))")

video = frameevaluate( video, "Threshold_UV = ( 0.25*UDifferenceFromPrevious( video.trim( 1, 0)) + 0.25*VDifferenceFromPrevious( video.trim( 1, 0)) + 0.25*UDifferenceToNext( video.trim( 1, 0)) + 0.25*VDifferenceToNext( video.trim( 1, 0)))")

return video

}


function filter_Motion( clip filter, float Threshold_Y, float Threshold_UV)

{

Temporel_Y = Int( 10* Exp( -0.30* Threshold_Y))

Temporel_UV = Int( 15* Exp( -0.90* Threshold_UV))

Spacial_Y = Int( 20*( 1 - Exp( -0.050* Threshold_Y)))

Spacial_UV = Int( 25*( 1 - Exp( -0.150* Threshold_UV)))

filter = ConvertToYUY2( filter)
filter = TemporalSoften( filter, Motion_Type, Temporel_Y, Temporel_UV, mode=2)
filter = SpatialSoften( filter, Motion_Type, Spacial_Y, Spacial_UV)
filter = ConvertToYV12( filter)

return filter

}


################################################## ##############################

vhelp 06-07-2003 03:18 PM

@ Kwag..

clip.. A.OK. Much better !!

Ok, some things to note (or theories)...

* When clip(s) are played under vdub, quality is outstanding. I theorise that
it's either playing these MPEG clips in YV12 color space, OR, 4:2:2 space.

* When clip(s) are played under PDVD, quality is ok.. probably due to
the 4:2:0 space and monitor (weather LCD or CRT, as it doesn't matter in
this case) I do think that it does play w/ better quality once burned to CDR
and played DVD and TV.

Now, I recall reading a discussion on DVD's MPEG color space.. that it's
sampled at YV12 natively or something. I don't recall the exact explanaa,
but to that effect.

Now, give the above, theories, I think that once we re-encode these to
MPEG's, we up obviously changing the color space. Somehow, these soft.
encoders are altering the color space OR, the software players are at fault,
hence vdub's great quality vs. PDVD's poorer or not-so-great :wink:

It would be interesting to note how vdub is using color space per say.. and
how come, PDVD does not use this same codec during play. Perhaps, it's
something to do w/ how PDVD utilizes the OVERLAY vs. vdub use of RGB.
Would be nice if you could set PDVD to use RGB and NOT OVERLAY.

Any thoughts ?? anyone ??
-vhelp

kwag 06-07-2003 03:20 PM

I believe most of the dream I proposed back in February became a reality with this script :mrgreen:
http://www.kvcd.net/forum/viewtopic.php?t=2834

-kwag

black prince 06-07-2003 07:39 PM

@jorel,

I had the same problem with low CQ for any resolution from Tok until
I removed all avisynth versions and their registry links. I re-installed
avisynth v2.52 by itself and Tok started giving me CQ's in the 60 to
70+ range. Of course, picture quality jumped to execellent. Give this
a try :)

-bp

jorel 06-07-2003 09:48 PM

Quote:

Originally Posted by black prince
@jorel,

I had the same problem with low CQ for any resolution from Tok until
I removed all avisynth versions and their registry links. I re-installed
avisynth v2.52 by itself and Tok started giving me CQ's in the 60 to
70+ range. Of course, picture quality jumped to execellent. Give this
a try :)

-bp

:)

@ black prince!
did you only deinstall and install again or some more like
edit the registry,give me the hints my friend.
i remember in this thread you talking about this problem.

i'm unistall and reinstall again the 252 to see what happen.
some more hints please bp.
thanks in advance!
:D

ovg64 06-07-2003 11:36 PM

Hey Jo editing the register is a becarefull thing, I suggest you use
a program like Norton Win Doctor if you going to do that Unless
you are a pro, but it does help when you clean the sucker from
programs you dont have anymore. :wink:

jorel 06-08-2003 08:36 AM

Quote:

Originally Posted by ovg64
Hey Jo editing the register is a becarefull thing, I suggest you use
a program like Norton Win Doctor if you going to do that Unless
you are a pro, but it does help when you clean the sucker from
programs you dont have anymore. :wink:

ok ovg64,

a few months ago i was using norton system works and cleansweep,
now i'm using evidence eliminator.
after unistall, i search trying to find avisynth.dll
in the system and the file isn't found no more.
now i'm installing again and finding a new prediction.
maybe i can get more CQ, if don't i call for
my secret weapon..... :arrow: black prince help and you all. :lol:

:wink:

edited:
i got with 704x480 Final CQ: 31,768
and with 480x480 Final CQ: 56,656

bp,Kwag and all... help me please.
still got low CQ.

black prince 06-08-2003 09:04 AM

@jorel,

I use ace utilities to clean the registry for links that remain after uninstalling
programs, deleting files, etc. This utility has 5 small programs that do
do a great job cleaning your HD of temp files, recycle bin, registry, etc.
Your can find a trial version (30 days) of ace utilities at download.com. Next, I
compress or defrag the registry using a batch file with the command
"scanreg /fix" written in it. This is a windows 9x/me program that creates
a backup of the registry and then compresses it. This program will restart
you computer. I defrag my HD with Diskeeper 7.0. It's fast and very good.
I also us a free anti-virus program, AVG anti-virus, at grisoft.com that has
automatic updates free and protect your HD in DOS and/or Windows. That
means if a virus won't allow you to enter Windows, it has a DOS program
to remove it. :) Both DOS and Windows are automatically updated. My
system runs like the first install after I perform these tune-ups :mrgreen:

-bp

BTW, If anyone has some great system-tune programs, let us know.

black prince 06-08-2003 09:18 AM

@Kwag,

Changing Tmpgenc's motion search to fast made a much better improve-
ment in Gibbs and picture quality. I'm doing some more testing for how
well this script acts when the target filesize is one CD (80 minute) and
the movie is 2+ hours long. I also want to see if UnDot() is really making
a difference in picture quality. It's suppose to improve Gibbs if the source
has this problem to begin with. More testing with this script and we can
determine some reasonable limits for which resolutions are recommended
for movie lengths, type of movie (action vs drama, etc). There will be
more tweaks and enhancements with this for sometime to come 8)

-bp

vhelp 06-08-2003 09:42 AM

@ all..

Hi guys !! I'm back, and I got my IVTC (via new decomb for AVIsynth v2.52) working in my finally installed AVIsynth v2.52 machine hehe :)
I haven't fully tested it, but I'm going to assume that I will have similar
results w/ my prevous decomb for v2x. It took a full days sillyness to get
where I am today :) Anyways..

@ bp..
can you elaborate on what Gibbs actaully look like. I have a feeling I know
what you are talking about, but to be quite honest w/ ya, I missed the boat
when this was started. Can you provide a picture detailing these Gibbs ??
I would really appreciate it, so that I can better refer to scenes w/ Gibbs
more accurately.

Now, if I think I know what you are talking about in Gibbs, and what I have
ben working on this weekend, IS in fact Gibbs, I may or may not have a
working (requires tweaking per Movie) few steps. I ran lots of tests last
night, and finally burned a cdrw and tested it on my 13" tv. And, they seemed
to look ok, however, on my mini HDTV (I mean) LCD screen, I did notice
the quality (less Gibbs) during play via PDVD (color set to "0")

Thanks for your help.
-vhelp


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