[solved] Problems Using Multiple Videos
Hi there,
I am having trouble running an experiment with a loop of 16 videos:
I'm using the video player set up like so:
However, when I run the experiment all I get is a blank screen, yet after making 16 allowed responses the experiment ends as it should. I have no trouble playing videos in OS, the experiment works fine with one video (using the name of the file instead of [Actor]). Also if I put anything before the video player (e.g. a fixation dot) it just stays on the screen and does not disappear as it should.
Is there something I'm doing wrong?
Comments
Hi,
The
video_playerhasn't been updated for a long time (it's deprecated in favor of these options, although these may not work for Mac OS). What you are running into is that thevideo_playerdoesn't support the[variable]notation. Only direct names work.Fortunately, you can work around this through a hack, by placing the following code in the Prepare phase of an
inline_scriptitem that you place before thevideo_player:This script sets the
video_srcvariable for thevideo_playeritem, and allows you to refer to another variable, in your caseActor. Does that make sense?Hope this helps!
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi Sebastiaan,
I'm not very good with code but tried what you said:
However now I'm getting an error:
Have I missed something?
Chris
Hi Chris,
Let's walk through the command.
expis the experiment object:The experiment has a property
items, which is a dictionary of all the items:In this dictionary, the item names are the keys, so you can get the Emotion item like this:
You can change attributes (i.e. variables) of the item like this:
Does this make sense? So the problem was that you didn't specify the name of the item, which is Emotion, but just copied the code that assumed the item was named video_player.
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Ah excellent! Haha I told you I was new to this.
So the videos are displaying now (and in a random order which is great) but they still don't play? I just get a still image of the first frame......
Sorry to be such a bother!
Chris.
Have you set the duration to a very low value? You can set the duration to 'keypress', to play the video until you press a key, or to a value in milliseconds.
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
That was it. I'd been following the catface tutorial and so I'd set the duration to 0. Excellent, it's working well now, thanks for all your help!
Chris.