View Full Version : return clip length with VirtualDub.video.GetRange()
gamepit
3rd September 2003, 03:00
Using vdub scripting language Sylia, Is it possible to return the entire length of a clip using VirtualDub.video.GetRange()?
Seems like that would be the purpose of the function but I cant figure out how i can get it to return the entire length of the clip.
Any input is greatly appreciated as ive spent alot of time on this and would like to move on.
TIA
Suiryc
4th September 2003, 13:40
Here (http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/virtualdubmod/VirtualDubMod%20Help/1.5.x/html/Scripts.html?rev=1.4&content-type=text/html) is a short description of available script functions in VirtualDub(Mod).
The GetRange(index) function returns the bounds of the subset of the clip you selected (when you use the 'Set selection start/end').
For index=0 it returns the offset (in ms) of the starting position, and for index=1 the offset (compared to the end of the clip) of the ending position. So if you process your whole clip GetRange will always return 0.
Another user pointed that out and proposed to extend this function so that it returns the duration of the clip in ms (index=2) or the number of frames in the clip (index=3). Those mods have been added in VirtualDubMod, but doesn't exist under VirtualDub or Nandub.
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.