PDA

View Full Version : Selecting Multiple ranges in avisynth


fjdogar
27th November 2007, 03:02
hi i m new to avisynth , this is gonna be my first script in avisynth.

i have a deinterlaced pal avi file 60 minutes long , i want to change its speed to 96% keeping the frame rate (25fps) intact .

the other thing i want to do is that i want to apply different filters on different ranges in the video file , can i select multiple ranges ?? because i dont want to split my video file .

thanks

stickboy
27th November 2007, 04:06
hi i m new to avisynth , this is gonna be my first script in avisynth.

i have a deinterlaced pal avi file 60 minutes long , i want to change its speed to 96% keeping the frame rate (25fps) intact .So you want to add extra frames? Look into ChangeFPS.
the other thing i want to do is that i want to apply different filters on different ranges in the video file , can i select multiple ranges ?? because i dont want to split my video file .http://forum.doom9.org/showthread.php?t=113403

fjdogar
27th November 2007, 04:49
thanks for ur reply.

wouldnt it be assumeFPS , coz i wanna keep the original frame rat (25) but want the video to run slower.

neuron2
27th November 2007, 05:34
Almost.

This will give you half slo-mo but still playing at 25 fps:

ChangeFPS(50)
AssumeFPS(25)

You doubled each frame but still play them at the original rate, so it takes twice as long to play, i.e., slo-mo.

Didée
27th November 2007, 10:39
However, in this case here this would become

ChangeFPS(25/0.96)
AssumeFPS(24)

and that's something you definetly DONT want to do, since it turns fluid motion into sawtooth motion. You'd die from epileptic seizure during watching that.

Oversimplified:
A PAL stream plays in shorter time than the according NTSC stream because the 24fps NTSC has been sped up to PAL by something similar to NTSC24.AssumeFPS(25).
If you want to go back to the original playtime, you have to do PAL25.AssumeFPS(24).
Converting PAL back to the original playtime while keeping the framerate at 25fps is "impossible". (Of course it's not impossible, but it's a monster effort, and not worth doing so.)

fjdogar
27th November 2007, 20:03
thanks for ur help guys , it really worked.

changefps(24)
assumefps(25)

is wat i was luking for , but thanku for puttin me to the rite direction.

by the way can u telkl me wats wrong with the script

LoadVirtualDubPlugin("C:\Documents and Settings\Dogar\Desktop\vdub\VirtualDub-1.6.19\plugins\gradation.vdf" , "grade")

function do_green()
{

grade(1,"ignore parameters1")
}

function do_warm()
{

grade(1,"ignore parameters2")

}

AVISource("ONE_CUT.avi")
ConvertToRGB32()

a = trim(0 , 200).do_green()

b = trim(201 , 350).do_warm()

c = trim(351 , 500).do_green()

d = trim(501 , 906).do_warm()


return (a + b + c + d).AssumeFPS(24).ChangeFPS(25)

ignore the parameters coz i removed them coz they were long.
it says invalid arguments for function do_green()

stickboy
27th November 2007, 20:31
ignore the parameters coz i removed them coz they were long.
it says invalid arguments for function do_green()When you use syntax like:
clip.function(1, 2, 3)it's really shorthand for:
function(clip, 1, 2, 3)What you probably want is:
function do_green(clip c)
{
return c.grade(1, ...)
}By the way, please put code in [ code ] ... [ /code ] tags, not quote blocks.

fjdogar
28th November 2007, 07:34
yea it was a mistake putting the code in qoute . thanku for the help with the function syntax.