PDA

View Full Version : Last 250 frames


barrichiello
28th October 2009, 01:05
Good evening

First greet all and I apologize for my bad English.
I have a video DV whose duration is variable. I care only the last 250 frames.
I tried with the command "trim" but I have to spend time whenever to find the length of the video.
How can I always select the last 250 frames without knowing the exact duration?

Blue_MiSfit
28th October 2009, 01:16
a=last

trim(a, a.framecount-250, 0)

neuron2
28th October 2009, 01:20
trim(FrameCount()-250,-0)

or, trickier:

reverse().trim(0,249).reverse()

:eek:

Blue_MiSfit
28th October 2009, 01:24
Ah.

Me not realizing why trim(framecount-250,0) didn't work shows you what a programmer I am :devil:

trim(framecount()-250,-0) looks much prettier! I like the reverse solution too :D quite creative, Don :D

~MiSfit

neuron2
28th October 2009, 01:26
I'm not sure it matters in this case.

But that could be because I am drinking champagne. I like my tricky approach.

Anyway, you beat me in time with the solution, so I hate you. ;)

Gavino
28th October 2009, 10:55
Me not realizing why trim(framecount-250,0) didn't work shows you what a programmer I am :devil:
But it does work (unless you just happen to have created your own variable called framecount).

barrichiello
28th October 2009, 22:19
reverse().trim(0,249).reverse()



perfect...I still have much to learn!
Another questionF: fr the slowmotion of DV video, i use the following script:

Avisource(".avi")
Bob()
AssumeFPS(25)

the script is simple but nice effect, can further improve the outcome?

Thanks

NerdWithNoLife
29th October 2009, 00:02
I've wondered about this too. Thanks for bringing it up, and thanks for the solutions. Now I feel like an idiot for not thinking of this time saving solution a long time ago!

Blue_MiSfit
29th October 2009, 05:28
Avisource(".avi")

#Replace Bob() with much better deinterlcing
edi=nnedi(field=-2)
yadifmod(edeint=edi, mode=1)

AssumeFPS(25)


I'd use something similar to that - mainly because we're all so spoiled in AviSynth with really good deinterlacers :)

~MiSfit