Howdy, Stranger!

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

Supported by

Movie Custom Script and Backends

Hello, All,

I am designing an experiment in OpenSesame in which participants will watch a movie and be able to pause and unpause playback as needed. I am using the media_player_mpy plugin for this, but am running into some issues with the custom code (which sends annotations to our EEG and eye tracker when playback is paused) and the backends. When the psychopy backends are selected, the custom code works perfectly but the movie doesn't play (although you can hear the sound). When the legacy or expyriment backends are selected, the movie plays perfectly but the custom code does not call or function correctly (executes repeatedly without being called or executes twice for every call). I am also having issues with window size, but am already addressing those via disabling auto-scaling, etc.

I have already confirmed that I am using the latest version of OpenSesame and the movie plugin.

Does anyone have an idea how I might fix the above issue so that the movie plays AND the custom code calls and works as intended?

Thanks in advance!

Comments

  • Hi,

    I am not a video export, particularly not regarding the plugins, so 90% of my advice when it comes to video playback is to use OpenCV2. As it is scripting based (and not particularly difficult), you can integrate it quite easily with custom code, and sending triggers to EEG systems. So, you can try to set up the video playback first, and when it works add the other parts to it.

    Hope this helps,

    Eduard

    ps. that being said, I am not saying that you cannot use the media player plugin. I just wouldn't know how to help you with this. Perhaps someone else can!

    Buy Me A Coffee

  • Hello eduard,

    Thank you for your quick reply! Unfortunately, just using OpenCV2 on its own does not solve our problem because this package will only handle the video and will not play the audio, which we require as well. We'll keep playing with it and consider a dual OpenCV2/ffmpeg or other solution if we can't get the built-in plug-in to work. Any recommendations on the latter front?

    We're not locked into using the plug-in. We generally just need a way to play the video and audio from an mp4 file in sync.

    Thank you again!

  • Ah I see, if you need audio (just) using opencv won't work. It might be worthwhile to invest time into the dual setup.

    As for the plugin, I can't give you reliable information. Back in the day when I still used it occasionally, I usually ended up trying out backends (psychopy, expyriment, pygame), plugins (mp4, vlc) and video formats (avi, mp4, etc) until it works. Maybe you can find a combination that works for you. Unfortunately, I don't know enough about them, to give specific advice which setup should work under which circumstances. Sorry!

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.