![]() When does it call self.initialize? In this specific case, as part of get_frame(), which I have pasted below in full, with the relevant line marked def get_frame(self, t): It should then re-create self.proc at the end of this function, and the crash seems to occur if it fails to do so. ![]() On further investigation the relevant call occurs whenever ffmpeg_reader’s self.initialize(t) function is called. That function is being called all kinds of times that it should not be, but it is inconsistent about whether it actually crashes the program. Has anyone else encountered this, or have any ideas about how to stop it from I added some info to the ffmpeg_reader code in the close function, as you suggested. My best guess is some kind of conflict caused by the ay() of the attention-getter using the same FFMPEG resources as the movie’s ay (because moviestim uses psychopy.sound for its sound), so in theory this could happen if you were alternating sound files as well. Self.make_frame = lambda t: reader.get_frame(t)įile "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/moviepy/video/io/ffmpeg_reader.py", line 163, in get_frameįile "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/moviepy/video/io/ffmpeg_reader.py", line 106, in read_frameĪttributeError: FFMPEG_VideoReader instance has no attribute 'proc' Self._numpyFrame = self._mov.get_frame(self._nextFrameT)įile "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/moviepy/decorators.py", line 89, in wrapperįile "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/moviepy/Clip.py", line 95, in get_frameįile "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/moviepy/video/io/VideoFileClip.py", line 74, in Self._updateFrameTexture() # will check if it's neededįile "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/visual/movie3.py", line 303, in _updateFrameTexture The issue is, if the movie has sound, sometimes (and only sometimes, which is maddening) after re-playing the attention-getter several times, when I start trying to play the movie, I get the following error (picking up from the draw command in my script): dispMovie.draw()įile "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/psychopy/visual/movie3.py", line 383, in draw So, the movie disappears, the attention getter plays again, first frame reappears paused. I built in the capability to re-play the attention-getter if the infant does not immediately look at the screen, with the first frame of the movie frozen on the screen. movs with mpeg-4 encoding and 48000Hz mono audio. Immediately after the attention getter, the script displays the first frame of the movie, paused. wav sound file which is loaded at the start of the script. The attention getter consists of a looming geometric shape and, at the same time, plays a short. ![]() In short, I’ve built a script for running studies with babies that plays an attention getter followed by a movie file.
0 Comments
Leave a Reply. |