Get frame count for movies in a jit.playlist
Hey guys,
In MaxForLive, I can easily get the frame count from a movie by inserting 'read, getframecount' and routing it from the jit.movie dumpout. (see patch attached)
But now I have a jit.playlist and I can't find how to have that frame count update when I switch between movies. I tried to get the frame count from the jit.pwindow dumpout or from the jit.playlist content, nothing works. What am I missing?
Thanks
If you check the reference sidebar (or documentation) for jit.playlist you can see that it doesn't support getframecount
messages. Sadly the content dict reports the movies duration but not framecount. But there is a getclipattr
message that allows you to query an attribute for a given clip (see the doc). So sending a getclipattr 3 framecount
will give you the framecount of the third movie from jit.playlist's middle outlet.
From that you can build the logic to get the framecount of every clip.
Thank you so much, I'll check it out tomorrow!
So the getclipattr works well, but now I am stuck at making a "getclipattr $i1 framecount" work so that it follows the clip currently playing (with using $i1 as the clip number). I cannot find a way of routing the current clip number. π
I guess you are sending an integer into a messages left inlet, but the message should be getclipattr $1 framecount
instead (remove the i between $ and 1).
Here is the patch, I'm trying to have the video play on load, then switch videos with the 'next' button, and have the frame count update as I switch. Linking the 'next' to the same getclipattr to update the count doesn't work.
I really appreciate your help by the way, especially for beginner requests like mine.
When a movie starts, a start message is sent from the middle outlet of jit.playlist, containing the index and filename. You can see that in the "Advanced" tab of jit.playlist helpfile.
You can route that to the getclipattr message:
Also please when sharing a patch use the copy compressed feature instead of sharing a file.
Very nice! thank you πππππππ