Forums > Jitter

getframecount bug?

January 28, 2009 | 1:12 am

I’m having a lot of trouble with the getframecount message for jit.qt.movie. It at best causes the movie to stop playing, and at worst freezes Max. Has anyone else experienced this? Maybe I’m not doing something correctly?


January 29, 2009 | 8:43 pm

Apparently this is unavoidable with large movies. Has anyone experimented with workarounds to make it count the frames faster? Would it work to just have the "finished" bang trigger a gettime message?


January 29, 2009 | 11:17 pm

just an idea for a workaround:
perhaps you could do the framecount by hand using a fixed bitrate for compressing and analyse the filesize.
the filesize schould be linear to the length of movie.

best,
videomasta


January 30, 2009 | 3:48 pm

Hi Zach,

Why not just have it get the framecount when first loading – you only need to do it once for each movie?

You could also deduce framecount if you knew the timescale, total time of the movie (in msecs), as well as the framerate:

(1000./timescale) * duration = total time in msecs
ans/1000. = total time in seconds
(total time in seconds * fps) + 1 = total number of frames

This method shows no latency.

Here are examples:

best,
Zachary

– Pasted Max Patch, click to expand. –

January 30, 2009 | 9:39 pm

What I meant to write as the comment on the right was that it is necessary to add 1 at the end to get the same framecount as the getframecount message. You can see that in the patch.

Zachary


February 8, 2009 | 12:03 am

Thanks, Zachary! I would have never considered calculating framecount from duration, timescale and fps. It does work seamlessly and I’m now using it in my patch. Hope you’re doing well.

-Zach


Viewing 6 posts - 1 through 6 (of 6 total)