Hello,
I am creating an experiment where I present participants with some videos. In every trial, I record the duration of the videos using the following line of code:
thisExp.addData(‘expDurRecord’,t) in the end routine part of the routine where I present the video,
where t = movie_stimPlayClock.getTime()
however, when I compare the ‘expDurRecord’ with the actual durations of the videos, I see some serious inconsistencies (e.g., the duration of the video is 3.5 seconds but expDurRecord saves 5.3 seconds etc).
can anyone tell the reason of these kinds of incosistencies? this is quite important for me.
I encountered the same issue in an experiment where I simply draw a polygon and wanted to record its duration, but there were lesser numbers of inconsistencies (1 out of 200, but it was there still). so, i dont think that the problem is specific to the videos.
yes I was working on it offline on builder mode. though the problem persists in online mode. I “solved” the problem by drawing the video durations from the excel file explicitly. but it doesnt really answer my question why builder (or pavlovia, because I encountered the problem in online mode as well) does not record the t as the video duration but it seemingly records something else.
I dont understand why i need to draw the video durations explicitly while the videos already are the exact durations long that I want them to be. but yeah, explicitly calling for durations from the excel file solves the problem of inconsistent t records.
t is a reserved variable name: Builder automatically assigns it at the start of each frame to the current time in seconds since the start of the routine. So if you re-assign another value to t, you are very likely to get unexpected results. Try using another variable name.
Interestingly, the reported duration of the video seemed relatively stable here and in line with expected. Did you have any other components like key presses in your routine? are you running mac or windows? how large was the inconsistency with the polygon example you encountered?