Welcome! Log In Create A New Profile

Advanced

How to know when a movie has finished playing?

Posted by mrbluefin 
How to know when a movie has finished playing?
December 03, 2021 09:10PM
Hi.

I am playing videos in my task using the syntax 'mov'. All my videos have 80 frames played at 60 fps. Currently, based on the total absolute duration of my videos (calculated as 1000 x 80/60 = 1333 ms), I am flipping my photodiode on the movieON and movieOFF cue.

However, sometimes 1 or 2 frames of my videos gets skipped while playing and sometimes there is delay between movieON/OFF command and actual movie being displayed on the screen, i.e. even when I say movieOFF, I don't know if my video has already finished playing (and now showing a blank screen) or in the middle of being played.

I wanted to know if there is a way to know exactly when each of my video file has finished playing and flip the photodiode signal at that time specifically.

Thanks.
Re: How to know when a movie has finished playing?
December 03, 2021 09:39PM
Or in other words,
is there a way to dynamically set my movieOFF cue in every trial so that it only comes after the whole of the video file has finished playing? Instead of locking it to a particular time duration.
Re: How to know when a movie has finished playing?
December 06, 2021 09:00AM
Turn off NIMH ML's photodiode trigger. Make a black & white square movie of which length is the same as your movies. Then play it over the photodiode together with your visual stimuli.

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.