[open] Playing movie with psychopy backend; Avbin installation
Hello all,
I am trying to add a movie to my OpenSesame experiment. To this end, I added an inlinescript with the following in the run phase.
mov = visual.MovieStim(exp.window, 'C:/localfolder/movie1.mp4')
while mov.status != visual.FINISHED:
mov.draw()
exp.window.flip()
However, I get the following error:
Traceback:
File "dist\libopensesame\inline_script.py", line 96, in run
File "dist\libopensesame\python_workspace.py", line 160, in _exec
File "", line 4, in
File "dist\psychopy\visual\movie.py", line 140, in init
File "dist\psychopy\visual\movie.py", line 200, in loadMovie
IOError: Caught exception 'AVbin is required to decode compressed media' while loading file 'C:/_NYNKE/Virtue/fMRItaak/V1/movies/movie1.gif'.
It seems that avbin was not installed correctly.
Please fetch/install it from http://code.google.com/p/avbin/.
I understand that I should download and install avbin, but for me it is not clear where in the OpenSesame installation I should put the avbin files. Do you have any idea?
BTW, I also tried it with other videotypes; .flg and .gif give the same error. Avi gives another error:
Traceback:
File "dist\libopensesame\inline_script.py", line 96, in run
File "dist\libopensesame\python_workspace.py", line 160, in _exec
File "", line 4, in
File "dist\psychopy\visual\movie.py", line 140, in init
File "dist\psychopy\visual\movie.py", line 200, in loadMovie
IOError: Caught exception 'Unsupported RIFF form "AVI "' while loading file 'C:/_NYNKE/Virtue/fMRItaak/V1/movies/movie1.avi'.
Another option might be to convert the AVI to another RIFF form?
Comments
Hi Nynke,
GIF is not really a movie format (even when animated), so I highly doubt avbin will be able to play this for you. Psychopy used to use avbin for playing videos, but the development of avbin has halted more than three years ago and a lot of its problems have never been solved, so I think psychopy (and also OpenSesame) has dropped it completely.
Psychopy recently switched to moviepy with their MovieStim3 module (https://github.com/psychopy/psychopy/blob/master/psychopy/visual/movie3.py), so I recommend giving that one a try. It's still a 'young' module so it is not well documented yet (or at all!) and I expect it still needs some polishing, but in its current state it might already be fine for your purposes.