Quantcast Avisynth: Motion Adaptive Filtering Now Possible? - Page 23 - digitalFAQ.com Forums [Archives]
  #441  
06-08-2003, 10:18 AM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
@vhelp,

Gibbs Effect or mosquitos appears at the edge of objects and people,
especially when moving as a very thin wavy chrona. It's more noticable
at low CQ's and for now is believed to be a result of Tmpgenc's inability
to apply bitrate for scene changes due to motion search algo. With higher
CQ the bitrate is overused on every frame. If a new filter could trick
motion search to apply more bitrate in action scenes and less in still or
slow scenes, a lower CQ could be used and still have picture quality
similar to using higher CQ.

-bp
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #442  
06-08-2003, 10:32 AM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
ha bp..

Quote:
With higher
CQ the bitrate is overused on every frame. If a new filter could trick
motion search to apply more bitrate in action scenes and less in still or
slow scenes, a lower CQ could be used and still have picture quality

similar to using higher CQ.
..and that's just what Motion Adap.. is all about !! hehe.. right ??

Who is now working on the AVIsynth script now (fine-tuning it) ??
My head is still hurting from the spinning (reading all these pages) I had
printed out a hard copy for offline reading - over 100 pages I think.


@ bp..

Are you going to include a script in your DOWNLOADS section for this script ??
..and the all the necessary filters required for this script ??

This could really be useful and would really help lots of us out here w/ this
new script.

I just finished working out an
issue w/ the latest version of AVIsynth (v2.52) and have also D/L'ed all
filters for this version, so that I wouldn't have to later on. I'm now happy
thus far

Well, I can't wait to start trying this script out. I'm not sure if I have everytihng,
but I do hope that all work out w/ out too much issues

Thanks everyone (for all these crazy ideas - - keep them comming)
-vhelp
Reply With Quote
  #443  
06-08-2003, 10:54 AM
DKruskie DKruskie is offline
Free Member
 
Join Date: May 2003
Location: Michigan
Posts: 147
Thanks: 0
Thanked 0 Times in 0 Posts
I just happen to take a peak to see if the optimal script was changed and I found something..there is nothing assigned for the Unfilter in the script...Here is the script .

## DLL Section ##
#
LoadPlugin("C:\Filters25\MPEG2Dec3.dll")
LoadPlugin("C:\Filters25\STMedianFilter.dll")
LoadPlugin("C:\Filters25\UnFilter.dll")
LoadPlugin("C:\Filters25\asharp.dll")
LoadPlugin("C:\Filters25\undot.dll")
#
####

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

## Main section and static filters ###
#
Mpeg2Source("Your_D2V_Source_Here")
#
undot()
Limiter()
asharp(2, 4)
BicubicResize( Your_Resize_Values_Here )
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(0,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
}

#
####


David
Reply With Quote
  #444  
06-08-2003, 10:56 AM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Hi David,

Yes, you're right
I forgot to remove the "LoadPlugin("C:\Filters25\UnFilter.dll")" line
So you might as well delete it from the script.
I'll update the script later today.

Thanks,
-kwag
Reply With Quote
  #445  
06-08-2003, 12:24 PM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts


thanks for all hints bp.

i have Diskeeper 7.0, isn't installed now but is very cool.
don't know if i have ace utilities ...searching.
if i can't find it i download the trial.

a backup of the registry and then compresses it?
i never did but is the very cool hint.

thanks

ps:
i don't have fear to edit the registry cos
before this i do a ghost image.

i am writing the guide to make a boot cd with ghost that i
use for more than a year in the portuguese forum for
backup the system and i will post all in zip file
with images to burn in nero.
i'm making my little page only with images and zip files
and turn my dvi connection to dsl, than will be easy to post...
only will need that you have the ghost .exe and nero.
this i can't post.

Reply With Quote
  #446  
06-08-2003, 12:32 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
@ jorel..

Sorry for off-topic here, but..

I'd be interested in having a look at your guide
I use NGhost but could never figure out HOW to make my CDRW a bootable
disk.. I always have to insert a 3 1/2 diskette

-vhelp
Reply With Quote
  #447  
06-08-2003, 12:47 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
@ Kwag..

Sample from Page 27 (repeated here)...
* http://www.kvcd.net/red-planet-19second.mpg

Your sample above...
* Did you do this one based on a chapter ??
* OR, did you just merge a bunch of scenes gotether ??

I was hoping to give this one a shot of encode, but using 720 as my max
resolution. 544 works ok in my AD-1500, but still produces some minor
zizags on diaginals. But, that 704 res. came out pretty good on your sample though The 720 is PERFECT for me though !! For me, I'm a
step up on the higher scale of quality FWIW

Also, I noticed that on that sample above, it would seem that brighter lit
scenes, do come out nicer looking (or is it my eyes)

-vhelp
Reply With Quote
  #448  
06-08-2003, 01:21 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by vhelp
@ Kwag..

Sample from Page 27 (repeated here)...
* http://www.kvcd.net/red-planet-19second.mpg

Your sample above...
* Did you do this one based on a chapter ??
* OR, did you just merge a bunch of scenes gotether ??
I just picked a random start point, and encoded that clip. Its not different scenes merged. It's a complete un-edited 19 second encode.
Quote:
Also, I noticed that on that sample above, it would seem that brighter lit
scenes, do come out nicer looking (or is it my eyes)
Depends on the film. Usually dark scenes are bad for any MPEG-1/2 encoder, but that's where the KVCD "Notch" matrix shines

Edit: Also, play that clip with WinDVD or better yet VideoLan client player . Don't use WMP

-kwag
Reply With Quote
  #449  
06-08-2003, 01:39 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
@ Kwag..

Quote:
Edit: Also, play that clip with WinDVD or better yet VideoLan client player . Don't use WMP
Actually, my order of preference SW players are:
* PDVD v3.0 (4:3 [Change to 1024x768], 16:9 [Change to 1024x768, [x] Keep AR]
...and keep color set to "0" (for my LCD screen)
...why ? cause when viewing 16:9 encodes/DVD movies, it keeps 16:9 AR !!
* WDVD v3.0 (has no AR changing, keep colors at ( max-8 )=PDVD's)
* Zoomplayer v2.90 (if using MPEG-2, it crashes on my pc otherwise, but
...MPEG-1 and other formats ok)

Red Planet, (and others)...
When I'm doing test encodes, using smartriper v2.27, I usually just do the
first VOB or 10 chptrs, which is what I did today, unless someone asks me
to help them out w/ encoding testing or I'm debuggin a scene elsewhere.

There's always a method to my madness.. So far, so good.
-vhelp
Reply With Quote
  #450  
06-08-2003, 02:38 PM
totonho03 totonho03 is offline
Free Member
 
Join Date: Apr 2003
Location: Fallston, MD. USA
Posts: 419
Thanks: 0
Thanked 0 Times in 0 Posts
I am just soooo jealous (and full of envy) to see all of these wonderful ideas floating all around me, and not being able to at least experiment and make believe that I am learning something..... Actually, I have learned a lot just by reading the threads, not to mention the help received with conversations held with "El Maestro" Sr. Kwag. I should also mention that Mr. Black Prince and Red m, have helped a lot towards my understanding of this wonderful KVCD world you (and sometimes myself), are evolving around.
I am going to wait a little bit more for the new optimal script, and see if I can get back to releasing my stress, and create a KVCD. Meanwhile I will try to clean up my registry (Thanks Jorel and BP) and load the new version of Avisync with their respective filters

Senor Kwag: Are you planning on updating the CD test version? Just asking about it.

Thanks to you all

Totonho03
Reply With Quote
  #451  
06-08-2003, 02:43 PM
kwag kwag is offline
Free Member
 
Join Date: Apr 2002
Location: Puerto Rico, USA
Posts: 13,537
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by totonho03

Senor Kwag: Are you planning on updating the CD test version? Just asking about it.
I don't think so, because the test CD is really for testing the playback resolutions on standalone players, and they are all in there
It's really not a "quality test" CD.

-kwag
Reply With Quote
  #452  
06-08-2003, 03:04 PM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
@Kwag,

I was browsing thru old posts and came across this link:

http://shelob.mordor.net/dgraft/msmooth/msmooth.html

I haven't tried MSmooth, but it looks promising. We need a
"proactive filter for mosquitos" (as SansGrip would say). Undot(),
DCTFilter, Unfilter, etc. are worth a try if the source is already
contains Gibbs effect. But to correct this before it happens is
another issue. Give me your opinion about MSmooth


-bp
Reply With Quote
  #453  
06-08-2003, 03:19 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
@ bp..

ok, so NOW I know what Gibbs are

So, then, the other thing I was going about is relating to something else..
Great!! Ok, mov'en on..

FYI: I see that this filter is for AVIsynth v2.5
* http://shelob.mordor.net/dgraft/msmooth/msmooth.html

-vhelp
Reply With Quote
  #454  
06-08-2003, 03:26 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
.
.
About Gibbs and Encoding..
I was looking at the two pics (beore/after) and studying them. Now, I have
a few questions as a result:

* Are these gibbs produced DUE TO an effect of the encoding source materials ??
* OR, is it a LEFT-OVER artifact AFTER the encoding process ??

After looking at MSMOOTH's final result, I'm wondering if this will increase
our encoding qulaity and size, or will it not matter. I mean, I know it will
make the final encode look better. Is this a cosmetic fix to the final encode, and as a plus, decreases our size, or what.. just wanna get a better
understanding

-vhelp
Reply With Quote
  #455  
06-08-2003, 04:14 PM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kwag
@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

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,
i was trying and don't got results...
than i see that we have 2 files "video.en1" in ToK.
one file is in "opt" folder and another in "work" folder.

than i change the "video.en1" in the "opt" folder.
working faster now.
thanks.

the quality remains after the change?
i don't see more posts about this.
no one more try the change?
Reply With Quote
  #456  
06-08-2003, 04:22 PM
black prince black prince is offline
Free Member
 
Join Date: Jul 2002
Posts: 1,224
Thanks: 0
Thanked 0 Times in 0 Posts
@Kwag,

Kwag wrote:
Quote:
@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

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
I checked Tmpgenc Settings after changes and found "Motion Search Precision" is still
set to High Quality (Slow) instead of Low Quality (fast) after your change.
I manually changed motion search and Gibbs lessened even more and
the encoding time dropped by 2 hours I don't know if editing video.en1
will make this work.

@vhelp,

I tried MSmooth() instead of UNDot() and used default settings. It did
something alright. It caused the picture to be blurry, encoding time to
increase by 4 hours and of course Gibbs was decreased. This filter needs
tweaking. I commented UNdot() and MSmooth() to see if picture
quality decreased without them and it stayed the same. I will play around
more with MSmooth(), but the script appears pretty good already without
them.

-bp
Reply With Quote
  #457  
06-08-2003, 04:31 PM
jorel jorel is offline
Invalid Email / Banned / Spammer
 
Join Date: Aug 2002
Location: Brasil - MG - third stone from the sun
Posts: 5,570
Thanks: 0
Thanked 0 Times in 0 Posts
hey bp,
read my last post about the change of "video.en1" file.
works ok and faster.
Reply With Quote
  #458  
06-08-2003, 04:37 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
@ bp..

Can I vear from the topic slightly ??

Thanks bp.. right now, I'm batteling two things.
1, a slowly forming head-cold
2, Major problem getting VFAPI working.

As for line 2..
if you don't mind my vearing off slitely.. only because I'm banging my head
on this one..

1 - I've successfully installed AVIsynth v2.52, and all working great.
2 - I seem to have the filters working. I can open my captures just fine
3 - But, MAJOR issue w/ .D2V files. They won't open !! And, I need help !!

Ok, I have VFAPI v1.04 right ?? As, that's what I'm using on my MAIN pc
w/ no problems. So, I copy all my MAIN pc's files to my 2nd PC and run
the VFAPI.inf install and tell it the NEW directory (in the same as vdub)
* vdub files and directories
* dvd2avi files (including .vfp)
into a new folder on my 2nd PC and proceed to assume I installed all correctly.

* Now, when I open dvd2avi w/ a VOB file, and create my project .d2v file,
all is well.
* Then, when I open "VFAPIConv-EN.exe" and drag my .d2v file to convert,
all is well to. It converts.
* Then, when I drag the converted VFAPI.AVI file into vdub (as I do on my
MAIN pc w/ success all the time) IT DOESN'T WORK!!
I keep getting the error message: "cannot determine file type" ratts!!

So, please tell me, did I miss something ??

Thanks all, for any assistance.
-vhelp
Reply With Quote
  #459  
06-08-2003, 05:31 PM
audioslave audioslave is offline
Free Member
 
Join Date: Mar 2003
Location: Sweden
Posts: 725
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you for the tip about changing the "motion precition" in the "video.en1" file!

Now onto another problem. I have ripped a movie and I can't get correct resize values. When I open the "*.d2v" file in MovieStacker I get all info (correct I believe) but when I start encoding it in TMPGEnc I get a screwed up aspect ratio! Any ideas on why?
The movie is mixed NTSC/NTSCFilm and in the 4:3 format. In MovieStacker it says the movie is PAL and Anamorphic . When I try encoding it with those values the height gets messed up. Inversed egg-head effect (squashed)... And when I uncheck PAL and Anamorphic the aspect is correct althought the movie is not centered but sort of in the upper region of the frame - and with thick borders on the sides??? Please help me, I have no idea of what to do!
I've never had this problem before. I usually encode PAL movies and the resize values have always worked...

HEEEELP!!


EDIT: I also get a thick green line at the bottom of the frame!?
Reply With Quote
  #460  
06-08-2003, 06:04 PM
audioslave audioslave is offline
Free Member
 
Join Date: Mar 2003
Location: Sweden
Posts: 725
Thanks: 0
Thanked 0 Times in 0 Posts
Never mind my last post. I removed MovieStacker and unpacked the *.zip again to start fresh and now it works .
Don't know what happened...?
Sorry to bother you.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth: Dynamic Linear Adaptive Filtering and Scene Change Detection supermule Avisynth Scripting 3 09-15-2006 01:45 AM
Avisynth: Message from linear motion adaptive filtering? holgerschlegel Avisynth Scripting 7 08-27-2003 04:08 AM
Avisynth: Help with Linear Motion Adaptive Filtering pitoman Avisynth Scripting 2 08-05-2003 12:51 PM
Avisynth: Motion adaptive filtering good enough? bicho_visacoso Avisynth Scripting 6 06-15-2003 06:30 AM
Avisynth: AVS 2.5x Script, Motion Adaptive Filtering problems? Bchteam Avisynth Scripting 15 05-31-2003 12:38 PM

Thread Tools



 
All times are GMT -5. The time now is 08:50 AM  —  vBulletin Jelsoft Enterprises Ltd