digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: Weird artifacts during scene changes? (http://www.digitalfaq.com/archives/avisynth/4352-avisynth-weird-artifacts.html)

zes 07-06-2003 05:47 AM

Avisynth: Weird artifacts during scene changes?
 
hi,

first of all the new avisynth scripts rock!
but, i ve noticed a few weird things (artifacts) during scene changes. (i think). anyway to help u understand what i mean i ve put a sample up:
http://users.skynet.be/bk260637/sample.mpg

any solution to the weird 'flashes'?
i use kwag's modified video.en1 btw and the latest script (july 4th)

jorel 07-06-2003 07:08 AM

zes,

i see your sample...stranges flashes! 8O

never saw it before,
seems that one frame turn(or came) to other frame.
:?

zes 07-06-2003 08:48 AM

looks like this
 
ok u can see it clearly using vdubmod, but for your comfort i ve taken some screenshots.

http://users.skynet.be/bk260637/iceage1.jpg
http://users.skynet.be/bk260637/iceage2.jpg
http://users.skynet.be/bk260637/iceage3.jpg
http://users.skynet.be/bk260637/iceage4.jpg

it happened also with other movies.

bman 07-06-2003 09:00 AM

Re: looks like this
 
Quote:

Originally Posted by zes
ok u can see it clearly using vdubmod, but for your comfort i ve taken some screenshots.

http://users.skynet.be/bk260637/iceage1.jpg
http://users.skynet.be/bk260637/iceage2.jpg
http://users.skynet.be/bk260637/iceage3.jpg
http://users.skynet.be/bk260637/iceage4.jpg

it happened also with other movies.

Must be some codec problem .
Uninstall codecs u have installed and try to encode . If it's OK then try to install one of them , try to encode , if it's OK then install one more until
u find damaged codec .
I hope this'll help .
bman

Bchteam 07-06-2003 09:15 AM

Have look at this thread.

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

It has NOTHING to do with any codec.

The Motion Adaptive Script seems to have problems with animated films.

bman 07-06-2003 10:49 AM

U are absolutely right Bchteam!!!
I checked my last encoded 3 films and guess what ???
2 of them I've encoded with last script ( TemporalSmoother in it ) and I clearly see jittering,posterization and even two frames (one on another )artifacts .
1 of movies I've made with DialHot's script ( TemporalCleaner ) in it and I can defenetly say that script with TemporalSmoother Just SUCKS :evil:
So mush artifacts on scene changes - How Could'nt I see them before ???
I have to do new encodes of those movies with DialHot's script ( with a little tweack ) and I just hate this .
@ KWAG
It's worth to pay attention to this posts cos must be some bug in MA script with TemporalSmoother :!: :!: :!: as we are getting starnge artifacts : :( :( :( :(
bman

kwag 07-06-2003 10:53 AM

@zes,

Post your script :!:
I think I know where the problem is, but I need to see your script :!:

-kwag

Bchteam 07-06-2003 10:56 AM

@ Bman

Were your Encodes animated/Cartoon Films or regular films with real actors ???

kwag 07-06-2003 11:18 AM

I think the problem is related to the scenechange and/or mode parameters on TemporalSmoother.
Example: TemporalSoften(int clip, int radius, int luma_threshold, int chroma_threshold [, int scenechange] [, int mode])
Right now, scenechange is set to 0, and mode is set to 2 on the current script. The effects you are seeing, were previously visible on regular films, when the scenechange value was not 0. The mode parameter is either 1 or 2.
So please try setting the mode to 1, and load your.avs script in vdub, and slide to those scenes that are causing problems. If a value of 1 or 2 don't eliminate the problem, try the same but with a scene change value of 1.
The current line in the script is this:
TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) ,0, 2)")
So the last two parameters are the scenechange followed by the mode (0, 2)
I can't test this because I don't have any Anime material on hand right now.

-kwag

kwag 07-06-2003 12:09 PM

I think this problem is related to "Hybrid" material :!:
I can not reproduce the problem, and I can't see that on ANY of my encodes :!:
But they all have been 23.976 FILM encodes. So this is probably related to a "Field" problem on the material. If "Force FILM" was used on DVD2AVI, I would try creating the .d2v again WITHOUT "Force FILM", and using Telecide() and Decimate() after the source line.

-kwag

Bchteam 07-06-2003 12:37 PM

I tried what you suggested, Kwag.

I changed this Line

Code:

TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) ,0, 2) ")
to

Code:

TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) ,1, 1) ")
There's no more ghosting at all... :D

But, on some scenes, the blurring is very visible. But I don't know if that is related with the TemporalSoften Problem. Can you tell me ???

bman 07-06-2003 12:54 PM

Quote:

Originally Posted by Bchteam
@ Bman

Were your Encodes animated/Cartoon Films or regular films with real actors ???

All 3 movies are regular films : Ocean 11 , The Foreigner , City by the see
I'll check KWAG's suggestion too , maybe it's really source problem 8O 8O :? :?
bman

zes 07-06-2003 01:02 PM

my script
 
Code:

## DLL Section ##
#
LoadPlugin("C:\VIDEOCONV\Filters\MPEG2Dec3.dll")
LoadPlugin("C:\VIDEOCONV\Filters\GripFit_YV12.dll")
LoadPlugin("C:\VIDEOCONV\Filters\STMedianFilter_25.dll")
LoadPlugin("C:\VIDEOCONV\Filters\asharp.dll")
LoadPlugin("C:\VIDEOCONV\Filters\unfilter_25.dll")
LoadPlugin("C:\VIDEOCONV\Filters\undot.dll")
LoadPlugin("C:\VIDEOCONV\Filters\vsfilter.dll")
#
####

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

## Main section and static filters ###
#
AviSource("C:\VIDEOCONV\iceage.avi")
#
undot()
Limiter()
asharp(2, 4)
GripCrop(528, 480, overscan=2, source_anamorphic=false)
Textsub("C:\VIDEOCONV\iceage.ssa")
GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(MaxTreshold))
MergeLuma(blur(0.2))
#
#

## 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:

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) ,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
}


#
####

It's the latest optimal script with added lines for textsub, and an .avi as source. (just for the record, these artifacts are not visible or non-existant in the .avi)
when i load the .avs in virtualdub it says avisynth gave an error in 0x0etc :?

Bchteam 07-06-2003 01:19 PM

@ zes

Just this Line

Code:

TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) ,0, 2) ")
to

Code:

TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) ,1, 1) ")
Then everything will be fine...

jorel 07-06-2003 01:40 PM

excuse me to "jump",

in Thu Jul 03, 2003 2:38 pm
http://www.kvcd.net/forum/viewtopic....r=asc&start=96
and in
Thu Jul 03, 2003 3:59 pm
http://www.kvcd.net/forum/viewtopic.php?t=4717&start=96
and few days ago,before this posts but i can't find now where they are.

i was talking about ""breathing" in each second".
can someone help me to post a sample with 1,19mb in forum?
i send to your mail..someone help me to find it...
maybe is the same cause. :?
seems it have to be with the same problem.

thanks in advance.

@ zes
the shots shows the exact points and in the sample.mpg are clear too.
thanks for "comfort"!
:lol:

kwag 07-06-2003 03:08 PM

@Bchteam,

Thanks for trying it out :D
I guess that was the problem. I just tried it on NTSC Film, and it looks fine. This was not visible on pure FILM movies. So it was probably the "Method=2" parameter that caused the problem :D
I'm double checking this just before I update the script :!:

-kwag

kwag 07-06-2003 03:11 PM

Quote:

Originally Posted by Bchteam

But, on some scenes, the blurring is very visible. But I don't know if that is related with the TemporalSoften Problem. Can you tell me ???

If you're talking specially about the scene just before scene change being more blurred, that's the way it's supposed to work :)

-kwag

Bchteam 07-06-2003 03:20 PM

Will the Final File Size increase or decrease, When I change the Temporal Soften Settings from (0,2) to (1,1) :?:

kwag 07-06-2003 03:30 PM

Quote:

Originally Posted by Bchteam
Will the Final File Size increase or decrease, When I change the Temporal Soften Settings from (0,2) to (1,1) :?:

I don't think It's going to do any difference. The glitch probably accounted for less than .5 % of the complete movie. So I wouldn't worry about CQ changes at all. You might want to try prediction on your source again, just to see if there are any differences, but I really doubt it :)

-kwag

Peter1234 07-06-2003 04:17 PM

Kwag,

Changing from

TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) ,0, 2) ")

to

TemporalSoften( fmin( round(2/nf), 6), round(1/nf) , round(3/nf) ,1, 1) ")

also got rid of the glitches I was getting when using DirectShowSource with type-1 DV files.

kwag 07-06-2003 04:19 PM

Thanks Peter,

I saw your other post ;)

-kwag

vhelp 07-06-2003 04:40 PM

hi zes..

I was trying to get back to you sooner, but I kept getting disconnected.
Anywyas, gave me time to do more encode test on your issue.

I've ben checking out "Ice Age" (my dvd disk) and those that I did do, did
not present any issues. I've pretty much tried all the MAS version there
has ben put out since last week. Actually, only issue I did find was w/ a
tad of bleeding in just one scene.. which led me to believe it was a GOP
thing cause when I changed it, it was virtually gone. But, I didn't experience
ay of your issues so far.

Below is a clip I did just to show you I wasn't getting the same issues as
you. You must be pushing the params in the MA part to extreams or
something, maybe.

My process was simple.
* dvd rip: "Ice Age"
* dvd2avi w/ Force Film on
* AVS script, into
* vdubMOD, and
* frameserved into TMPG,
.
.
* TMPG w/ 23.976 / 544x480 / VBV:56 / CQ:50 / bits:0300x2500
.
.
* MUXed aud/vid w/ bbMPEG w/ (o) MPEG-1 selected and defaults

Can't think of anything else :!:

SAMPLE vhelp.zes.ma+.filter.mpg

Good luck.
-vhelp

Peter1234 07-06-2003 07:18 PM

vhelp,
Off subject, but I couldn't resist. When I play your 544x480 mpeg1 sample in Windows media player 6.4 it plays full screen. But, when I encode mpeg1 at 544x480 it plays in a smaller window. What do you do to get full screen playback?

vhelp 07-06-2003 07:28 PM

@ Peter1234.. :)

I'm not sure I understand you.

I don't use Media Player. But, I have tested the sample, cause you asked
the question, and I was curious. Here's my result:

* when i first opend the .mpg file in media player, it was centered inside
...the window, and you could see black borders on all sides.
* when I Right-Clicked inside video window, and selected FullScreen,
...the video played WideScreen, as it should have !!

I guess you are using media player for your testings. But, you shouldn't
limit yourslef to media player. You should have PDVD and WDVD too.

When I make my test encodes, they are usually MPEG-2, but since I was
demo'ing 'ZES' what sample, I did it in the usual/familiar way that he and
others here were most comfortable with.. and based on the AD-1500 player,
case they wanted to test play it on their DVD player !! So, I made the MPEG-1
sampe instead.

But, a tip from me to you (and all) is I do my final resizing in TMPG 8O
hahhhahhhh!!! you say, "final" in tmpg ?? Yes!! That's my magic. hehe..
That's all I'm gonna say on the subject :wink:

Hope that help some.
-vhelp

Peter1234 07-06-2003 07:52 PM

Thanks vhelp,
The same thing happens for me with your sample. But even when I do my final resize in TMPGEnc, when I click full screen it doesn't really go to full screen but is in a black box that is smaller than full screen. I'll play around a see if I can figure it out.

vhelp 07-06-2003 07:59 PM

@ Peter1234..

Are you saying that you don't like WideScreen play (black bars) ??

It took me some time, to realize that Widescreen is pretty good to look at.
I was soo caught up in the Fullscreen play of TV shows and whatnots.

Today, I'm a different person. I like (and prefer) Widescreen sources.
Not to mention, that it's a bonus in our final: filesize and encoding quality :!:

-vhelp

kwag 07-06-2003 08:28 PM

Quote:

Originally Posted by Peter1234
When I play your 544x480 mpeg1 sample in Windows media player 6.4 it plays full screen. But, when I encode mpeg1 at 544x480 it plays in a smaller window. What do you do to get full screen playback?

Use WinDVD or PowerDVD to playback your samples. Don't use WMP for playback. It's a CODEC related issue :roll:

-kwag

Peter1234 07-06-2003 08:42 PM

It appears the sample was recorded using 544x480 frame size and 16:9 525 line (NTSC) aspect ratio which plays back full screen in media player (and on 4:3 TV). At least when I use that aspect ratio I get the same results. I was just curious. I normally use 4:3 aspect ratio since I don't have a wide screen TV.

vhelp 07-06-2003 09:34 PM

@ Peter1234,

Sorry to have confused you. I went back into the clip I did, since TMPG
was still open for that project. I tend to have several open. I'm busy hehe..

Anyways.. I had it left at OUT(16:9) instead of 4:3. My whole goal in my
encoding endeavors is to plan ahead. When I'm presented w/ an 16:9
source/project, I'm not going to waist time 4:3'ing it. I encode to 16:9
widescreened. Sorry for the mix up in your final judging :wink:

But, did it look ok on your TV set ?? I mean, widescreened as I planed
anyways ??

@ Kwag..
I didn't know that MediaPlayer v6.4 had a bug like that.

Thanks for YOUR input hehe..
-vhelp

Peter1234 07-06-2003 11:37 PM

vhelp,
Yes, looked good. Thankyou for your mistake.

vhelp 07-06-2003 11:45 PM

hi Peter1234..

Thanks. I was try'n ta help :)

I'm really busy crunching away at an app I'm developing, so I'm surfing
all for for answeres. It's very exhausting - - all day at it. pfew!! My eyes
are falling out 8O

-vhelp

zes 07-07-2003 02:38 AM

almost there :)
 
hello

thanks all for the replies . u've been a great help. i reencoded the movie last night and the result was much better!
BUT :) as i'm a perfectionist i noticed it was still there, although hardly visible with vdub and non-visible (to me at least) on TV.
check it out:

http://users.skynet.be/bk260637/iceage5.jpg

anyway it seems that temporalsoften is responsible like u said before, so i'll experiment with that further.

Code:

## DLL Section ##
#
LoadPlugin("C:\VIDEOCONV\Filters\MPEG2Dec3.dll")
LoadPlugin("C:\VIDEOCONV\Filters\GripFit_YV12.dll")
LoadPlugin("C:\VIDEOCONV\Filters\STMedianFilter_25.dll")
LoadPlugin("C:\VIDEOCONV\Filters\asharp.dll")
LoadPlugin("C:\VIDEOCONV\Filters\unfilter_25.dll")
LoadPlugin("C:\VIDEOCONV\Filters\undot.dll")
LoadPlugin("C:\VIDEOCONV\Filters\vsfilter.dll")
#
####

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

## Main section and static filters ###
#
AviSource("C:\VIDEOCONV\iceage.avi")
#
undot()
Limiter()
asharp(1, 4)
GripCrop(528, 480, overscan=2, source_anamorphic=false)
Textsub("C:\VIDEOCONV\iceage.ssa")
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:

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
}


#
####


Jellygoose 07-07-2003 05:46 AM

Has anyone tried to change TemporalSoften with TemporalCleaner? :roll:

jorel 07-07-2003 06:21 AM

i did Jell,
the image is better... :!:
encrease the file a little, means less CQ.

but it was before the last new script from July 6, 2003 @20:45 GMT
i don't did tests to compare with the new script :!:

and my encode still "pulsing" the colors
like i post days ago...(oh GOD) :roll:

Dialhot 07-07-2003 08:12 AM

Quote:

Originally Posted by jorel
and my encode still "pulsing" the colors
like i post days ago...(oh GOD) :roll:

If you are still with temporalcleaner, you can try to set the second parameter to a constant value (I suggest 10).

In temporacleaner(n,m), n is for the luma, m for the chroma.

Perhaps you won't have anymore the "pulsing" in the colors with a constant value for 'm'.

jorel 07-07-2003 08:25 AM

Phil,
you forgot...i don't ...how?
temporalcleaner(fmin(3+nf,7),fmin(8+nf,15))")
where?
:?:

Dialhot 07-07-2003 08:49 AM

Quote:

Originally Posted by jorel
Phil,
you forgot...i don't ...how?
temporalcleaner(fmin(3+nf,7),fmin(8+nf,15))")
where?
:?:

LOL. I Thought I was clear :-)

Temporalcleaner has two parameters : the first one is for luma, the second for chroma.

In the case of the MA script, use :

temporalcleaner(fmin(3+nf,7) , 10)

jorel 07-07-2003 09:10 AM

Phil,you are clear as water(always)
:wink:

and i am confused like ever.
:screwy:

thanks Phil :!:
:D

:ideasmiley:
@ dazed&confused :
hey d&c, change your username with me my friend.
:lol:

dazedconfused 07-07-2003 03:26 PM

Quote:

Originally Posted by jorel
:ideasmiley:
@ dazed&confused :
hey d&c, change your username with me my friend.
:lol:

:lol: hee-hee. No way friend! Believe me, I still need it!

-d&c

jorel 07-07-2003 03:45 PM

Phil my friend,
is better but ....pulsing,breating!
:cry:

who wants to see this sample?
please,pm the e-mail and i send it.
:cry: :cry:

Phil, can i send to you :?:

ps:
i think that maybe i know what happens,
but need your avaliations after see the sample:!:
:eyebrows:


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