Howdy, Stranger!

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

Supported by

problems w video presentation using media_player_mpy

edited August 2016 in OpenSesame

Hello everyone,

I am creating an experiment in which I want to present 52 videos at 30 seconds each. The videos are (currently) all .avi files and quite large (around 500 MB). Therefore, I have added them all to the experiment folder (instead of loading them directly into the file pool) and am using legacy as a backend. I tried to display them using the media_player_mpy plugin but sadly that drops a lot of frames. Also, there is a noticeable time lag from the previous slide to the one where the video presentation starts (where I assume the file is being loaded).

I have tried creating this experiment with an older OS version earlier this year and used the vlc player and alternatively the media player plugin but didn't get much luckier either. I've also been through several file formats including .flv and .mov and tried creating the experiment in two "blocks" (that is creating two separate experiments to keep the overall size of the file pool smaller) but none of that really gave me a smooth video presentation. I had hoped that by shortening the videos (they used to be 2 mins before I cut them to 30 secs) and using the new version of OS maybe this would solve itself but I still have roughly the same problems.

So if anyone has advice on how I can display my videos so they run smoothly, I would be very very greateful.
Is there a better file format I can use or a way to somehow pre-load the videos? Participants fill out a number of questions after each video, so maybe during this time the next video could be pre-loaded somehow? (I have no idea if this is possible in OS, but my supervisor keeps pointing out to me that this would be the go-to solution in presentation)

Thanks a lot in advance for any advice!
Johanna

Comments

  • Hi Johanna,

    The performance of media_player_mpy was usually quite good during testing, even with full HD files at high framerates. With preloading, do you actually mean pre-buffering (as in drawing video frames ahead of time?). This is not really supported by media_player_mpy at the moment and I doubt it would actually help. I do notice that you are using legacy as your backend, and as it happens, this is the only non-hardware accelerated backend, which means it is slower than the psychopy or expyriment backends, which are hardware accelerated and should boost a much higher performance.

    If this doesn't solve anything we need to look elsewhere. Before I can really help you, could you answer the following questions?

    1. What platform are you on? (Windows, Mac OS, etc.)
    2. What are the specs of your laptop (or how old is it?). It may be that your laptop is simply not powerful enough to play the movie files.
    3. Can you give me some more information about the movie files, as in what is their resolution and the frames per second they need to play with? You could use MediaInfo for this. Right-clicking on the movie file and then selecting "Get Info" or "Properties" should also provide some information, but usually this misses information about the fps.

    You could also send me (a few of) the movie files you have trouble with with wetransfer or a similar service so that I can see how they run on my computer.

    Buy Me A Coffee

  • edited August 2016

    Hi Daniel,
    thanks a lot for your reply! And thank you for offering to take a look at the videos, sadly I cannot send them over because they are patient videos that I cannot share.

    I have tried switching to xpyriment or psychopy (as was also suggested in your help file, I just realised - sorry for missing that) but that didn't really help. xpyriment was slightly better than the other two but still very buggy.

    I am using Windows and the videos play at 50 frames per second and have a resolution of 1280 x 720. The computer is our lab computer and pretty new and well equipped (I can write down all the details if that's still needed), so I don't think that should be the problem.

    I have played around with the encoding of the videos a bit more and it seems to me that this could be the solution. To be honest, I know next to nothing about video encoding but it seems that the avi encoding the program I used to cut the videos defaulted to makes the videos bug. I have switched back to an flv encoding (at the loss of some quality) and just tested the experiment with 4 videos (still need to convert the rest) and so far it works fine. So currently I'm planning to switch back to flv and hope the experiments runs with the 52 shorter videos.

    Daniel, do you have any general recommendations about codecs that work better than others? I have just gone through a few codecs on a trial and error base and the flv codec was the first that worked, but I'm sure it's not necessarily the best (just wondering before I convert all 52 videos).

    Cheers,
    Jo

  • Hi Jo,
    Ah that explains it. 50fps at 720p in Windows is really stretching it. Somehow Windows is the only platform that is troublesome with higher framerates, as Mac OS and Linux easily play 60fps without stutter. I haven't been able to pinpoint the cause of Windows' worse performance.
    If you could do with less fps, say 30, you could downsample the videos to a lower frame rate and you should definitely be fine.
    That being said, flv is a pretty good format. It stands for flash video, and even though Flash itself is on its decline, the video format is still prominently used. You could also try mp4 or the widely adopted h264 format, although I don't think this will matter much, as the high fps is the largest culprit here. Hopefully I will find a fix for this somewhere in the near future...

    Buy Me A Coffee

  • Hi Daniel,
    thanks a lot for pointing out the issue with the frame rate. I have played around with the video settings a bit and will go with a h264 codec and 30 frames per second, ending up with .mp4 files that are remarkably smaller than the original (around 10 MB instead of 500), which so far seems to work fine. The flash videos seemed to work, too, but for some reason the h264 encoded videos looked a bit better, so I went with them.

    Thanks for all the work you put into this plugin and for helping me out! I will post again once I've converted everything and tested the experiment to let you know how well it runs with all 52 videos included.

    Cheers, Jo

  • Great! I'm happy it works better now. Let me know indeed how the experiment worked out in the end.

    Buy Me A Coffee

  • Hello again =)
    So far the experiment runs smoothly with the specifications I described above. We'll do some more extensive testing before we start collecting patient data, but I think it should be fine, now.

    Thanks again for your help, Daniel!

  • update: i just tried a new video that has sound (previous videos had no audio). I still get the flash of a black square and then blank screen, but i can hear the video continuing to play.

    So it seems the video is playing but there's a problem with the visual.

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