Howdy, Stranger!

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

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

  • 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.

  • 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.

    Buy Me A Coffee

  • 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?

  • 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.

    Buy Me A Coffee

  • 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:

  • 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

  • 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:

  • 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.

    Buy Me A Coffee

  • 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...

  • 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?

    Buy Me A Coffee

  • 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

  • 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

    Buy Me A Coffee

  • Hi!

    I've just started using Open Sesame (I use 3.2.8 version) for building my experiment and I've run into the same problem mentioned above in this thread. I have a lot of super short videos (about 4/5 of them are less than a second long) and whenever I try running them the experiment crashes with the message: ValueError: max_duration needs to be greater than 1.0

    I use the same format, but bit longer videos (around 2 seconds), in the instruction for example purposes and it works flawlessly, however as soon as it gets to the practice phase it crushes. Has the problem been fixed in the updates yet, and, if not, are there any other solutions besides editing videos to prolong them over 1s (I have about 2000 videos, so that is really my last resort as it'll take way too much time to edit them all again)?

    Thanks a lot!

    Cheers!

  • edited August 2019

    Never mind, I just found a solution - in your lib folder, you've got a sub-folder site-packages and in that one another sub-folder called mediadecoder (for example: C:\Program Files (x86)\OpenSesame\Lib\site-packages\mediadecoder ). Open it with code (right click on it and "open with code") and at the very bottom, where max_duration is defined (for me it starts at the row 160) you need to change the value for when to stop and raise the error.

    -So in this set of lines:

    if not value is None:

                if not type(value) in [float, int]:

                    raise TypeError("max_duration needs to be specified as a number")

                if value<1.0:

                    raise ValueError("max_duration needs to be greater than 1.0")

                value = float(value)

            self.__max_duration = value

    -change the line

    if value<1.0:

    -into

    if value<0.1:

    -and it'll run all the videos that are longer than 10ms.

    Hope this will be of help to others as well!

    Cheers!


Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games