Quantcast Avisynth: Script Challenge - Gentlemen, Start Your Editors... - digitalFAQ.com Forums [Archives]
  #1  
06-05-2003, 06:15 PM
MrTibs MrTibs is offline
Free Member
 
Join Date: Aug 2002
Location: Canada
Posts: 200
Thanks: 0
Thanked 0 Times in 0 Posts
This is a friendly contest for the best script to clean and encode a very noisy analog capture. To make everything fair, I've provided a sample avi to work against.

The rules are simple:

- use any version of Avisynth you choose.
- use any filter existing or new you want
- quality, not speed, is the focus
- use any TMPGEnc templates or filters you want
- post you best attempt to this thread
- no nasty bashing of other's scripts (friendly bashing is OK)
- the final results will be based on an 120 min MPeg1 encode (settings
estimated based on length of sample)
- the contest ends July 7

Here is here is the correct clip:

www.kvcd.net/test.m2v (5.15Mb, Mpeg2, 352x240)

After July 7th, we'll vote on the results.
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
  #2  
06-05-2003, 10:27 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
hey cool idea!

Quote:
Originally Posted by MrTibs
- the final results will be based on an 120 min MPeg1 encode (settings
estimated based on length of sample)
The source for the two hour mpeg-1 encode is the same capture right? If so then you have something like a 30 gig capture on your hard drive for one month Cool By settings you mean TMPG cq value settings right?

sorry for all the questions
Thanks,
ren
Reply With Quote
  #3  
06-05-2003, 10:49 PM
MrTibs MrTibs is offline
Free Member
 
Join Date: Aug 2002
Location: Canada
Posts: 200
Thanks: 0
Thanked 0 Times in 0 Posts
Right.

By settings I mean the TMPG CQ and various settings. I think we need to include the while encoding process because what we see go into TMPG isn't always what we see coming out. (Sometimes things look better AFTER they are encoded and TMPG also has filters that could be used to further improve the results.)

So, the final file of the test MPEG video should have the correct bits/sec. ratio that we would see in a 120 min. encode.
Reply With Quote
  #4  
06-06-2003, 06:22 AM
GFR GFR is offline
Free Member
 
Join Date: May 2002
Posts: 438
Thanks: 0
Thanked 0 Times in 0 Posts
Your sample didn't look all that bad, to me.

Anyway, here's the code I used for my last capture.

Code:
LoadPlugin("C:\Arquivos de programas\DVD2SVCD\MPEG2Dec\Cnr2.dll")
LoadPlugin("C:\Arquivos de programas\DVD2SVCD\MPEG2Dec\GuavaComb.dll")
LoadPlugin("C:\Arquivos de programas\DVD2SVCD\MPEG2Dec\MJPEGCorrect.dll")
LoadPlugin("C:\Arquivos de programas\DVD2SVCD\MPEG2Dec\Ghostbuster.dll")
LoadPlugin("C:\Arquivos de programas\DVD2SVCD\MPEG2Dec\Dup.dll")
LoadPlugin("C:\ARQUIVOS DE PROGRAMAS\MOVIESTACKER\Filters\DecombLegacy.dll")
LoadPlugin("C:\ARQUIVOS DE PROGRAMAS\MOVIESTACKER\Filters\MPEG2Dec.dll")
LoadPlugin("C:\ARQUIVOS DE PROGRAMAS\MOVIESTACKER\Filters\Convolution3D.dll")
LoadPlugin("C:\ARQUIVOS DE PROGRAMAS\MOVIESTACKER\Filters\STMedianFilter.dll")
LoadPlugin("C:\ARQUIVOS DE PROGRAMAS\MOVIESTACKER\Filters\DustV5.dll")
LoadPlugin("C:\ARQUIVOS DE PROGRAMAS\MOVIESTACKER\Filters\UnFilter.dll")
LoadPlugin("C:\ARQUIVOS DE PROGRAMAS\MOVIESTACKER\Filters\LegalClip.dll")

AviSource("C:\Meus documentos\capture_1.00.avi")
Trim(166,0)
Trim(0,18301)
MJPEGCorrect()
Ghostbuster(11,11)
Crop(16,102,-16,-109)
Levels(16,1.1,200,16,235)
Telecide()
Decimate(cycle=5) 
Dup()
Cnr2()
UnFilter(50, 50)
STMedianFilter(8, 32, 0, 0, 8, 32)
SpaceDust()
TemporalSmoother(1, 2)
MergeChroma(blur(1.50))
MergeLuma(blur(0.2))
Convolution3D(preset="animeBQ")
GuavaComb(Mode = "NTSC", Recall = 83, MaxVariation = 23, Activation = 40)
AddBorders(16,102,16,109)
LegalClip()
Some notes:
1) the capture (Final Fligth of Osiris) was in 352x480, Main Concept MJPEG @ 75% (so the MJPEG correct line)
2) encoded to SKVCD (352x480 mpeg-2)
3) The level line is because this particular TV station is somewhat dark.
4) Besides the "usual" smoothing filters, some specific filters good for captures are Cnr2 (Marc FD) and GuavaComb.
5) SansGrip's port of Ghostbuster (not Blockbuster) is to remove ghosts. You can find the appropriate numbers using Virtualdub's exorcist filter or using the automatic setting feature of the built-in ghost eliminator in TMPGEnc (not too reliable).
6) IVTC because the movie was telecined.
Reply With Quote
  #5  
06-06-2003, 08:36 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
@ MrTibs..

I think you made a mistake by U/L'ing the wrong .AVI clip

You U/L'ed an already filtered clip !!
* 23.976 fps (you performed an IVTC)
* you did a temporal or 3d or convolution on this clip

Based on the above, we really can't give you an honest filtering for YOUR
given clip, if you've already filtered it

Is this source from Cable, and then recorded to VHS, and now you
are capturing those VHS tapes ??

If you are having trouble w/ U/L'ing a reasonable sized .AVI, then just
do the following:
* get rid of the audio (every little bit helps (for bandwidth reasons))
* give us more meat, 2 to 5 seconds, and at least one scene change.
* and finally, use winRAR and compress it - don't worry about the compression.
...it will look just fine, and wont taint your .AVI file any.

Don't worry about the size too much. Even if it's 20mb or more. Just let
us know in advance, and we can make the decision to give your clip a go
or not. The more we have to play with, the better are our (your) chances
w/ us helping you. K?

Have a good evening !!
-vhelp
Reply With Quote
  #6  
06-07-2003, 03:19 AM
MrTibs MrTibs is offline
Free Member
 
Join Date: Aug 2002
Location: Canada
Posts: 200
Thanks: 0
Thanked 0 Times in 0 Posts
@vhelp

Um... Ya you're right.

I will get the correct file to Kwag to post as soon as I can.

Thanks.
Reply With Quote
  #7  
06-07-2003, 10:52 AM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
hi MrTibs..

you're welcomed.

Listen, about the winRAR thing.. I does work pretty well, when you are
strapped for space and wanna get as much out for others to work with.
winZIP doesn't save much space at all.

winRAR...
When inside, if you select [x] Create solid archive, it will create the
smallest filesize as possible. I also use [x] Use multimedia compression as well.
Follow it with an Compression method [BEST] and you should have
as smallest filesize as possible for an .AVI/MPEG/MOV .RAR file.

And, if you really want to make things interesting, give us all a good size
file to D/L and we will all have some fun (when we finally get it D/L'ed)
I've D/L'ed 35mb and higher even. But, you make it what you want in
size. If you're not sure about final size (after testing compressions) post
a poll here as to what size would peoples want, in working with.

Give that a shot, k?

Good luck dude
-vhelp
Reply With Quote
  #8  
06-12-2003, 01:20 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
Quote:
Originally Posted by MrTibs
Here is here is the correct clip:

www.kvcd.net/test.a2v (5.15Mb, Mpeg2, 352x240)
links not working- maybe should be m2v?
Reply With Quote
  #9  
06-12-2003, 01:41 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
Should be www.kvcd.net/test.m2v

-kwag
Reply With Quote
  #10  
06-12-2003, 02:57 PM
MrTibs MrTibs is offline
Free Member
 
Join Date: Aug 2002
Location: Canada
Posts: 200
Thanks: 0
Thanked 0 Times in 0 Posts
Again?
Reply With Quote
  #11  
06-12-2003, 05:01 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
And where do we send the results

Also, that sample is 12 seconds. So I assume, that if we encode assuming a target of 800MB without audio to simplify matter, we're talking at MAX ~1.333MB for the sample

-kwag
Reply With Quote
  #12  
06-12-2003, 05:14 PM
MrTibs MrTibs is offline
Free Member
 
Join Date: Aug 2002
Location: Canada
Posts: 200
Thanks: 0
Thanked 0 Times in 0 Posts
I would suggest that you post your best script here in this thread. For those who are interested in judging, we would download the sample scripts and TMPG instructions then encode them ourselves. (This will save a lot of bandwidth.)

Once all the scripts are in, we'll judge the entries and pick the best one.

Perhaps we could post screen shots of the Mpeg1 encodes from top three scripts.

Edit: Yes your 1.33 file size seems correct. Lets keep it simple.
Reply With Quote
  #13  
06-12-2003, 05:33 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
Ok, so here's my script, which is just a slight mod to the current script:

Code:
Set TMPEG resolution to 352x240. Bitrates MIN=300 MAX=1,150 CQ=75

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

#
####

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

## Main section and static filters ###
#
Mpeg2Source("C:\Downloads\test.d2v")
telecide()
decimate()
#
undot()
Limiter()
#asharp(2, 4)
BicubicResize(352, 240, 0, 0.6, 0, 0, 352, 240)
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) ")

#
#
#

Limiter()

#
#
## Functions ###

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

#
####
First, I did a .d2v project with DVD2AVI. The source reads as 29.97fps, but the original was shot FILM, as you can clearly see it has been telecined.
So I had to use Telecide and Decimate, so I could encode back at 23.976fps.
I also commented the line asharp(2, 4), because the source is too noisy.
Here's my result with this script: www.kvcd.net/mrtibs-contest.mpg

-kwag
Reply With Quote
  #14  
06-12-2003, 07:20 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
pal ..tibs,

Suggestion.. ..
For everyone that participates w/ an U/L clip, could you please add them
to your main page here, so that all the sample clips are always at the top
of this page. I mean, it's ok that participants post in their thread, but when
you spot them (at your leasure) you could inlcude them as then come in,
on top here. That would be most greatful of you
Then, if anyone adds a new clip, just revise this thread and INSERT in
between the {code} new contestant {/code} (see below)
..just trying to help you out. This could be used in other future events
like these. Course, the agenda could change to suite the occation, and
you could format (below) any way that suites your fancy
And, you could describe your test clip there too.

Oh, replace the "{" and "}" w/ "[" and "]" (else it would cause hauvic over
here)

Quote:
TEST SOURCE: "test.m2v"

Contestant...CLIP......... details ..... ..... ..... ..... ..... ..... .....
----------------------------------------------------------------------
kwag............mrtibs-contest.mpg
rendalunit.....xxx.mpg
vhelp............xxx.mpg
----------------------------------------------------------------------
EDIT 2: how about htis one above??

Well, it was a thought.

I'm sort of busy at the moment w/ too many things going on, but I'll D/L
your test clip right away !!

K pal ?? .. k-pasa ??
-vhelp
Reply With Quote
  #15  
06-12-2003, 09:44 PM
vhelp vhelp is offline
Free Member
 
Join Date: Jan 2003
Posts: 1,009
Thanks: 0
Thanked 0 Times in 0 Posts
@ Kwag..

finally, finished watching all of Red Planet (only saw half, till now)
and it was a great Movie

I've also ben encoding various sections of this Movie, since. Lots of bad,
dark background. And, I'm jugling this and another (capture) encode
project too at the moment .. (project for someone) Anyways..

..that was a good clip, Kwag. ..your sample, that is

would be a great idea for widescreen capture too test, too. Anyways..
I hope to see more contestants joining in here. Com'on... tomorrow's
TGIF

-vhelp
Reply With Quote
  #16  
06-18-2003, 09:25 PM
MrTibs MrTibs is offline
Free Member
 
Join Date: Aug 2002
Location: Canada
Posts: 200
Thanks: 0
Thanked 0 Times in 0 Posts
Well, here is my script.

Quote:
#Set TMPEG resolution to 352x240. Bitrates MIN=300 MAX=1,150 CQ=79.5

LoadPlugin("c:\avisynth\MPEG2DEC.dll")
loadplugin("c:\avisynth\decomblegacy.dll")
LoadPlugin("c:\avisynth\dustv5.dll")
LoadPlugin("C:\avisynth\STMedianFilter.dll")

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

Telecide()
Decimate()

STMedianFilter(10,50,8,10,10,50)
MergeChroma(blur(1.5))
MergeLuma(blur(0.2))

clip=blur(1.0)
mask=MotionMask(1,12,false)
maskedmix(temporalsmoother(4),clip,mask)

Pixiedust()
Same process as Kwag but using Avisynth 2.0.
Reply With Quote
  #17  
06-18-2003, 10:14 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
Here's MrTibs mpeg sample: www.kvcd.net/MrTibs_4.mpg

Edit: And looks more clean than my sample. A little more blured, but It's necessary for that noisy material. Sample is very stable

-kwag
Reply With Quote
  #18  
06-18-2003, 10:28 PM
MrTibs MrTibs is offline
Free Member
 
Join Date: Aug 2002
Location: Canada
Posts: 200
Thanks: 0
Thanked 0 Times in 0 Posts
Aw shucks Thanks Kwag.

Edit: The blurring is only in motion areas. I've been working on developing in-frame motion smoothing. This clip is pretty bad and since it is only 352x240, there isn't much to work with. The idea is there though but a better mask filter is needed. (I'm working on that.)
Reply With Quote
  #19  
06-30-2003, 04:20 PM
Wilbert Wilbert is offline
Invalid Email / Banned / Spammer
 
Join Date: Jun 2003
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
I finished my example. I can be found here:

http://www.geocities.com/wilbertdijk...bs-wilbert.mpg
Reply With Quote
  #20  
07-05-2003, 12:36 AM
MrTibs MrTibs is offline
Free Member
 
Join Date: Aug 2002
Location: Canada
Posts: 200
Thanks: 0
Thanked 0 Times in 0 Posts
@Wilbert

Great sample, how about a script to go with it?
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 01:26 PM  —  vBulletin © Jelsoft Enterprises Ltd