GStreamer "SimpleMovieDemo" win x64 上的错误

GStreamer "SimpleMovieDemo" bug on win x64

电影没有播放。即使我尝试 运行 "SimpleMovieDemo".

,Matlab 也崩溃了

在 post Windows 上 运行ning 时,我已经完成了建议的所有建议: https://github.com/Psychtoolbox-3/Psychtoolbox-3/issues/234。 我使用 "matlab.exe -nojvm",并尝试了 java、GStreamer 和 Matlab 版本的多种组合。

只是 运行ning "SimpleMovieDemo":

时我仍然会收到此错误
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 Screen
Usage:

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

Error in SimpleMovieDemo (line 49)
    movie = Screen('OpenMovie', win, moviename);

请帮我用Matlab PTB放电影

tl;dr:重新安装 GStreamer,但在安装时选择 "Custom installation"(不要使用 "complete" 或 "regular" 选项!),然后手动选择所有组件选项。之后,"SimpleMovieDemo" 将通过 "Matlab.exe -nojvm".

按预期工作

我花了一些时间才在 "help gstreamer" 下找到这个隐藏的小解决方案,但在 header "Apple OSX" 下,但它在 Windows 10 上非常有效x64:

When the installer asks you to select the components it should install, select a "Custom installation" (instead of a "Basic installation" or such). Then, if you chose a "Custom installation" in the displayed check list of packages to install, select all components manually, if you want support for all video formats and all functionality. Without this, many popular video formats like H264 video will not play at all, or video recording / video capture and similar functions may not work. In fact, even our own demos, e.g., SimpleMovieDemo will fail if you don't have all codecs installed! -> If SimpleMovieDemo doesn't work, then the most likely cause is that you didn't select all GStreamer packages for installation, so restart the installer and repeat installation with the full set of packages.

实际上选择“自定义安装”对我的心理工具箱不起作用。 我也遇到了和你一样的问题。当时我的 psychotoolbox 版本是 3.0.15,在 google.

上寻找答案

我找到了 url:https://github.com/Psychtoolbox-3/Psychtoolbox-3/wiki/FAQ#how-to-resolve-gstreamer-problems。它说“在 Windows 上:使用 GStreamer 1.16.0 MSVC 或更高版本升级到 Psychtoolbox 3.0.16 并重试。”

然后我将我的 Psychtoolbox 升级到最新版本的 3.0.17 并下载 GStreamer 1.18.1 runtime MSVC(不是开发版或 MingW,它们不会工作).我为我的 GStreamer 选择典型安装,然后在 matlab 上测试 SimpleMovieDemo。

终于成功了。其实我也不知道是什么原因,希望我的经验能帮到你。