GStreamer x Windows 11 issue

support key: 0199aa85-0b7c-7d82-9ec1-6b585dd136b3

OS: Windows 11 (Acer PC)
Matlab: R2024b
PTB: latest stable (3.0.22.1)
GStreamer: latest stable (1.26.10), “complete” install

Hi,

We’ve just had to update our OS from Windows 10 to 11 (yes, we know, it’s Windows… sorry) and are now encountering a weird issue on one of our scripts. GStreamer appears to crash when trying to decode an .mkv file, a fixation wheel that plays at every trial. Sometimes the error appears on the first trial, and sometimes a few trials will run just fine and then the crash error will appear. The error also does not appear on a different script that plays the exact same mkv file, but only presents visual stimuli along with it. For this reason, I’m suspecting some weird interaction between GStreamer, Windows 11, and PsychAudio.

The error message goes like this:

PTB-ERROR: Statechange failed with GST_STATE_CHANGE_FAILURE!
PTB-ERROR: GStreamer movie playback engine reports this error:
Error from element matroskademux8: Internal data stream error.
Additional debug info: ../gst/matroska/matroska-demux.c(6360): gst_matroska_demux_loop (): /GstPlayBin:ptbmovieplaybackpipeline/GstURIDecodeBin:uridecodebin9/GstDecodeBin:decodebin9/GstMatroskaDemux:matroskademux8:
streaming stopped, reason not-negotiated (-4).

Error in function OpenMovie: 	Usage error
In OpenMovie: Opening the movie failed I. Reason given above.

ans =

'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]);'

ans =

18

For what it’s worth, during the update to Win 11 I had to change a Bios parameter (to enable TPM 2), and the driver called “AsIO.sys” may be deactivated (apparently this is different from ASIO i.e. is an ASUS file unrelated to audio, and online forums suggests the file can essentially be left deactivated/deleted). Otherwise the update to Windows 11 has been uneventful.

Has anyone encountered something like this? I’ve tried searching online and found nothing (or nothing I can understand, anyway, as my understanding of gstreamer is null). What we’ve already tried, to no avail:

  • We have already been running the experiment in -nojvm
  • Tried locating and deleting GStreamer registry, as hinted on by the PTB website. However, I was not able to locate the relevant registry file on my machine.
  • Reinstalled GStreamer (“complete”)
  • Installed the standalone Windows libraries mentioned in Psychtoolbox-3 - Download, Installation, and Update just in case
  • Reinstalled PTB as well

Thanks for any leads on this!

Happy new year.

So this did work fine before upgrading from Windows 10 to Windows 11?

I wouldn’t expect the TPM activation to cause problems, and that non-loading “AsIO.sys” driver is also not likely involved.

So the error abort (not crash, as Matlab is not completely crashing) happens after some random number of trials, but often works at least the first trial? That excludes damaged files, so things like reinstalling GStreamer, deleting its registry, or reinstalling PTB wouldn’t be expected to help.

Does it work when playing the file in our SimpleMovieDemo, or PlayMoviesDemo?

What’s the difference between the failing script and the purely visual script? Does the failing script use PsychPortAudio in parallel to movie playback? If so, what parameters are used in the PsychPortAudio('Open', ...) call?

Does the spinning wheel movie actually have sound on its own, or is it purely video? If it is purely video, you could pass an optional flag to ‘OpenMovie’ to disable sound output from the movie, so GStreamer doesn’t touch the audio hardware at all: Pass specialFlags1 as value 2.

My hunch based on your statements would be audio related trouble.

Thanks for the suggestions!

This did work fine before updating Windows. We had the spinning wheel video in .mkv format and this has worked fine for years. I did convert the file type to .mp4 and this did the trick. Looks like GStreamer does not like the audio with .mkv videos after updating Windows for whatever reason, so they have to be converted.

So the movie itself does have a soundtrack that needs to be played back? And PsychPortAudio wasn’t used in your failing script on Win-11? Did any of my suggestions help with playback of the .mkv file?

Can you share that .mkv file somewhere for download?

Psychtoolbox so far wasn’t tested on Windows with GStreamer 1.26 iirc. There aren’t any open bug reports in GStreamers bug tracker wrt. Windows-11 and .mkv Matroska video.