PDA

View Full Version : Dvx avisynth script


kxy
9th April 2003, 18:47
I know the below script doesn't work with trim and return when select range is used, how do I make it work?

I have use a script with DVX that goes like this:
# TRIM trim(0,a)
a=%credits_start%
#trim(0,startcredit)
startcredit=373
#trim(startcredit,startcreditend)
startcreditend=960
# SOURCE
source=MPEG2Source("%source_file%").Telecide(guide=1).Decimate(cycle=5).Crop(%left%,%top%,-%right%,-%bottom%)
beg=source.trim(0,startcredit).UnDot().LumaFilter(-2).UnFilter(-5,-5).Convolution3d(preset="movieHQ").LanczosResize(%target_width%,%target_height%)
start=source.trim(startcredit,startcreditend).greyscale().UnDot().LumaFilter(-2).UnFilter(-5,-5).BilinearResize(%target_width%,%target_height%)
movie=source.trim(startcreditend,a).UnDot().LumaFilter(-2).UnFilter(-5,-5).Convolution3d(preset="movieHQ").LanczosResize(%target_width%,%target_height%)
credit=source.trim(a,0).greyscale().UnDot().LumaFilter(-2).UnFilter(-5,-5).FluxSmooth(50,50).BilinearResize(%target_width%,%target_height%)
source=beg+start+movie+credit
return source
#Dvx always adds following line in end of the movie
#IsRGB() ? NOP() : Limiter()

Now here are 2 problems. Problem 2 not related to avisynth

1) This doesn't work with compression test, it will tend to encode the whole movie instead of selectrange

2) The credit values will not get imported to the vdubmod, xvid credit tab. How do I write a vdobmod script to do that?

P.S. If I use IsRGB() ? NOP() : Limiter(), the whole movie gets encoded twice, I thought the line meant if the movie is RGB then null(null result primarily for if-then-else operation above where ifelse is not desired), then it clips (or "clamps") pixels under 16 to 16 and over 236 (or 240) to 236 (or 240).

Am I understanding the above line wrong, if so can you explain what does IsRGB() ? NOP() : Limiter() do exactly and why it would cause the movie get encoded twice?

P.S.S (non avisynth related)
What is your opinion on FluxSmooth(50,50) for credits?

stax76
9th April 2003, 23:39
This doesn't work with compression test, it will tend to encode the whole movie instead of selectrange


because DVX takes your script and adds a SelectRangeEvery line
so you have

return clip
SelectRangeEvery

would work if you change your script from

source = beg+start+movie+credit
return source

to

beg+start+movie+credit


The credit values will not get imported to the vdubmod, xvid credit tab. How do I write a vdobmod script to do that?


you pressed c in the preview to select the credits start and opened the XviD settings dialog in the DVX options dialog? Works here

If I use IsRGB() ? NOP() : Limiter(), the whole movie gets encoded twice


should really not happen, but this will be replaced by limiter because d2v sources usually are not rgb

kxy
10th April 2003, 09:14
My silly mistake on the selectrange, thanks for your clear explanation.

For the credits, I was talking about beginning credits with end credits. Dvx and GKnot only allows end credit so far. I was looking for a work around, something like writting a vdobmod script to import the values from my script to xvid encoder window.

I am getting off topic here. But how do I add a ripped srt to the final encoding process using dvx?

Still trying to track down the encode twice problem, has this ever being reported? I load the above mentioned script into Vdub and the movie append it to itself, make it twice as long. Can it be that avsynth is installed twice on the system? I have avsynth 2.51 install on my C drive, when I installed system pack for DVX, it was installed again.

stax76
10th April 2003, 16:38
I am getting off topic here. But how do I add a ripped srt to the final encoding process using dvx?


in the track or in the audio dialog, please read also the tooltips in the track dialog


Still trying to track down the encode twice problem, has this ever being reported? I load the above mentioned script into Vdub and the movie append it to itself, make it twice as long. Can it be that avsynth is installed twice on the system?


probably I could tell you what's wrong when I see the logfile

kxy
11th April 2003, 18:18
I don't think this duplicate problem has to do with your program. I think it has to do with installer.

But here is the log file, rar renamed to zip.

kxy
11th April 2003, 18:19
Here is the file

kxy
11th April 2003, 19:49
Okay nothing wrong with the registry path either.

I uninstalled everything and install avisynth 2.51 only and the same problem(append the whole movie at the end) still occurs.

What is wrong with my trim function in my script?

See screen shot.

edit: take out the screen shot, it is not needed.

seewen
11th April 2003, 19:53
In your Avisynth script, you write :

...
a=178140
b=0
c=30
...
beg=source.trim(0,b)....
start=source.trim(b,c)...
movie=source.trim(c,a)...
credit=source.trim(a,0)....
beg+start+movie+credit

If I replace the letters by their values :

beg=source.trim(0,0) #ALL MOVIE, Trim(0,0) mean "No trim".
start=source.trim(0,30)..
movie=source.trim(30,178140)..
credit=source.trim(178140,0)..

beg = The whole movie
start+movie+credit = The whole movie.
=
beg+(start+movie+credit) = 2x Whole Movie.


Nothing to do with "IsRGB() ? NOP() : Limiter()"

kxy
11th April 2003, 20:12
I dont understand your explantion of the 2X movie.

EDIT: Good explantion, I understand now, what a fool I am. Many Thanks.

:p