Quantcast Avisynth: Optimal MA Script for Black & White Movies ? - digitalFAQ.com Forums [Archives]
  #1  
11-02-2003, 07:01 AM
Surfinette Surfinette is offline
Free Member
 
Join Date: Oct 2003
Location: France
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
High Kwag and team,
Hello from a happy newbie . First, thank you all for the fantastic job you've done with kvcd, especially for optimising the AVS script and making the whole process fairly easy for newbies such as me.

I would like to know if there is a way to optimize the MA Script for B&W movies, which are usually (much) less compressible than color movies?
For instance, I am currently trying to make a 1-CD kvcd from the French movie 'Les tontons flingueurs' which is 96 min long and I can't get CQ above 58 (which seems rather low).

Any suggestion to optimize the script for truly B&W movies?

Surfinette
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  
11-02-2003, 07:58 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Can we see your original script ?
Reply With Quote
  #3  
11-02-2003, 08:01 AM
Encoder Master Encoder Master is offline
Free Member
 
Join Date: Mar 2003
Location: (^_^)
Posts: 504
Thanks: 0
Thanked 0 Times in 0 Posts
If it's a black White movie you can use Dee() in your script and the quality at cq57 is much better.
Or you have to change the resolution .
Perhaps 480x576
or 352x576

Or the Max bittrate from 2500kbps to 2200 or 2000. An dyou have better CQ level.
Reply With Quote
  #4  
11-02-2003, 11:40 AM
Surfinette Surfinette is offline
Free Member
 
Join Date: Oct 2003
Location: France
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you for your answers
For your info, I use DVD2SVCD to generate my K(S)VCD
Below is a copy of my script.
The only change I made from the original script is that I do not use GripCrop and GripSize (because I have not figure out how this scrip works!) but I do not think it makes any difference

Surfinette


LoadPlugin("D:\Video\Outils Video\DVD2SVCD\\Avisynth2.5 Plugins\Mpeg2dec\MPEG2Dec3.dll")
## DLL Section ##
#
LoadPlugin("D:\Video\Outils Video\AviSynth 2.5\plugins\STMedianFilter\STMedianFilter.dll")
LoadPlugin("D:\Video\Outils Video\AviSynth 2.5\plugins\Asharp\asharp.dll")
LoadPlugin("D:\Video\Outils Video\AviSynth 2.5\plugins\UnFilter\unfilter.dll")
LoadPlugin("D:\Video\Outils Video\AviSynth 2.5\plugins\UnDot\undot.dll")
#
####

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

## Main section and static filters ###
#
mpeg2source("D:\Video\DVD2SVCD_Movie\DVD2AV~1.D2V" )
#
undot()
Limiter()
asharp(1, 4)
BicubicResize(448,384,0,0.6,25,0,672,576)
STMedianFilter(3, 3, 1, 1 )
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:

SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= SwitchThreshold ? \
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) ")

#
#
#

AddBorders(40,96,40,96)
Limiter()

#
#
## Functions ###

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

#
####
Reply With Quote
  #5  
11-02-2003, 11:58 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Try this one .... (No "LoadPlugIn ..." 's are needed!)

Code:
nf =  0 
ml =  2 #### Multiplicator / MA Motionsoften, Default = 2
mpeg2source("D:\Video\DVD2SVCD_Movie\DVD2AV~1.D2V")
BlindPP(CPU=4) 
ATC() 
undot() 
Limiter() 
BicubicResize(448,384,0,0.6,25,0,672,576) 
MergeChroma(blur(1.50)) 
MergeLuma(blur(0.1)) 
# 
## Linear Motion Adaptive Filtering ## 
# 
SwitchThreshold = 3 ## at 480 width
ScriptClip("nf = YDifferenceToNext()"+chr(13)+ "nf >= SwitchThreshold ? \ 
unfilter( -(fmin(round(nf)*ml, 200)), -(fmin(round(nf)*ml, 200)) ) : \ 
TemporalCleaner(round(4+nf), round(8+nf)) ") 
# 
###################################### 
# 
Undot() 
Blockbuster(method="noise",detail_min=1,detail_max=3,variance=0.1,seed=1) 
AddBorders(16,96,16,96) 
Limiter() 
DCTFilter(1,1,1,1,1,1,0.5,0) 
# 
###################################### 
#  
## Functions ### 
function fmin( int f1, int f2) { 
  return ( f1<f2 ) ? f1 : f2 
} 
# 
######################################
When filtering classic movies I wouldn't apply an Asharp as it is set in your Script. Cause CalssicMovies aren't that detailed and on the other hand you would enhance noise!


BTW: In your Script it seems the Addborders/width settings where set wrong?? Are you shure with your width calculations? Even the width is cropped the resized result is 448 and ...
448+16+16 = 480 .... and I assume thats what you want to encode with!

Reply With Quote
  #6  
11-02-2003, 03:04 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
In fact he uses very stange values :
Code:
AddBorders(40,96,40,96)
40 pixels for left and right margin !!! Where did you find these values ?

Note : if you want to use DVD2SVCD with gripcrop, go to the DVD2SVCD section of the forum. I put all the optimale scripts adapted to DVD2SVCD in a sticky post (updated today).
Reply With Quote
  #7  
11-02-2003, 05:17 PM
Surfinette Surfinette is offline
Free Member
 
Join Date: Oct 2003
Location: France
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Thank you all for your help

The margins I've been using were calculated from FitCD. Note that the original size of the movie is 672x720, ie pretty wide left and right margins in the first place (24 pixels each).

For Encoder Master: Where in the script would you positioned Dee(), or instead of which filter?

For incredible: What are BlindPP(CPU=4) and ATC() used for? Are these included in Avisynth 2.5? (sorry for those typical Newbies questions )

Surfinette
Reply With Quote
  #8  
11-02-2003, 07:19 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
1/ your source size is weird !

2/ the black borders included in the source shouldbe removed before making any filter on the picture. That's the purpose of the "Gripcrop" filter. Again I suggest you to go to the DVD2SVCD section of the forum to give a glance to the optimal script adapted for DVD2SVCD (and perhaps making your own starting from them).

3/ it is not "dee" but deen but I suggest you to drop this filter : it is too heavy on many sources.

4/ ATC and BlindPP (actually included in Mpeg2Dec3) are filters for avisynth 2.5. You must DL them at :

http://www.avisynth.org/~warpenterprises/
Reply With Quote
  #9  
11-02-2003, 07:32 PM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
Quote:
Originally Posted by Surfinette
Thank you all for your help

The margins I've been using were calculated from FitCD. Note that the original size of the movie is 672x720, ie pretty wide left and right margins in the first place (24 pixels each).
Well however, ... 40 pixels for left and right margin are too much!
Cause they are bigger than the overscan of your Tv! So you'll see them!

Quote:
Where in the script would you positioned Dee(), or instead of which filter?
Well in the case of your script, says the MA original, you should replace the STmedian.. Line by Deen("a2d",2,12,15) , ... set to spatial settings like this .

BUT!: As I encoded also many Classic Movies my recommendation is to use the ATC()! It cleans more the heavier Grain of old movies , although its said to use a "spatial" filter only in front of the MA routine, cause ATC is doing his job "temporal", but however it serves very well ...
If you want to use Deen("a2d",2,12,15) instead of ATC() try it and change it in my script.
Quote:
For incredible: What are BlindPP(CPU=4) and ATC() used for?
BlindPP is used for preprocessing/deblocking a block aligned (8x DCT Source image like your mpeg source.
ATC() is IMHO another very well temporal cleaner.
Quote:
Are these included in Avisynth 2.5?
No! BlindPP() is included in the mpeg2dec3.dll plugin it has to be downloaded at Warpenterprises:
http://www.avisynth.org/~warpenterpr...l_20030728.zip
Also ATC():
http://www.avisynth.org/~warpenterpr...l_20030118.zip
And Deen():
http://www.avisynth.org/~warpenterpr...l_20030119.zip
Quote:
(sorry for those typical Newbies questions )
No problem, that's why we are here
There's nobody who did not start as a newbie.

EDIT: Now recognised after submitting .. Dialhot ... answering faster and brings it better to the point
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth: Black and white or dark films? adiinbar Avisynth Scripting 1 09-20-2004 04:08 AM
Best KVCD settings for Black and white movies? Major Video Encoding and Conversion 1 09-10-2004 08:57 AM
TMPGEnc: Video black and white with a 45 degree slant Ash123 Video Encoding and Conversion 3 11-23-2003 08:23 AM
Avisynth: Black & White source? leo Avisynth Scripting 1 09-01-2003 10:19 AM
KVCD: Preview in TMPGEnc full colour, VCD black & white? tboeken Video Encoding and Conversion 1 06-12-2002 10:35 AM

Thread Tools



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