|
|
| 6_6_6 |
| Posted: Mar 9 2005, 07:50 PM |
 |
|
Unregistered

|
Hello,
I am trying to extract segments from avi files through job control scripts.
When I use VirtualDub.video.SetRange(X,Y), I would need the duration of the video to get end of the extracted segment.
Explanation of SetRange is:
"The start offset is measured in milliseconds from the beginning, and the end offset is in milliseconds from the end. Yes, I know this is stupid."
I couldn't agree more! But program is lovely.
Since I am using a perl program to feed in start and end time slices, I would like to know a way to calculate the duration of the video in order to obtain the END of the slice.
I tried using an external program mediainfo. However, this is not accurate. It shows playtime as 1h 27m while in fact it is 1h 27m 44s.
Is there a way to get the length of the video through vdub? If not, how can I do that?
Thanks for your time! |
 |
| 6_6_6 |
| Posted: Mar 9 2005, 11:10 PM |
 |
|
Unregistered

|
AVIscan from http://aviscan.freezope.org is giving me video length precisely. Thank you!
|
 |
| DarrellS |
| Posted: Apr 9 2005, 06:08 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 567
Member No.: 1061
Joined: 28-November 02

|
Just go to the last frame in Virtualdub and get the length of the movie.
1:27.666 |
 |
| phaeron |
| Posted: Apr 9 2005, 10:50 PM |
 |
|

Virtualdub Developer
  
Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02

|
There are actually two ways to cut video in VirtualDub at the script level. One is the edit list (subset), which consists of a set of frame ranges, and the other is the start/end bounds set by SetRange(). What gets processed is the intersection of the two. If you have absolute frame numbers, do SetRange(0,0) and then use the subset instead. |
 |
| dEf |
| Posted: Apr 14 2005, 11:21 AM |
 |
|
Unregistered

|
hello i'm trying to do similar thing (select few frames from start of the video and save image seq), but im not able to make the selection phaeron please could you explain your advice? i haven't found a way how to use combination of video.setrange and subset.addframe to make the selection let's say 50 miliseconds from start of the video. do i have to pass the clip length/frames count to the vdscript? thanks |
 |