Cannot play a video anymore
Hello,
I am in panic because I have an appointment tomorrow at 13:30 to run an experiment. I checked this morning that my script was still working but it does not.
I used with success either the GST or the VLC plugins to play videos with OpenSesame 2.9.x. I also used the VLC plugin with OpenSesame 3.0.2 without problems. I updated from VLC 1.6 to 2.1.6 and and from OpenSesame 3.0.2 to 3.0.5. Now only the sound is played with the VLC plugin but not the image (I hear sound but the screen is not affected by the video). Except the absence of video image, everything runs fine. I tried all Back-ends with different settings to no avail.
I took back an older version of the script using the GST media player instead of the VLC. I ran into this error:
File "/usr/lib/pymodules/python2.7/libqtopensesame/misc/process.py", line 140, in run
exp.run()
File "/usr/lib/pymodules/python2.7/libopensesame/experiment.py", line 390, in run
self.items.execute(self.var.start)
File "/usr/lib/pymodules/python2.7/libopensesame/item_store.py", line 95, in execute
self.run(name)
File "/usr/lib/pymodules/python2.7/libopensesame/item_store.py", line 110, in run
self[name].run()
File "/usr/lib/pymodules/python2.7/libopensesame/sequence.py", line 50, in run
self.experiment.items.run(_item)
File "/usr/lib/pymodules/python2.7/libopensesame/item_store.py", line 110, in run
self[name].run()
File "/usr/lib/pymodules/python2.7/libopensesame/loop.py", line 144, in run
self.experiment.items.execute(self.var.item)
File "/usr/lib/pymodules/python2.7/libopensesame/item_store.py", line 94, in execute
self.prepare(name)
File "/usr/lib/pymodules/python2.7/libopensesame/item_store.py", line 126, in prepare
self[name].prepare()
File "/usr/lib/pymodules/python2.7/libopensesame/sequence.py", line 121, in prepare
self.experiment.items.prepare(_item)
File "/usr/lib/pymodules/python2.7/libopensesame/item_store.py", line 126, in prepare
self[name].prepare()
File "/usr/share/opensesame/plugins/media_player_gst/media_player_gst.py", line 639, in prepare
path = self.experiment.get_file(str(self.eval_text(self.get("video_src"))))
File "/usr/lib/pymodules/python2.7/libopensesame/item.py", line 280, in __getattr__
raise AttributeError(u'%s not found' % var)
AttributeError: eval_text not found
I tried many possibilities for the video field of the gst plugin but I always got the same error message. I also tried the legacy and the Expyriment (0.0.8 version) Back-ends for the same result.
I do not mind which video plugin to use, I just hope to have one of them running by tomorrow 13h30. Any idea where I could look for? I run out of ideas right now. Thanks in advance,
pit
Comments
Hi pit,
Are you running OpenSesame from source or a packaged version?
For the VLC plugin: the problem you are having is known, but there is little we can do about it. It mostly depends on the OS + videocard manufacturer combination. A fail-safe (but not preferable) solution is to run the experiment in windowed mode, and make the window fill the whole screen by specifying the screen resolution as the canvas size. If I am correct, vlc movie playback always works in windowed mode.
As for the gst plugin: can you specify which version of OpenSesame you are running into this problem with? Is this in 3.0.x or after you rolled back to OpenSesame 2? This info would help me in trying to reproduce the error and fix it. The problem appears to occur in the media_player_gst plugin.
Ok, it is indeed a compatibility problem of the media_player_gst plugin with the new structure of OpenSesame 3. There are two solutions if you want to use the media_player_gst plugin
Use OpenSesame 2.9.7. The media_player_gst plugin should still work correctly in this version
"Monkey-patch" the media_player_gst plugin to work correctly in OpenSesame 3.0.5. Add an inline_script item as the first item of the experiment sequence (or at least before the media_player_gst item occurs in your experiment) and add the following line in the prepare phase of this script:
the media_player_gst plugin should now work again. This should be seen as a temporary solution to get you going, but is in no sense an elegant way to solve this problem. We hope to update OpenSesame or the plugin as soons as possible to prevent his in the future.
Please let me know if this worked for you.
In the meantime, we have done some fixes to the plugin to make it work with OpenSesame 3. you can pull the new version in from https://github.com/dschreij/media_player_gst and replace your old version with this one.
Thanks for your quick answer. Unfortunately, nothing works.
I run Linux Mint 17.3 based on Ubuntu 14.04 (LTS). I installed the OpenSesame package version from the smathot-cogscinl-trusty PPA. This is OpenSesame 3.0.5.
Running the experiment in Window mode (CTRL+W) did not change anything for the VLC plugin. I tried with a window with size of the screen resolution and with a smaller window. I got the same result as in full screen mode. Running OpenSesame from a terminal gave this error twice for each video:
I added the line in the "prepare" part of an inline script which was the first box added after the first "sequence" item. I made a copy/paste of your line: self.items['media_player_gst'].eval_text = self.syntax.eval_text. It broke the script with in the Details section:
and in the Traceback:
I reinstalled my full Linux box last Wednesday, so it is a fresh installation. Any other idea to keep OpenSesame 3.0.5? Thanks again for your reply.
This:
should be
That is,
items
is a global object, and not a property ofself
. See also:Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Sorry, I had not seen that you had uploaded a new gst version before I posted my previous comment. So, using the new gst media player plays the first video but breaks down just after it with:
Adding the 2-line script gives the same result, but I guess that it is normal because you probably had put it in the new gst version. Of course, if I replace the gst player by the vlc, there is no end_response_interval problems.
This seems to progress :-), but there is still a problem. Thanks for your help.
I have a good piece of news and a bad one. The good piece of news is that it works with the VLC plugin, the bad piece of news is that you are going to be frustrated or you will spent a lot of money to put a contract on my head. I made such a stupid mistake that you are going to hate me.
I broke my package tree Wednesday morning 8 days ago. The system seemed as stable as before but my mistake made the package tree incoherent beyond repair. I therefore reinstalled Linux Mint 17.3 on another partition (I have several system partitions) but I forgot to update my Grub menu to put the fresh system on the first line. I had worked for a few days selecting the correct line of the Grub menu, but yesterday I selected the first one by mistake loading my previous broken Linux Mint 17.3.
Thinking about my mistake this morning, I booted the right OS, I installed everything needed and the VLC plugin worked at once with the last VLC 2.2.1 (I had to install it with a PPA because Mint comes with a previous VLC 1.x version).
Unfortunately, GST still breaks the script just after playing the first video as summarized in my previous post. But at least, I will be able to carry out the experiment this afternoon with the VLC plugin. Of course, I am still motivated to solve the GST problem. So, if you have ideas about what to do, I can try.
Thanks to both of you for your patience :-)
Glad you have found a solution before your deadline. and don't fret, these things happen to all of us.
We already encountered and fixed the last error you described. Can you confirm that it sill occurs with the latest version (the master branch, and thus not the latest release) you download from https://github.com/dschreij/media_player_gst ?
In my case, the player now works fine even after repeatedly showing a movie which can be ended by a keypress or a set duration.