[solved] media_player_gst changing defualt file location
Hello,
I recently installed the plugin media_player_gst into OpenSesame (v. 2.8.3) and needed to change the default file location for GStreamer. The plugin documentation states:
If you needed to install [GStreamer] to a different folder, you will need to edit the variable GSTREAMER_PATH somewhere at the top section of media_player_gst.py and make it point to the location at which you have installed GStreamer.
However, I am not adept enough with code to find where I need to replace the default path with the real path for GStreamer. I can see, however, that in media_player_gst.py there is no variable called "GSTREAMER_PATH." Any help resolving this issue would be greatly appreciated.
Thanks.
Comments
Hi,
Judging by media_player_gst's media_player_gst.py lines 52 to 76, a very decent attempt is made to automatically locate the GST folder wherever it is (assuming you are on Windows). Are you actually experiencing any trouble when using the plug-in?
If so, could you paste the contents of your Debug Window after a crash?
Thanks!
Hi,
The issue is that on my work's servers we are only allowed to save software to a certain network drive, which the script would have no reason to look in.
When I launch OpenSesame and try to add media_player_gst to a new experiment I simply get
OpenSesame could not find the GStreamer framework!.Any ideas on how to remedy the issue would be appreciated!
Thanks!
Ah, I see, thanks for the information.
What I think is going on, is that the environment variable for GStreamer is not set. You can do so manually, by adding in a wee bit of code to the start of the media_player_gst.py script:
Obviously, you will have to change the example path to the actual path in your setup.
Good luck!
PS: alternatively, you could manually set the path in your Windows setup as well. Follow the instructions on this page, and make sure that the name you use for the environment variable is
GSTREAMER_SDK_ROOT_X86, and the value the absolute path to the directory (using backward slashes).Thanks for the help! Unfortunately, it appears to be giving me a different error now.
Sorry to keep bothering you, but I feel like this is so close to being resolved!
Thanks
It is!
osis a Python module that you need to import before you can use it with the following line:Check out SigmundAI.eu for our OpenSesame AI assistant!
Thank you both! After adding that one line of code it appears to be up and running!
Best
Oh, sorry, I should have specified to place the line of code after
osis imported. Glad you got things up and running!Hello OpeSesameTeam,
I followed the instructions as written here above and still when I run an experiment with xpyriment-gst back-end I get the following:
gstreamer path is: C:/gstreamer-sdk
in media_player_gst.py I have added:
import os (in line 32)
os.environ["GSTREAMER_SDK_ROOT_X86"] = "C:/gstreamer-sdk" (in line 49)
media_player_gst.py path is: C:\Program Files\OpenSesame\plugins\media_player_gst-master
Thank you for your time!
You should not need to manually add the
line if the gstreamer framework is installed correctly. The installation process should automatically add this entry to your environment variables. You can check if it is present by going to your system properties windows (or press win key + pause/break) > Advanced System settings > Environment variables. If it isn't there, your installation did probably not complete succesfully. The line should also read something like
Another thing that I can think of is that the python modules were not selected during installation and thus they are not present to be found by this plugin.
Let me know if this worked for you somehow.
Hello dschreij,
thank you very much for your response!
I checked everything you suggested but nothing could resolve the problem.
In our experiment we are using sound and that's why I wanted to use xpyriment-gst back-end.
So, we shall use only "legacy Pygame".
Thank you again for your time and your suggestions.