digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: How to set the subs in the black borders? (http://www.digitalfaq.com/archives/avisynth/6027-avisynth-how-set.html)

perrera 10-10-2003 07:44 AM

Avisynth: How to set the subs in the black borders?
 
Hi,
I have problems with this script.. the idea is to set the subs in the black borders. In the PC its looks great, but in my DVD player (other KVCD working), half of the screen is in green lines...

Anyone can help me? :cry:

Code:

AviSource("C:\**.avi",false)
 
GripCrop(528, 480, overscan=1, source_anamorphic=false)

Crop(30, 0, -30, -30)
AddBorders(0,70,0,70)

TextSub("C:\**.ssa")

GripSize(resizer="BicubicResize")
Undot()
TemporalSoften(2,7,7,3,2)

Thanks

kwag 10-10-2003 08:15 AM

Hi perrera,

What about 544x480 :idea:

-kwag

Gamecraze 10-18-2003 08:21 PM

Script Problem
 
My 1st script, just doesnt want to work. Somebody help mabey?


## DLL Section ##
#
LoadPlugin("E:\kvcd\Filters\MPEG2Dec3.dll")
LoadPlugin("E:\kvcd\Filters\Grip.dll")
LoadPlugin("E:\kvcd\Filters\STMedianFilter.dll")
LoadPlugin("E:\kvcd\Filters\asharp.dll")
LoadPlugin("E:\kvcd\Filters\unfilter.dll")
LoadPlugin("E:\kvcd\Filters\undot.dll")
#
####

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

## Main section and static filters ###
#
AviSource("E:\kvcd\Witch Hunter Robin - 01.avi")
ConvertToYUY2()
swapuv()
ConvertToYUY12()
#
undot()
Limiter()
asharp(1, 4)
GripCrop(352, 240, source_anamorphic=false)
GripSize(resizer="BilinearResize")
GripBorders()
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 >=

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) ")

#
#
#

GripBorders()
#LetterBox( Your_Values_Here ) # Depends on situation. Use

MovieStacker!
Limiter()

#
#
## Functions ###

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

#
####

kwag 10-18-2003 08:57 PM

Hi Gamecraze,

What's the error displayed when you open your .avs in Vdub or in WMP :?:
Your script looks fine.

Edit:

This is wrong: ConvertToYUY12()
It must read:
ConvertToYV12()

-kwag

Gamecraze 10-18-2003 10:03 PM

Error There's no function named ConvertToYuY12

kwag 10-18-2003 10:05 PM

Quote:

Originally Posted by Gamecraze
Error There's no function named ConvertYuY12

That's correct, because there's no function with that name :)
The correct name is ConvertToYV12()

-kwag

Gamecraze 10-18-2003 10:06 PM

Dang typo

Gamecraze 10-18-2003 10:09 PM

Also in TOK it says " is not a valid interger value

Gamecraze 10-18-2003 10:16 PM

Ok, WMP and vdub play the script right, since fixing that type of mine, but TOK still stays (" Is not a valid Integer Value)
Any ideas?

kwag 10-18-2003 10:17 PM

Quote:

Originally Posted by Gamecraze
Also in TOK it says " is not a valid interger value

Change this line:
AviSource("E:\kvcd\Witch Hunter Robin - 01.avi")
To read:
AviSource("E:\kvcd\Witch Hunter Robin - 01.avi", false)

-kwag

Gamecraze 10-18-2003 10:46 PM

it still does it,
Also i just noticed blue/red deal swapped now too I just didnt notice earlier in tok, and in mediaplayer its swapped and the video is upsidedown.

It plays fine without the scrip tho.

kwag 10-18-2003 10:53 PM

Check this thread: http://www.kvcd.net/forum/viewtopic.php?t=6437
Although it's a locked thread, I think the answer is there. I'm no avi expert ( I don't do avis ), so maybe someone can post an answer here.

-kwag

Gamecraze 10-18-2003 10:58 PM

Well, like the link, i feel that if it works without the script, the problem should lie within the script. Basic deduction method here.

Only problems are when running the script and related programs are all i ever get.

Gamecraze 10-19-2003 12:58 AM

Well looks like the mispelling i had originally was the main problem all along, I removed the other 2 added things after the former mispelling, and went back down to just
ConvertToYV12()
and the problems were fixed with the video more or less, now in vdub it is correct, and in tok, wmp is still upsidedown for some reason but oh well.
the weird " is not a vaild interger value still shows up, but tok seems to have it opened anywayz, so i'm gonna try it as is.
Wish me luck :)


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

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.