Quantcast Avisynth: Trouble with MA-Script in PAL? - Page 2 - digitalFAQ.com Forums [Archives]
Go Back    digitalFAQ.com Forums [Archives] > Video Production Forums > Avisynth Scripting

Reply
 
LinkBack Thread Tools
  #21  
07-17-2003, 06:15 PM
Avalon Avalon is offline
Free Member
 
Join Date: Jul 2003
Location: Venus
Posts: 187
Thanks: 0
Thanked 0 Times in 0 Posts
Code:
######
###         AVISYNTH-Script (für Version 2.5.2) von Avalon 
###                 DCD 4.0
###         ScriptVersion 180703/0056/Normal
######
##
## DLL Sektion ##
#
LoadPlugin("C:\Filters25\mpeg2dec3_25_dll_20030119\MPEG2Dec3.dll")
LoadPlugin("C:\Filters25\GripFit_YV12\GripFit_YV12.dll")
LoadPlugin("C:\Filters25\stmedianfilter_25_dll_20030122\Avisynth_2.5a_Version\STMedianFilter.dll")
LoadPlugin("C:\Filters25\asharp_25_dll_20030118\asharp.dll")
LoadPlugin("C:\Filters25\unfilter_25_dll_20030116\UnFilter_Avisynth_2.5_Alpha\UnFilter.dll")
LoadPlugin("C:\Filters25\undot_25_dll_20030118\UnDot.dll")
LoadPlugin("C:\Filters25\decomb_25_dll_20030327\decomb406b7\Decomb.dll")
####
##
#
####

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

## Main section and static filters ###
#
Mpeg2Source("E:\dcd\test25\2.d2v")
#
FieldDeinterlace() 
undot()
Limiter()
asharp(1, 4)
GripCrop(352, 288)
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:

SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
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
}

#
####
Is this OK?
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-17-2003, 06:27 PM
Avalon Avalon is offline
Free Member
 
Join Date: Jul 2003
Location: Venus
Posts: 187
Thanks: 0
Thanked 0 Times in 0 Posts
I used the MA Script. I only add an Deinterlacer.

This was the Output. Original 352x288



What can I do, to get the blocky picture smoother?[/IMG]
Reply With Quote
  #23  
07-17-2003, 06:40 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
yes,
just like i post here many times ago and today,and i see more..
the skin color is too green(means less red) and see the white
in her eyes are yellow/green too!

see my last post trying to explain it...
Posted: Thu Jul 17, 2003 8:45 pm here:
http://www.kvcd.net/forum/viewtopic.php?t=4983&start=16


Reply With Quote
  #24  
07-17-2003, 06:46 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Avalon
What can I do, to get the blocky picture smoother?[/IMG]
Raise the CQ
Reply With Quote
  #25  
07-17-2003, 06:52 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
i'm back to answers Phil!

if with 480x480 in 83 minutes movie i got blocky and
"everybody" with more resolution(544x or 702x)with more than 83 minutes
don't got blocks...
the script is the same used for all...
if i "Raise the CQ" the final file size will encrease,of course and i say
bye,bye to one cdr 700mb.

what i do?
Reply With Quote
  #26  
07-17-2003, 07:01 PM
Avalon Avalon is offline
Free Member
 
Join Date: Jul 2003
Location: Venus
Posts: 187
Thanks: 0
Thanked 0 Times in 0 Posts
If I use this script:

Code:
#======================================================#
# -= AviSynth script by MovieStacker v2.0.0 (beta3) =- #
#======================================================#

LoadPlugin("C:\Programme\MovieStacker\Filters\MPEG2Dec.dll")
LoadPlugin("C:\Programme\MovieStacker\Filters\DecombLegacy.dll")
LoadPlugin("C:\Programme\MovieStacker\Filters\GripFit_preview.dll")
LoadPlugin("C:\Programme\MovieStacker\Filters\BlockBuster.dll")
LoadPlugin("C:\Programme\MovieStacker\Filters\UnFilter.dll")
LoadPlugin("C:\Programme\MovieStacker\Filters\LegalClip.dll")

Mpeg2Source("E:\dcd\test25\testfinal.d2v")
LegalClip()
FieldDeinterlace()
GripCrop(352, 288, overscan=1)
GripSize(resizer="BilinearResize")
UnFilter(50, 50)
TemporalSmoother(1, 2)
MergeChroma(blur(1.58))
MergeLuma(blur(0.2))
BlockBuster(method="noise", detail_max=7, seed=1)
GripBorders()
LegalClip()
The Output will be this: Original again 352x288



Why? Can I get of of the blocks or not?

Min.Bit 300; Max.Bit. 1800; CQ 60.

I´ll try it again with CQ 90...

AviSynthSwitcher: I fixed the problem. I looked into the folder of the program. I found older versions of AVISynth and updated it to 2.0.8 and 2.5.2. Now i can switch without problems!!!!!
Reply With Quote
  #27  
07-17-2003, 07:10 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
@Avalon,

Blockbuster(noise) is not effective with CQ. Use CQ_VBR for resolutions of 352x240(28.

-kwag
Reply With Quote
  #28  
07-17-2003, 07:24 PM
Avalon Avalon is offline
Free Member
 
Join Date: Jul 2003
Location: Venus
Posts: 187
Thanks: 0
Thanked 0 Times in 0 Posts
Now i tested all.

d2v directly loaded in TMPGEnc:



sometimes blocky.

d2v across AVS 2.0.8 (KVCD Script):



blocky

d2v across AVS 2.5.2 (MA Script):



The hole sample blocky!!!
Reply With Quote
  #29  
07-17-2003, 07:27 PM
Avalon Avalon is offline
Free Member
 
Join Date: Jul 2003
Location: Venus
Posts: 187
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Blockbuster(noise) is not effective with CQ. Use CQ_VBR for resolutions of 352x240(28.
I´ll try it...

Result:



now i try it with 2.5.2...
Reply With Quote
  #30  
07-17-2003, 07:33 PM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by jorel
i'm back to answers Phil!

if with 480x480 in 83 minutes movie i got blocky and
"everybody" with more resolution(544x or 702x)with more than 83 minutes
don't got blocks...
the script is the same used for all...
if i "Raise the CQ" the final file size will encrease,of course and i say
bye,bye to one cdr 700mb.

what i do?
You :

1/ lower the min video rate to 64Kbs (I encode everything at this rate)
2/ lower the audio rate to 112
3/ lower the res to 352*480
4/ blur the chroma to 1.58 insteed of 1.50 (Maxthreshold in the MA script)
4/ use TemporalCleaner(6+nf,13+nf) insteed of temporalsoften
5/ add DCT(1,1,1,1,1,1,0.5,0) at the end of the script
6/ blur luma a little bit more (0.2)
7/ add Dup(threshold=1,blend=true) just before DCT
8/ use an overscan of 2

Do this step by step until you have correct result. I generaly stop to 5 even with movie monger than 1h40 !

And finaly, if nothing works, change the movie

PS: I forgot "0/ use a 90min CD" )
Reply With Quote
  #31  
07-17-2003, 07:38 PM
Avalon Avalon is offline
Free Member
 
Join Date: Jul 2003
Location: Venus
Posts: 187
Thanks: 0
Thanked 0 Times in 0 Posts
@ Dialhot: Can u post your script?
Do U use CQ or VBR_CQ?

Will it be like this?

Code:
######
###         AVISYNTH-Script (für Version 2.5.2) von Avalon 
###                 DCD 4.0
###         ScriptVersion 180703/0246/Normal
######
##
##          Es werden alle Filter geladen, aber nicht alle sind aktiviert. Um dies zu ändern
##          entfernt die # vor den jeweiligen Zeilen.
##
## DLL Sektion ##
#
LoadPlugin("C:\Filters25\mpeg2dec3_25_dll_20030119\MPEG2Dec3.dll")
LoadPlugin("C:\Filters25\GripFit_YV12\GripFit_YV12.dll")
LoadPlugin("C:\Filters25\stmedianfilter_25_dll_20030122\Avisynth_2.5a_Version\STMedianFilter.dll")
LoadPlugin("C:\Filters25\asharp_25_dll_20030118\asharp.dll")
LoadPlugin("C:\Filters25\unfilter_25_dll_20030116\UnFilter_Avisynth_2.5_Alpha\UnFilter.dll")
LoadPlugin("C:\Filters25\undot_25_dll_20030118\UnDot.dll")
LoadPlugin("C:\Filters25\decomb_25_dll_20030327\decomb406b7\Decomb.dll")
LoadPlugin("C:\Filters25\dctfilter_25_dll_20030221\DctFilter.dll")
LoadPlugin("C:\Filters25\temporalcleaner_25_dll\TemporalCleaner.dll")
LoadPlugin("C:\Filters25\dup220b1/Dup.dll")
#
####
##
##
## Definierte Variablen und Konstanten ##
#
MaxTreshold = 1.50
nf =  0 # Current frame.
#
####
#
##### Haupt Sektion und statische Filter ###
#
Mpeg2Source("tragt hier den Pfad zu Eurer d2v-Datei ein.")
#
# z.B.          MPEG2Source("C:\dcd\dvd.d2v")
undot()
Limiter()
asharp(1, 4)

GripCrop(352, 288)

GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(1.58))
MergeLuma(blur(0.2))

FieldDeinterlace()
TemporalCleaner(6+nf,13+nf) 

# ( 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 >= 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
}

Dup(threshold=1,blend=true)
DctFilter(1,1,1,1,1,1,0.5,0)

#
########
Reply With Quote
  #32  
07-17-2003, 07:45 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
Hi Avalon,

When you have some time, and I mean a very long time , take a look at this (LONG) thread: http://www.kvcd.net/forum/viewtopic.php?t=2073
There you'll find all the tests we made, comparing CQ vs. CQ_VBR.

-kwag
Reply With Quote
  #33  
07-17-2003, 07:54 PM
Avalon Avalon is offline
Free Member
 
Join Date: Jul 2003
Location: Venus
Posts: 187
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks!

I´ll look to Your samples:

Quote:
Here's another view. Please pay special attention to the water and fire scenes:

These are shorter samples:
http://www.kvcd.net/k19-cq-vbr.m1v
http://www.kvcd.net/k19-cq.m1v
Reply With Quote
  #34  
07-17-2003, 08:49 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 Avalon
Thanks!

I´ll look to Your samples:

Quote:
Here's another view. Please pay special attention to the water and fire scenes:

These are shorter samples:
http://www.kvcd.net/k19-cq-vbr.m1v
http://www.kvcd.net/k19-cq.m1v
and more:
frame 86 in vdubmod:
the cord(cable) between the leg of the guy walking
and the head of other guy..in cqvbr show strange artefacts,cq is clean,
and more details in this scene,easy too see.

frame 140 in the water,cq is champion comparing with cqvbr.
frame 208 in the fire,cq is champion comparing with cqvbr that is blocky.
frame 290 with H.Ford,cq is champion again comparing with cqvbr.
and in general details cq is better!

ps:

the strange:
H.Ford seems to me , but i'm really much more beautiful!

hey,....but he have more hair.
Reply With Quote
  #35  
07-17-2003, 08:53 PM
Avalon Avalon is offline
Free Member
 
Join Date: Jul 2003
Location: Venus
Posts: 187
Thanks: 0
Thanked 0 Times in 0 Posts
This is quite good... Im on page 39 of 43

Quote:
0. Encoder: Use TMPGEnc
1. Matrix: Q.Matrix Notch
2. Rate control mode: CQ (use ToK to predict value)
3. Min BR: does not really matter. Use 0.
4. Max BR: 2520
5. GOP: 1-24-2-1-24 (for cartoons 1-12-2-1-15 NTSC, 1-24-2-1-12 PAL)
6. Res: 528x480
7. Stream: MPEG-1 if the average video BR < 1800, MPEG-2 otherwise.
8. Don't detect scene change
9. Use Moviestacker, load the suggested script for KVCDx3 and tweak it to match the "Latest Optimal Script". Use Gripfit and Bicubic resize. Use overscan = 2.
10. Motion search precision: Use High Quality
11. DC component precision: 8 bit
12. Audio: 128 kbps, Joint stereo
13. VBV buffer size: 0 (Auto)
14. Picture spoilage: 0 0
15. No motion search for still picture part by half pixel: Checked
16. Soften block noise: Unchecked
17. Burn as SVCD if your player supports it, else use VCD.
18. File prediction factor: 0.98
19. In NTSC, use Force Film if possible, IVTC if Telecined, and Deinterlace as a last resort.
20. Don't use "Add SVCD scan offsets" nor "Align sequece headers".
21. Use CD size 810 and overburn a minute or so if your CD-Writer supports it. Use 8x at most when overburning.
And Kwags replay:

Quote:
Hi r6d2,

A couple of corrections on the latest achievemnts and findings :

"3. Min BR: does not really matter. " Use 0. -> If your player supports going down to 0, by all means use it
Most DVD players have problems below 300Kbps, so we settled for 300 as a safety factor.

"7. Stream: MPEG-1 if the average video BR < 1800, MPEG-2 otherwise." -> I would say up to 2,500, use MPEG-1. Above that, use MPEG-2.

"10. Motion search precision: Use High Quality" -> If you are going to use the new motion adaptive script for AviSynth 2.52, change that to "Motion Estimation". It produces better video with less visible artifacts.

"12. Audio: 128 kbps, Joint stereo" -> Joint stereo is a No No
Use "Dual channel", and you can also go down to 112Kbps if you encode with HeadAC3he. If you encode "Joint Stereo", you will kill "Surround 2" signals, and the sound will be messed up on a Prologic II receiver.

"13. VBV buffer size: 0 (Auto)" -> Don't use auto Use TMPEG's default. It's more compatible.

"15. No motion search for still picture part by half pixel: Checked" -> Uncheck that

Everything else is fine
Reply With Quote
  #36  
07-17-2003, 08:58 PM
Avalon Avalon is offline
Free Member
 
Join Date: Jul 2003
Location: Venus
Posts: 187
Thanks: 0
Thanked 0 Times in 0 Posts
My last test will go with Motion Estimation and the MA-Script in 528x576...

I´m very tired!!!! Now in Germany it is 3:57 AM and I´ve today a long day...

Good night everyone (or goodmorning...)

BTW...

can I edit the Video.en1-file to VBR-CQ or Motion Estimation ?

An nother question...

is there a good Deinterlacer out... where and if posible a sample ASV-Script...
Reply With Quote
  #37  
07-17-2003, 09:35 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
@ Avalon
good night my friend!

i'm using fielddeinterlace(decomb) but maybe someone can show us
another better choice.

@ Phil
ok friend,i will try all of your recomendations posted....
seems a "brain surgery" in the script!

thank you very much!
Reply With Quote
  #38  
07-18-2003, 02:50 AM
Avalon Avalon is offline
Free Member
 
Join Date: Jul 2003
Location: Venus
Posts: 187
Thanks: 0
Thanked 0 Times in 0 Posts
I changed the testing source... The Princess Blade sample wasn´t the good choice!!!!

I´ll try it now with the full Tomb Raider 2 Trailer out of a DVD...
Looks better...

Post U then my results...
Reply With Quote
  #39  
07-18-2003, 05:03 AM
Dialhot Dialhot is offline
Free Member
 
Join Date: May 2003
Posts: 10,463
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Avalon
@ Dialhot: Can u post your script?
I don't have it here at the office so I'll just modify you own script to show you where are the errors.

Quote:
Do U use CQ or VBR_CQ?
CQ

Now the script :

MaxTreshold = 1.50
nf = 0 # Current frame.

Mpeg2Source("tragt hier den Pfad zu Eurer d2v-Datei ein.")
undot()
Limiter()
asharp(1, 4)

GripCrop(352, 28 <-- you can try (352,576)

GripSize(resizer="BicubicResize")
STMedianFilter(8, 32, 0, 0 )
MergeChroma(blur(1.5)
MergeLuma(blur(0.2))

FieldDeinterlace()
TemporalCleaner(6+nf,13+nf) <-- REMOVE

SwitchThreshold = (Width<=352) ? 4 : (Width<=480) ? 3 : 2
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) ") <-- REPLACE by the "TemporalCleaner" line shown above

GripBorders()
MovieStacker!
Limiter()

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

Dup(threshold=1,blend=true) <-- move before function
DctFilter(1,1,1,1,1,1,0.5,0) <-- move before function

#
########[/code][/quote]
Reply With Quote
  #40  
07-18-2003, 06:48 AM
Wilbert Wilbert is offline
Invalid Email / Banned / Spammer
 
Join Date: Jun 2003
Posts: 45
Thanks: 0
Thanked 0 Times in 0 Posts
Two mistakes:

1) You smooth before deinterlacing. Deinterlace first and then do the rest.

2) You sharp first and then smooth again. Better do it the other way around.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
AviSynth trouble after reinstall? the viking Avisynth Scripting 2 11-04-2004 06:57 AM
VirtualDub: trouble when loading script.avs in VDub HC_Pensador Video Encoding and Conversion 8 05-26-2004 08:07 AM
KVCD: trouble getting the desired output from the script? Jimblob Video Encoding and Conversion 12 04-30-2004 05:44 PM
Avisynth: Trouble with GripCrop in the MA script! audioslave Avisynth Scripting 17 07-08-2003 11:19 AM
Avisynth: AC3 Trouble hedix Avisynth Scripting 19 04-02-2003 01:00 PM




 
All times are GMT -5. The time now is 05:33 AM  —  vBulletin © Jelsoft Enterprises Ltd