Quantcast Avisynth: Script Challenge - Gentlemen, Start Your Editors... - Page 2 - digitalFAQ.com Forums [Archives]
  #21  
07-05-2003, 10:26 AM
Wilbert Wilbert is offline
Invalid Email / Banned / Spammer
 
Join Date: Jun 2003
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Sorry, forgot to respond ...

My script was the following:

1) Used force film in dvd2avi. Normally I would do this in AviSynth, but I was to lazy to install the newest decomb (I got some problems with the installed one).

2) Used the following script:

# LOADING QUANTIFIED MOTION FILTER SCRIPT
Import("E:\temp\QMF\qmf-1.4a1.avs")

# LOW MOTION FILTER FUNCTION
# -> SHARP RESIZING + TEMPORAL ONLY
function Low_Motion_Filter(clip c)
{
c.TemporalCleaner(5, 10)
}

# MEDIUM MOTION FILTER FUNCTION
# -> NEUTRAL BICUBIC RESIZING + TEMPORAL & SPATIAL
function Medium_Motion_Filter(clip c)
{
c.FluxSmooth(7, 7)
}

# HIGH MOTION FILTER FUNCTION
# -> SOFT RESIZING + SPATIAL ONLY
function High_Motion_Filter(clip c)
{
c.FluxSmooth(-1, 14)
UnFilter(-30, -30)
}

# OPENING VIDEO SOURCE
Mpeg2Source("E:\temp\QMF\test.d2v") # used force film in dvd2avi

# APPLYING ADAPTATIVE RESIZING FILTER (USING QMF)
QMF()

# Resulted clip contained much blocks. I used BlockBuster to reduce it a bit.
BlockBuster(method="noise")

3) Fed it in TMPGEnc with the following settings:

video tab:
- Motion search precision: highest quality
- 2-pass vbr, settings:
average bitrate 860
maxium 1200
minimum 400
enable padding

advanced tab:
- cropped the image to 352x240 (not sured whether this was the correct thing to do, but you all seemed to have done it)

quantize matrix:
- MPEG standard
- use floating point DCT
- no motion search ...
- didn't use "soften block noise", because I could see no difference

*) A final word about the script. I used the filter settings of iago (given in the same thread as QMF). I was to lazy to try other filters ...
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
  #22  
07-05-2003, 11:50 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
Ok, here's my last sample, done with the current script. I did it again, because the first sample I posted was quite a while ago, and I believe the script was not fully optimized as it is now. I used the current script as it is posted, with the following minimal adjustments necessary for the low resolution of 352x240:

Changed asharp(2, 4) to asharp(1, 4) because it was too strong for 352x240.
Processed with Telecide() and Decimate(), necessary because the original source was FILM.
Added Wavelet Noise Filter (VagueDenoiser(2,1) as a test )
Increased the filter boundary switching treshold from 2 to 3. Necessary also because of the lower resolution. The script in the "Optimized Scripts" section is really optimised for resolutions of 528x and above. Not for 352x240. So this one is
Other than that, the script is identical (same framework) as the optimal script posted. It was encoded with a MIN bitrate of 300 and a MAX of 1,200Kbps in CQ mode with a value of 72.5 Here's the sample, followed by the script listing:
www.kvcd.net/mrtibs-kwag.mpg
Code:
## DLL Section ## 
# 
LoadPlugin("C:\Filters25\MPEG2Dec3.dll") 
LoadPlugin("C:\Filters25\GripFit_YV12.dll") 
LoadPlugin("C:\Filters25\STMedianFilter.dll") 
LoadPlugin("C:\Filters25\asharp.dll") 
LoadPlugin("C:\Filters25\undot.dll")
LoadPlugin("C:\Filters25\unfilter.dll")  
LoadPlugin("C:\Filters25\VagueDenoiser.dll") 

# 
#### 

## Defined Variables and Constants ## 
# 
MaxTreshold = 1.50 

nf =  0 # Current frame.
 
# 
#### 

## Main section and static filters ### 
# 
Mpeg2Source("C:\download\test.d2v")
telecide()
decimate()
VagueDenoiser(2,1)
# 
undot() 
Limiter() 
asharp(1, 4) 
BicubicResize(336, 208, 0, 0.6, 8, 16, 336, 208)
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 >= 3 ? \ 
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) ")
AddBorders(8, 16, 8, 16)
Limiter() 
# 
# 
## Functions ### 

function fmin( int f1, int f2) { 
  return ( f1<f2 ) ? f1 : f2 
}
-kwag
Reply With Quote
  #23  
07-05-2003, 09:39 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
@ Kwag.. or anyone..

I'm playing around w/ the "script challenge".

I don't know what Limiter() does.

* What's it's function ??
* and, why do you include it twice ??

Thanks,
-vhelp
Reply With Quote
  #24  
07-05-2003, 09: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 vhelp
* What's it's function ??
Full description here: http://www.avisynth.org/index.php?page=Limiter
Quote:
* and, why do you include it twice ??
Just in case any of the filters between the first use and the end of the script decide to mess up the luma or chroma range ( Suggested by SansGrip a long time ago )

-kwag
Reply With Quote
  #25  
07-06-2003, 08:21 AM
Wilbert Wilbert is offline
Invalid Email / Banned / Spammer
 
Join Date: Jun 2003
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Yeah, I also should have included it. But there's no reason to include it twice, it only takes more time.
Reply With Quote
  #26  
07-06-2003, 10:15 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
Quote:
Originally Posted by Wilbert
But there's no reason to include it twice, it only takes more time.
I just gave an explanation why it should be used twice
There's a very good reason to include "Limiter()" or "LegalClip()" twice http://www.kvcd.net/forum/viewtopic.php?t=2071

-kwag
Reply With Quote
  #27  
07-06-2003, 10:42 AM
Wilbert Wilbert is offline
Invalid Email / Banned / Spammer
 
Join Date: Jun 2003
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Sansgrip know a lot more about programming than I do:
Quote:
The first LegalClip gets rid of out-of-range values before any other filter gets a chance to mix them up with nearby correct values, by resizing or whatever.
But to me, it seems to me that it doesn't matter whether you feed the resizers with YUV [0-255] or YUV [16-235], or anything between.
Reply With Quote
  #28  
07-07-2003, 06:32 PM
MrTibs MrTibs is offline
Free Member
 
Join Date: Aug 2002
Location: Canada
Posts: 200
Thanks: 0
Thanked 0 Times in 0 Posts
I hope you guys don't object but my final submisison includes a hacked version of MotionMask called MADMask. (It is basicly the same but used MAD to determine motion areas as well as paying special attention to edges.)

Quote:
LoadPlugin("c:\avisynth\MPEG2DEC.dll")
Loadplugin("c:\avisynth\decomblegacy.dll")
LoadPlugin("c:\projects\video\madmask\debug\madmas k.dll")
LoadPlugin("c:\avisynth\dustv5.dll")
LoadPlugin("C:\avisynth\STMedianFilter.dll")

MPEG2Source("c:\avisynth\test.d2v")

Telecide()
Decimate()


clip=STMedianFilter(10,50,8,10,10,50)
mask=MADMask(3,30,true,false)
maskedmix(temporalsmoother(5,1),clip,mask)

Pixiedust()
Encoded min 300, 1200 max, CQ 75
Reply With Quote
  #29  
07-07-2003, 08:29 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
@ MrTibs..

Sorry for coming in so late in the game here.. But as you know, I was trying
my hand at your script challenge over the weekend, but got sidewinded hehe..

Anyways, I did do a "final" encode, and I think I still have the clip some
where's but I can't seem to find the script I used. I did a no-no.. I typed
over my snips .

I'll try and remember what exactly I did. But, I'm not too sure. So, don't
be mad, if I post sample but w/ script ta back it up - - K?

I was gonna try my hand at it one more time this evening. We'll see. But,
mabe I'll post my sample for you to add to the collection anyways ??

Looking forward to hearing your directions.
-vhelp
Reply With Quote
  #30  
07-07-2003, 10:58 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
Hi guys.

Ok, here is my final encode version to add to the collection:

--> mrtibs-vhelp.mpg

In short, I ended up having to re-do from scratch, w/ trial and error encodes
a dozen times or so, before I reached a final satisfaction level, and with
5 minutes ta spare or so hehe.. or whenever this reaches its final
conclusion

Hope the next challenge is done on a better test source
-vhelp
Reply With Quote
  #31  
07-08-2003, 01:20 AM
MrTibs MrTibs is offline
Free Member
 
Join Date: Aug 2002
Location: Canada
Posts: 200
Thanks: 0
Thanked 0 Times in 0 Posts
Everyone is free to vote as they wish but I'm going to leave my voting results to my poor unsuspecting family. Once these poor suckers have been tortured enough, I'll post their comments.
Reply With Quote
  #32  
07-08-2003, 01:27 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
Submitted by MrTibs: www.kvcd.net/MrTibs_attempt2.mpg
Reply With Quote
  #33  
07-08-2003, 03:49 AM
Wilbert Wilbert is offline
Invalid Email / Banned / Spammer
 
Join Date: Jun 2003
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Can you make a poll?
Reply With Quote
  #34  
07-10-2003, 05:21 AM
Bchteam Bchteam is offline
Free Member
 
Join Date: Jan 2003
Posts: 275
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by vhelp
Hi guys.

Ok, here is my final encode version to add to the collection:

--> mrtibs-vhelp.mpg

In short, I ended up having to re-do from scratch, w/ trial and error encodes
a dozen times or so, before I reached a final satisfaction level, and with
5 minutes ta spare or so hehe.. or whenever this reaches its final
conclusion

Hope the next challenge is done on a better test source
-vhelp
Looks Great, vhelp

Can you post your script for that encode
Reply With Quote
  #35  
07-10-2003, 02:00 PM
rendalunit rendalunit is offline
Free Member
 
Join Date: Apr 2002
Location: san jose, Ca
Posts: 1,148
Thanks: 0
Thanked 0 Times in 0 Posts
when can we vote?
Reply With Quote
  #36  
07-10-2003, 05:27 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
hi Bchteam..

Bare w/ me

I just got home, and I have a number of things going on. I'll try and jugle
each items as best I can. Maybe a bit later. K? This time, I have the script.

Thanks for your OP.
-vhelp
Reply With Quote
  #37  
07-10-2003, 11:08 PM
Peter1234 Peter1234 is offline
Free Member
 
Join Date: Feb 2003
Posts: 237
Thanks: 0
Thanked 0 Times in 0 Posts
I am not sure if I am allowed to vote, but I looked at all of the videos and I thought that MrTibs_attempt2.mpeg was best. However, I couldn't find a source for MADMask. Perhaps he could post it.
Reply With Quote
  #38  
07-10-2003, 11:21 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
As requested, below is the script I used in the "test.m2v" challenge.

-vhelp
--------------------------------------------------------------

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

 ## Your MOVIE source goes here (avi or d2v)
 ## SegmentedAVISource(x)
 Mpeg2Source("h:\vfapi\test.rgb.1.d2v") 

 undot() 
 Limiter() 

 ## our MA script(s) here..
 ## --------------------------------------------------------
 converttoyuy2()
 fluxsmooth(15,10)
 converttoYV12()

 ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= 2 ? \ 
 unfilter( -(fmin(round(nf)*2, 100)), -(fmin(round(nf)*2, 100)) ) : \ 
 Convolution3d(0, fmin( round(2/nf), 6), 16, 12, fmin( round(3/nf), 6), 10, 0) ")
 ## --------------------------------------------------------

 Limiter() 

 ## Functions
 function fmin( int f1, int f2) 
  { 
    return ( f1<f2 ) ? f1 : f2 
  }
Reply With Quote
  #39  
07-11-2003, 12:27 AM
MrTibs MrTibs is offline
Free Member
 
Join Date: Aug 2002
Location: Canada
Posts: 200
Thanks: 0
Thanked 0 Times in 0 Posts
You can't find MADmask on the net because it is my personal hack. MADmask is VERY MUCH a work in progress but I'll post the filter at my first opportunity.

I am setting up a personal web page to host my filters but for now if you send my your email, I'll send you the filter. Personally, I don't think that the filter is good enough to be included with the Avisynth list but I am using it with my encodes.
Reply With Quote
  #40  
07-11-2003, 01:43 AM
Peter1234 Peter1234 is offline
Free Member
 
Join Date: Feb 2003
Posts: 237
Thanks: 0
Thanked 0 Times in 0 Posts
MrTibs,
Thanks, but I can wait until you think it is ready to post.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
KVCD Challenge - Spiderman 2 Icarus3000 Video Encoding and Conversion 18 01-12-2005 11:24 AM
Avisynth: Cut credits on 2 parts of movie? (start and end) bman Avisynth Scripting 12 05-28-2004 06:10 AM
Avisynth: A little challenge for you gurus! CheronAph Avisynth Scripting 3 09-20-2003 05:26 PM
Avisynth: Difference between MA script and optimal script? mistermickster Avisynth Scripting 2 08-01-2003 09:36 AM
HOW TO STARt using kvcd? KVCDboy Video Encoding and Conversion 5 06-27-2002 04:04 PM

Thread Tools



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