Howdy, Stranger!

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

Supported by

Multiple .avi video image playback issue


I have added 10 moving .avi video images for the 3rd part of an experiment I am designing:

Pt 1: Training section.
Pt 2: Static web page images.
Pt 3: Moving web page images.

Although these run perfectly well when presented for 3000 milliseconds in loop 1 (of Pt3) when I try to add the "Z" or "M" keyboard response into the second presentation, the video images will not display (even after setting the Duration to 0)?

I have changed the duration between "0", "key press" and "3000" but this has not worked so far, even though this does when using still images?

Any help or advice would be fantastic, even a pointer to a guide that explains how to do this (if there is one)?!

Many thanks,
'Dusty'  

Comments

  • edited March 2017

    Hi Dusty,
    the video player items work a little bit differently than the other OpenSesame items. If you set the duration to 0, the video will not play at all! To collect responses during video playback, you need to use the script box of the videoplayer item. You can find instructions about how to use scripts, and the variables that are available, in the item's help page. A (untested) script that should do the trick in your situation:

    # Set movie start time if it hasn't been set. This segment of code will only run once at the start of movie playback (i.e. when the variable start_time doesn't exist yet)
    try:
        start_time
    except:
        start_time = clock.time()
    
    if event and event[0] == "key":
        pressed_key = event[1]
        if pressed_key == "z":
             # place code that processes a z response here, e.g.
             # responses.add(response_time=clock.time() - start_time, correct=1, response='z')
             continue_playback = False   # if you want to stop video playback after a response
        if pressed_key == "m":
             # place code to processes a m response here, e.g.:
             # responses.add(response_time=clock.time() - start_time, correct=0, response='m')
             continue_playback = False   # if you want to stop video playback after a response
    

    To let this work correctly, you also need to set the Call custom Python code setting to after each frame and set Duration to the maximum value you want to show the video for. Just to be clear, I haven't been able to test the above code, so I'm not entirely sure if this script works directly. You also need to add the logic that determines if a response is correct yourself (and pass this to the responses.add() function). Finally, remove any keyboard_response items you had previously placed after the video player items; response collection is now handled by the video player item itself in its script.

    I agree it is a difficult way to collect responses during video playback. Hopefully we can make this a bit simpler in the future.

    Buy Me A Coffee

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