Howdy, Stranger!

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

Supported by

[solved] Videos on android

edited November 2013 in OpenSesame

Hi,
I would like to run an experiment in children using an android tablet. Opensesame looks really appropriate. However, when I try to insert a video (.avi) using media_player_vlc under a runtime experiment template, it return the following message: Error: Runtime error Description: Only the legacy and xpyriment back-ends are supported. Sorry!
Any idea about that?
Thanks a lot
Gladys

Comments

  • edited 11:03AM

    Hi Gladys,

    Playing videos using the OpenSesame runtime for Android will be tricky, because the Python libraries required for video playback are simply not part of the Android framework that we use (the PyGame subset for Android).

    What kind of videos do you have in mind? If they are short videos, you could consider treating them as a slideshow of images. But if the video is very long, that might be impractical.

    Cheers,
    Sebastiaan

    Buy Me A Coffee

  • edited 11:03AM

    Hi Sebastiaan,

    Thank you ver much for your answer.

    Videos would be 1 minute extracts (.avi format but I can convert them if it is necessary). Can I treat them as slideshow? How does it work?

    Thanks.
    All the best,
    Gladys

  • edited 11:03AM

    Hi again,

    I have few more questions?

    Do you think playing videos using the OpenSesame runtime for Expyriment or others would work on a Windows tablet?

    Do you know if Matlab could also work on a PC/Windows touch screen tablet?

    I need to do an experiment presenting different extracts (1 minute or less) on a touch screen tablet. I haven't buy the tablet yet so, if you have any advise, please feel free to let me know.

    Thanks a lot for your help!

    Cheers,

    Gladys

  • edited 11:03AM

    Videos would be 1 minute extracts (.avi format but I can convert them if it is necessary). Can I treat them as slideshow? How does it work?

    In order to treat them as a slideshow you would first need to convert the video to a series of still images (00001.png, 00002.png, etc.), using video-encoding software, such as mencoder. Then you could write a Python inline script that plays back these images one after another.

    That being said, I don't think that this is really a good option in your case, because it will be a hassle to implement and your videos are quite long, so there will be lots of frames.

    Do you think playing videos using the OpenSesame runtime for Expyriment or others would work on a Windows tablet?

    From what I've heard, yes, OpenSesame runs on Windows tablets. There are many different kinds of tablets though, and to be safe you may want to buy a Windows 8 tablet, rather than a Windows RT tablet. Windows RT devices have mobile processors inside, and I'm not a 100% sure that OpenSesame will run on those.

    Do you know if Matlab could also work on a PC/Windows touch screen tablet?

    I imagine so, but you would have to ask the MatLab guys to be sure.

    Cheers!

    Buy Me A Coffee

  • edited 11:03AM

    Hi Sebastian,

    Thank you very much for your answer.

    I am actually coding the experiment on my lab top (a Windows 7 PC computer). Using "xpyriment", videos did not work well (no image) however I changed to "legacy" and now it's working. I also convert.avi video into .flv.

    I have another question, I would like to know if a video cool be used as a feedback after each trial. In other words, I would like to present four rounds and if the subject touches one round he will obtain a specific video, another round, another video....etc... Is this possible using Opensesame?

    I think so but when I try to do it using two rounds and two different videos (and [correct]=1 or 0), this does not seem to work. Any ideas?

    Sorry I'm really new in this coding stuff...

    Could you help me on this again?

    Thanks a lot!

    Cheers!

    Gladys

  • edited 11:03AM

    Hi Gladys,

    If you use the touch_response plug-in, you can divide the screen into four areas, each of which has a different response code (1, 2, 3, and 4). Using this, you can select which item should be executed based on which area of the screen is tapped with simple Run-if statements, like this:

    [response] = 1
    

    This general idea is also described here:

    Cheers!
    Sebastiaan

    Buy Me A Coffee

  • edited 11:03AM

    Hi,

    Thank you very much Sebastian, it works very well...and I start understanding how opensesame works...it is great!

    However, I have two others questions to finish the programming.
    First, I would like to know if someone has a tactil windows 7 or 8 tablet to test if my experimement runs on it (before buying it), I can send it.

    The second question is about the use of count_variable which I tried to use unsuccessfully. Do you know how I can do to stop the experiment after 5 correct trials (5 responses on the left or the right part of the screen)?

    Thanks a lot for you help!
    All the best,
    Gladys

  • edited 11:03AM

    However, I have two others questions to finish the programming. First, I would like to know if someone has a tactil windows 7 or 8 tablet to test if my experimement runs on it (before buying it), I can send it.

    Maybe you can ask in the shop if you can try it out on a show model? You can run OpenSesame straight from a USB stick.

    The second question is about the use of count_variable which I tried to use unsuccessfully. Do you know how I can do to stop the experiment after 5 correct trials (5 responses on the left or the right part of the screen)?

    See this discussion:

    Cheers!
    Sebastiaan

    Buy Me A Coffee

  • edited 11:03AM

    Thanks Sebastian,

    I start to understand better and better how your software works! It is really great! :) Thank you for your help. My experiment is almost done thanks of you!

    I have a final specific question to finish.

    My last problem was to get 10 correct responses before the experiment ends. So at the beginning, I just define 10 trials (10 rows with a specific video SOA and so on) but if the response was incorrect (for example if the subject keep touching the screen in the wrong side after 10 times the experiment ends).

    So, now there are 10 trials repeated 10 times and the exepriment ensd after 10 correct trials, It seems that it works (ends after 10 correct trials) but I have another issue. I would like to know if and how I can specify that I want each row only once in all the experiment. That means even if we did the 10 cycles, each different trials should be presented only once... is it possible?

    Hope my question is not too basic.. I could not find an answer on the forum but maybe I miss something. Sorry if it is the case.

    Can you help me again?

    Thanks a lot.

    Here is the design of one of my experiment (not the video one but the one using sketchpad but I want to do the same with both experiment).

    image

  • edited 11:03AM

    Hi Gladys,

    So, now there are 10 trials repeated 10 times and the exepriment ensd after 10 correct trials, It seems that it works (ends after 10 correct trials) but I have another issue. I would like to know if and how I can specify that I want each row only once in all the experiment. That means even if we did the 10 cycles, each different trials should be presented only once... is it possible?

    If I understand your problem correctly, there is a logical obstacle here: If you have only 10 trials, and you want every trial to be presented exactly once, then you cannot repeat any trials when the participants make errors, right?

    Perhaps the repeat_cycle plug-in does what you need. You can add this to the end of your trial sequence, and set the Run-if statement (in your case) to [correct] = 0. This means that a trial will be repeated if an incorrect response was provided. So every trial will be repeated until a correct response is received.

    Cheers!
    Sebastiaan

    Buy Me A Coffee

  • edited 11:03AM

    Hi Sebastian,

    Thanks a lot, it works perfectly!
    I will try to use your software on a new touch screen tablet running on Windows 8.1. I'll look forward to test it! I will let you know if it works.

    I have a final question but perhaps it is already on your forum but I could not find it. If so sorry fot the inconvenience.

    I would like to know if it is possible to not taking into account a tactile response, for example do not taking into account when a participant touches a part of the screen (I tried the "allowed response" attribute but it did not work). Is it possible?

    Another way that would be better actually could be to continue to present the current sketchpad even if the participant touches this specific part of the screen (and register somewhere the number of time the participants touch this incorrect part of the screen?)? it's probably trivial but I could not find a way to do it...can you help me again?

    Thank you very much!

    Have a nice day!

    Gladys

  • edited 11:03AM

    Good to hear that you're getting somewhere!

    The touch_response plug-in does indeed not allow you to specify allowed responses. This would be a nice addition, so I filed an issue for this.

    For now, you can implement this quite easily yourself though. Just add an inline_script with the following script in the run phase immediately after your touch_response plug-in. Of course you need to change the allowed_responses variable to match your experiment.

    # A comma-separated list of the responses that are allowed. Other responses
    # are ignored.
    allowed_responses = 1, 4
    # Repeat the `touch_response` item until an allowed response has been collected.
    while self.get('response') not in allowed_responses:
        exp.items['touch_response'].run()
    

    Cheers!
    Sebastiaan

    Buy Me A Coffee

  • edited 11:03AM

    Thanks a lot! It works perfectly!!
    Thanks a lot for your help Sebatian!
    I'll look forward to test it on my tablet!

  • edited 11:03AM

    Hello,
    We also plan to move one of our experiments on a tablet either with Windows or Android.For this, participants see a video for a couple of second before to make their choice amongst 4 possible answers (touch_response).
    We read about the issue with playing videos in Android and we cannot turn the video into a slide show (it's a lip-reading test with many videos). So we'd like to hear whether any improvement was made on this side before to choose the tablet.

    Thanks, Stefania

  • edited 11:03AM

    Hi Stefania,

    No progress on this front, I'm afraid: Running videos with the OpenSesame for Android is currently not possible. So, if this is important for you, I would go with a Windows tablet, which will allow you to simply run the standard OpenSesame windows packages, which do support video.

    Cheers!
    Sebastiaan

    Buy Me A Coffee

  • edited 11:03AM

    Thanks Sebastian for the update.
    While building the experiment for use on a tablet we tested it on Win7 and also came across a problem with touch_response and mouse click. I'm posting this in a new thread.

    Best, Stefania

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