Howdy, Stranger!

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

Supported by

[solved] Problems Using Multiple Videos

edited June 2013 in OpenSesame

Hi there,

I am having trouble running an experiment with a loop of 16 videos:

image

I'm using the video player set up like so:

image

However, when I run the experiment all I get is a blank screen, yet after making 16 allowed responses the experiment ends as it should. I have no trouble playing videos in OS, the experiment works fine with one video (using the name of the file instead of [Actor]). Also if I put anything before the video player (e.g. a fixation dot) it just stays on the screen and does not disappear as it should.

Is there something I'm doing wrong?

Comments

  • edited 8:07PM

    Hi,

    The video_player hasn't been updated for a long time (it's deprecated in favor of these options, although these may not work for Mac OS). What you are running into is that the video_player doesn't support the [variable] notation. Only direct names work.

    Fortunately, you can work around this through a hack, by placing the following code in the Prepare phase of an inline_script item that you place before the video_player:

    exp.items['video_player'].video_src = self.get('Actor') + '.avi'
    

    This script sets the video_src variable for the video_player item, and allows you to refer to another variable, in your case Actor. Does that make sense?

    Hope this helps!

    Cheers,
    Sebastiaan

  • edited June 2013

    Hi Sebastiaan,

    I'm not very good with code but tried what you said:

    image

    However now I'm getting an error:

    image

    Have I missed something?

    Chris

  • edited June 2013

    Hi Chris,

    Let's walk through the command. exp is the experiment object:

    exp
    

    The experiment has a property items, which is a dictionary of all the items:

    exp.items
    

    In this dictionary, the item names are the keys, so you can get the Emotion item like this:

    exp.items['Emotion']
    

    You can change attributes (i.e. variables) of the item like this:

    exp.items['Emotion'].video_src = self.get('Actor') + '.avi'
    

    Does this make sense? So the problem was that you didn't specify the name of the item, which is Emotion, but just copied the code that assumed the item was named video_player.

    Cheers!
    Sebastiaan

  • edited 8:07PM

    Ah excellent! Haha I told you I was new to this.
    So the videos are displaying now (and in a random order which is great) but they still don't play? I just get a still image of the first frame......
    Sorry to be such a bother!

    Chris.

  • edited 8:07PM

    I just get a still image of the first frame......

    Have you set the duration to a very low value? You can set the duration to 'keypress', to play the video until you press a key, or to a value in milliseconds.

    Cheers,
    Sebastiaan

  • edited 8:07PM

    That was it. I'd been following the catface tutorial and so I'd set the duration to 0. Excellent, it's working well now, thanks for all your help!

    Chris.

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