use current video frame

Amir's icon

hello
Maybe someone have a simple patch example how to get bang x frames before the end of a video file. i dont want to use loop notify. instead i want to use the current frame count.

thanks

LSka's icon
Max Patch
Copy patch and select New From Clipboard in Max.

this could be a starting point:

Amir's icon

many thanks LSKA!

Amir's icon

Hi Lska
do i need the message you have used: \frame $1, bang \ or i can connect the qmetro directly to jit.qt.mov ?

thanks

LSka's icon

If you do not want to use the "frame" method, then must be shure to have a qmetro that runs at the same fps of your movie, so the counter will remain in sync. Also, you'll have to send the "start" and "stop" messages to jit.qt.movie when starting the counter.

Amir's icon

hi LSKA

Max Patch
Copy patch and select New From Clipboard in Max.

using the "frame" method slow the performance. so i have remove it and set my qmetro to 25 fps, same as my video fps. but...it seems the frame count and the current frame at the end of the file are not equal. (the frame count value is much bigger)
any idea ?
tnks

Amir's icon

hi LSKA
I have found the reason :

when i am playing a sound file simultaneously via sfplay, the curent frame value of the video is not accurate.
any idea how shall i play both and keep the current frame value accurate ?
thanks
a

phiol's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Try to see the difference :-)

ctrlzjones's icon

Sorry if this is obvious, but have you checked the overdrive button (on), under menu/options/audio status.

Why do you need a constant number from [fps]?
Your movies playback frame rate is fixed, it does not change because of your playback. As long as it shows values above your framerate (e.g. 25) everything should be a-okay.

The only worry is that if it goes lower then your fps encoding. That means: dropped frames.
But Jitter is able to run a [qt.movie] and [sfplay] nicely together unless the file has ridiculous techspecs. See this thread for movie preparation and noodelinghttps://cycling74.com/forums/smooth-video-playback/
watch for Vades post.

Amir's icon

thanks PHIOL and CTRLZJONES for the info!
PHIOL version works perfect!!!