Psychtoolbox Errors on unsupported Apple Silicon Mac with GStreamer

Hello,

I am having some difficulty running the SimpleMovieDemo in Psychtoolbox. I am using Matlab R2022b on a MacBook Pro M1 (MacOS 13.0 (22A380)) and Psychtoolbox version 3.0.18. I have downloaded what Matlab advised me:
Runtime v1.18.5
https://gstreamer.freedesktop.org/data/pkg/osx/1.18.5/gstreamer-1.0-1.18.5-x86_64.pkg.

When I try to run SimpleMovieDemo, I get the error pasted below. What can I do to resolve this? Please let me know if there’s any additional information I can provide that would be useful, and thank you in advance for your help!

***>> PlayMoviesDemo***
***Serious or cool? Type s or c [s/c]? s***
***ITER=1::***


***PTB-ERROR: Tried to startup GStreamer multi-media framework. This didn't work, because one***
***PTB-ERROR: of the required GStreamer runtime libraries failed to load, probably because it***
***PTB-ERROR: could not be found, could not be accessed (e.g., due to permission problems),***
***PTB-ERROR: or most likely because GStreamer isn't installed on this machine at all.***
***PTB-ERROR: Another reason could be that you have a too old GStreamer version installed.***
***PTB-ERROR: You need at least version 1.18.***

***PTB-ERROR: Please read the help by typing 'help GStreamer' for installation and troubleshooting***
***PTB-ERROR: instructions.***

***PTB-ERROR: Due to failed GStreamer initialization, the movie playback engine is disabled for this session.***

***Error in function OpenMovie: 	Usage error***
***GStreamer initialization failed due to library loading problems. Aborted.***
***Error using PlayMoviesDemo***
***Error using Screen***
***Usage:***

***[ moviePtr [duration] [fps] [width] [height] [count] [aspectRatio] [hdrStaticMetaData]]=Screen('OpenMovie', windowPtr, moviefile [, async=0] [,***
***preloadSecs=1] [, specialFlags1=0][, pixelFormat=4][, maxNumberThreads=-1][, movieOptions]);***

Thank you,
Ellen

Are you sure you are using the Intel version of MATLAB, and not the Apple Silicon beta? If you are using Intel then I would have assumed it should work with an Intel GStreamer and Intel-compiled PTB, not sure what the problem may be.

You should consider getting a licence and Mario would be able to problem solve better than we can.

FWIW I am using the latest V1.22 (universal) Gstreamer with Intel MATLAB 2022b, but the development version of PTB (V3.0.19) on an M2 Macbook Air without any issues…

Hi, thank you for your answer.

As I am a real computer noob… How do I check with version I am using?
The specification say:
R2022b Version 4(9.13.0.2166757)
64-bit(maci64)

How do I change this to the Intel Version? Can this run on a M1 chip macOS?

thanks!

maci64 is Intel, so that is not the problem. Yes the Intel version of MATLAB runs fine using rosetta2 emulation.

Using the excellent suspicious Package GStreamer is not signed and perhaps it could mean there is a quarantine or other security issue. You could try to force dequarantine it:

sudo xattr -r -d com.apple.quarantine /Library/Frameworks/GStreamer.framework/

You could also try to force remove GStreamer (sudo rm -rf /Library/Frameworks/GStreamer.framework) and redownload + reinstall. Or try V1.22 which at least works for me…

1 Like

Btw., just a friendly reminder that there currently is no worse choice of hardware than Apple Silicon Macs with macOS for running studies that require any kind of trustworthy or accurate visual stimulation timing precision. Because I’m curious about people using silicon macs, given that PTB is not at all officially supported on these machines yet, I googled your name and the first hit that came up suggests somebody using EEG methods, so i thought this might be something to point out.

-mario

Yes, just to reiterate what Mario, macOS systems should be used for development only. MATLAB is emulated and Apple have not properly supported OpenGL for many years on their systems. Linux provides excellent control and you should be able to code on a macbook, then run on a Linux workstation in the lab…

Oh, another thing you can try is to make sure you start MATLAB using the terminal. At least for PsychHID, I cannot get keyboard functions to work when running MATLAB directly (even though it is registered in the security settings). It only works running from the terminal. Open terminal and type matlab & to run it in the background…

1 Like

Hi,

yes after some days cursing I came to the same conclusion. As I just started my PhD and just need to develop the experiment, I thought it would be ok. However, I need to know somehow that my scripts are indeed working. The actual testing and data collection does not happen on a macOS :slight_smile:

1 Like