Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[open] OpenSesame freezing with touch_response and mouse click

edited October 2014 in OpenSesame

Dear all,

We're building an experiment in which a short video is presented and then participants are asked to make a choice amongst 4 possible drawings appearing on the screen. We use the touch_response plug-in to get responses from the mouse (back-end is 'legacy'). The sequence is as follows:

  1. video presentation
  2. two-choice between repetition of video or response -> response is given by mouse click and touch_response
  3. 4 drawings appear on the screen in 4 different locations and stay for 5 seconds before to timeout ->response by mouse click and touch_response

However, if the mouse is accidentally moved or clicked during the video presentation OpenSesame seems to freeze and slows down considerably. Is there a way to 'isolate' the mouse during the presentation of the videos?

Thanks, Stefania


  • edited 8:34AM

    Hi Stefania,

    I tried to reproduce the problems you described, but couldn't do so. There was no interference of the media player plugin and the mouse (or the keyboard). Basically, it seemed to work like you want it to.

    Is it possible that you provide us with some more information about your issue and the way you implemented your experiment? Some code would be helpful, too. In this way, I am sure we can fix it.


  • edited 8:34AM

    hello Eduard, thanks for getting back to us.
    Attached is a screenshot of our experiment pipeline and below some more details.

    ‘Choice loop’ allows to choose between loop 1 and loop 2 (by touch-response, screen divided in two, mouseclick on the left part of the screen runs loop 1, mouseclick on the right runs loop 2). Within each loop, after instructions and a fixation dot, media_player_vlc plays the first video set in the variable ‘video_a1’ (if we run loop 1). The parameters of the item are the standard ones. Then a sketchpad and a touch_response item allow the subject to answer or watch the video another time. In the first case, a sketchpad (4 images saved as an unique image an called sequentially by the variable ‘image_a1’) and a touch_response are displayed. In the second case, a new media_player-vlc item plays the same video as before, then a sketchpad/touch _response allows the subject to mouseclick and see the same image (‘image_1’) as before; participants have to click the correct image among 4 choices (screen divided in 4 through touch_response item) by mouseclick.

    The problem of “freezing” during the video seems more serious with high-resolution video. With low-resolution video (854 x 480) interferences appear less often and the problem doesn’t occur with a video with very low resolution (480x270). We’ve also tried different extension (.mp4, .avi) using different computers, but these changes do not seem to solve the problem.

    Thanks, Stefania and Joshua


  • edited 8:34AM

    Hi you two,

    I don't know whether this will solve the problem, but it is certainly a good idea to change duration in each media_player_vlc element (and others if necessary) to "mouseclick", since you're using mouse/touch responses, not the keyboard, right?

    Also, I wonder why do you have separate elements for "video A1" and "repeated video A1" ? As far as I understand your idea, they should be the same. If so, it would be more efficient if you reuse already existing elements.

    Let me know, if this is already enough to fix it. I will keep trying to figure out whether I can find something else in the meantime.


  • edited 8:34AM

    Hi Eduard,

    Thanks for your suggestions. We took a bit to get back as we tried to implement them. Unfortunately none of the changes solved the issue, the only change that seems to matter is the reduction of the video resolution (which obviously is not ideal for the nature of our experiment). We tried this out on different laptops and the issue persists.

    Very best, Stefania and Joshua

  • edited 8:34AM

    Hi guys,

    So if I understand the situation correctly, the main problem here is that the media_player_vlc stutters during playback. Is that right?

    You could try what happens if you use a different back-end, although I would expect the legacy back-end (which you're using now, right?) to work best.

    Alternatively, you could install the media_player_gst plug-in. This is set to replace the vlc-based plug-in, which has some issues (as you're experiencing now). However, the gst-based plug-in is still in development, and requires installing some additional packages:

    @dschreij Any suggestions?


    There's much bigger issues in the world, I know. But I first have to take care of the world I know.

  • edited 8:34AM

    Thank you for your suggestions.
    We are trying to use the media_player_gst plug-in, but we have some problems. We've placed the extracted plug-in folder (downloaded as a zip file from the website) in the opensesame/plugins folder e we've installed the Gstreamer runtime, that created the folder gstreamer-sdk in the path "c:/gstreamer-sdk/", that seems to be the default path indicated in the instructions. Nonetheless, when we try to use the plug in (that we can actually see in OS) we see the error message: "Failed to load plug-in media_player_gst" and this is the traceback in the debug window:

    File "dist\libopensesame\", line 77, in new
    File "dist\libopensesame\", line 331, in load_plugin
    File "dist\libopensesame\", line 303, in import_plugin
    File "C:\Program Files (x86)\OpenSesame\plugins\media_player_gst\", line 94, in
    OpenSesame could not find the GStreamer framework!

    It seems to be the typical error seens when the gstreamer is installed in a different folder, but our location should be the default one. We've also tried to move the location of the gstreamer-sdk folder and add a line of code to the script as suggested in an other topic of this forum, as:

    import os
    os.environ["GSTREAMER_SDK_ROOT_X86"] = "our new directory path"

    but unfortunately we always have the same error.
    Probably we've missed something in the process.. we will appreciate any kind of suggestions!

    Thank you very much for your help,
    Joshua and Stefania

  • edited November 2014

    Hi Joshua,

    when you install the GStreamer SDK it should automatically create the environmental variable GSTREAMER_SDK_ROOT_X86 for you. If this has not happened, something probably went wrong with the installation. Manually assigning this viarable is I think of little use.

    Are you sure you installed the 32-bit version of GStreamer and not the 64-bit one (if the latter is the case, there should be a GSTREAMER_SDK_ROOT_X86_64 variable in os.environ[])? That is the only thing I could think of now that prevents OpenSesame from finding GStreamer. OpenSesame in Windows is still built on a 32-bit Python environment, which requires the 32-bit version of GStreamer SDK to be installed.

    Let me know if this is the case. If so, we'll look further.

Sign In or Register to comment.