Finding length of video in milliseconds

Dec 1, 2013 at 5:45pm

Finding length of video in milliseconds

Right now I need to quickly get the length of a series of videos in milliseconds. This is in a coll object:

1, /Users/austinslominski/Movies/Austin_Slominski/nahNextHalfHour.m4v 5000;

the first number is the index, then file path, then the length in milliseconds, which goes to a delay (because all of the videos are being played randomly.

Any tips?

Thanks

#274334
Dec 2, 2013 at 4:54am

following the documentation …

http://cycling74.com/wiki/index.php?title=20Objects_Lesson_16_-_The_jit.qt.movie_Object

this would be:

<code>

– Pasted Max Patch, click to expand. –

</code>

but I am not sure if it applies to qt timescales diverging from 600; I get sometimes funny results … kind of voodoo encounters.

I would be happy if others comment on this.

#274369
Dec 2, 2013 at 12:09pm

Thanks CTRLZJONES, a worked out a similar solution using getfps and getframecount

– Pasted Max Patch, click to expand. –

I’m not sure about the accuracy, but it really seems to work in my patch.

#274446
Dec 2, 2013 at 4:18pm

I find to above method to be more truthful; with yours I get ~500ms varying results. fps are not necessary integers, you find 29.98 in ntsc-land.

and as banging is not always exactly right to left, [pipe] may come handy as the antidote for voodoo magic:

<code>

– Pasted Max Patch, click to expand. –

</code>

#274468

You must be logged in to reply to this topic.