Welcome!

Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

Video Stimulus insertion

I have just started using this software and immediately need to design a priming experiment with different video clips. I am not able to insert video clips. Is there a proper tutorial section discussing usage of such stimulus.
Thanks

Comments

  • rrrrrr Posts: 78
  • Thanks for the guidance.
    I have installed the plugins and single video files are running in the Visual stimulus. But i want to run several videos (100 short clips) for a lexical decision task where we need to display a priming clip followed by a target clip.

    I want to achieve the following:
    1. Display a sequence as such : fixation point-> prime clip-> blank screen-> target clip (with time-out)->response
    The trials will be separated by a blank screen as well.
    3. Make sure that no target clip is repeated for the same participant
    4. We would also like to have a solution of linking video files to a pathname or some name in the excel file too.

    Is there a way to avail these solutions through a builder view at this point. It would be awesome to have it there.

    Thanks.

  • DanielDaniel Posts: 367

    Hi Abhijit,
    it certainly is possible, but we're not going to create the task for you :smile:.
    Why don't you give it a go yourself, and then we can help you if you get stuck.

  • Hi Daniel...
    I am completely new to Opensesame as well. I was just wondering... in the case of Psychopy, we put in the video element in the routine, then define the file paths in the conditions file and Psychopy retrieves the videos for us when we run the experiment...how does this work in Opensesame in the builder view? I have tried putting in the file names under the variable "file_name" in the loop but the files aren't retrieved from the file pool...is this achievable without coding?

  • DanielDaniel Posts: 367
    edited December 2016

    Hi NikkieK,
    It certainly is. If you have made a column named "file_name" in the loop, you can access this variable by placing [file_name] in the video file field of the player item. Then it should automatically use the value that 'file_name' has in the current iteration of the loop.

    Thanked by 1NikkieK
  • NikkieKNikkieK Posts: 13
    edited December 2016

    I did exactly the same...however the experiment stops after playing just one video with the error message : the variable total_response_time not available.

  • Here are the screenshots..I tried implementing a simple loop where a video plays followed by a keyboard response:


    After quickrun:

  • sebastiaansebastiaan Posts: 2,950

    Hi Nikkie,

    It's better to use the media_player_mpy plugin. You can install it by running the following in the debug window:

    import pip
    pip.main(['install', 'opensesame-plugin-media_player_mpy'])
    

    The vlc-based plugin hasn't been updated for a while (and was never really great to begin with).

    Cheers,
    Sebastiaan

    Thanked by 1NikkieK

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

  • Thanks Sebastian!

  • Hi,
    I seemed to have run into another problem. I need to play a video and then record the participant's response.. The loop plays a few videos and then the experiment stops.
    Here is the generated error message:

    File "/usr/lib/python2.7/dist-packages/libqtopensesame/misc/process.py", line 140, in run
    exp.run()
    File "/usr/lib/python2.7/dist-packages/libopensesame/experiment.py", line 413, in run
    self.items.execute(self.var.start)
    File "/usr/lib/python2.7/dist-packages/libopensesame/item_store.py", line 91, in execute
    self.run(name)
    File "/usr/lib/python2.7/dist-packages/libopensesame/item_store.py", line 106, in run
    self[name].run()
    File "/usr/lib/python2.7/dist-packages/libopensesame/sequence.py", line 51, in run
    self.experiment.items.run(_item)
    File "/usr/lib/python2.7/dist-packages/libopensesame/item_store.py", line 106, in run
    self[name].run()
    File "/usr/lib/python2.7/dist-packages/libopensesame/loop.py", line 337, in run
    self.experiment.items.execute(self._item)
    File "/usr/lib/python2.7/dist-packages/libopensesame/item_store.py", line 90, in execute
    self.prepare(name)
    File "/usr/lib/python2.7/dist-packages/libopensesame/item_store.py", line 122, in prepare
    self[name].prepare()
    File "/usr/lib/python2.7/dist-packages/libopensesame/sequence.py", line 124, in prepare
    self.experiment.items.prepare(_item)
    File "/usr/lib/python2.7/dist-packages/libopensesame/item_store.py", line 122, in prepare
    self[name].prepare()
    File "/home/nikkiek/.local/share/opensesame_plugins/media_player_mpy/media_player_mpy.py", line 119, in prepare
    elif not self.player.load_media(path):
    File "/home/nikkiek/.local/lib/python2.7/site-packages/mediadecoder/decoder.py", line 169, in load_media
    self.clock.max_duration = self.clip.duration
    File "/home/nikkiek/.local/lib/python2.7/site-packages/mediadecoder/timer.py", line 180, in max_duration
    raise ValueError("max_duration needs to be greater than 1.0")
    ValueError: max_duration needs to be greater than 1.0

    and here is the screenshot of the experiment:

  • DanielDaniel Posts: 367
    edited December 2016

    Hi NikkieK,

    It appears as if the plugin cannot detect the duration of the clip. This may be due to an error in the encoding of the video file. If you open up the video file in another player, are you able to seek in the clip (if not, this is usually indeed means the video file contains some errors).
    You can try to reencode the video file with vlc, or use handbrake. Try to play the reencoded video file in OpenSesame again and if the error persists we can look if the problem is with the plugin.

    Thanked by 1NikkieK
  • NikkieKNikkieK Posts: 13
    edited December 2016

    I have tried reencoding the file...but the problem still persists...the thing is some of these clips are under 1sec...is this a problem?

  • I am doing a lexical decision task with priming effects using stimuli from sign language..so the duration of some of the video clips are less than a second...

  • DanielDaniel Posts: 367

    Hi NikkieK, that may be the cause then yes. This should be fixed in the next release (even though I think your situation unique as a <1 second videoclip is really exceptional), but that doesn't help you now. Is there anyway you can prolong the clip to a second. Maybe by adding a few blank frames at the beginning or the back?

    Thanked by 1NikkieK
  • I am also trying to upgrade opensesame so I can input video stimulus. I am getting this error when I try to install the plug in you have linked: File "", line 1
    pip install python-pygaze --upgrade
    ^
    SyntaxError: invalid syntax

    am I entering this part in the wrong spot? I am unsure what the "terminal" is

  • eduardeduard Posts: 1,115

    Which operating system do you use? On windows, the terminal is the the progam "cmd.exe". You can open it like this. Normally, you should have pip installed, if not, you can follow these instructions.

    I believe you can also just use it directly in opensesame. With ctrl+D, you can enable/disable the debug window. In that window, you can type something like this to upgrade pygaze:

    import pip
    pip.main(['install', 'python-pygaze', '--upgrade'])
    

    See here: http://osdoc.cogsci.nl/3.1/manual/environment/

    I hope this helped.

    Eduard

Sign In or Register to comment.