Multiple Video Clips - Buffering Issues

346 views
Skip to first unread message

Stephen

unread,
Aug 2, 2011, 4:09:13 AM8/2/11
to psychopy-users
Hi,

I'm trying to create an experiment that consists of several audio-
visual stimuli. In PsychoPy there seems to be an upper limit to the
number of video clips that can be included before buffering problems/
stutter gets introduced. Is this a known issue?

Here is what I want to do:

1. Include approximately 60 audio-visual video clips
2. Each clip is a flash movie, about 32 seconds long, and
approximately 26MB in size
3. After each clip is played users are asked to rate various aspects
of its quality

Here is what happens:

1. PsychoPy seems to preload all video clips before the experiment
begins (I know this, as if there is a mistake in the path for one of
the clips, the experiment fails at the beginning rather than at the
point in the timeline when the video is scheduled).

2. Video clips are played perfectly, but only if the total number of
clips doesn't exceed about 7 (i.e. total size of video set !> 7 x
26MB).

3. If I include more than 7 video clips, the playback of every clip is
distorted and both audio and video start to stutter/jam. As my
experiment is concerned with audio-visual quality, this is not good.


My question is: is there an upper limit built in to PsychoPy regarding
the amount of audio-visual/video data that can be included in a single
experiment? Of course, I can overcome this by splitting the experiment
into several parts, each of which containing 7 or less video clips but
it would be great if I could do it all in one.

I am using PsychoPy2 (recently downloaded).

Any help greatly appreciated!

Thanks :-)

Stephen

Jonathan Peirce

unread,
Aug 2, 2011, 4:15:37 AM8/2/11
to psychop...@googlegroups.com
How are you creating these? In Builder? Are you literally creating 60
movie components, or a single one that changes its movie file on each
repeat? If you're doing the latter I can't imagine why PsychoPy would
try to load all 60 at the beginning of the exp. I have a feeling you
must be trying to create lots of separate movie objects

Jon

--
Dr. Jonathan Peirce
Nottingham Visual Neuroscience

http://www.peirce.org.uk/


This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment
may still contain software viruses which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.

Stephen Wilson

unread,
Aug 2, 2011, 4:20:27 AM8/2/11
to psychop...@googlegroups.com
Hi,

thanks for the speedy reply! Perhaps I'm doing it wrong, but yes, I was creating separate individual movie clips for each one. I was working through the Builder. Is there an easy way to substitute the filename for a single movie object so that on each repeat it moves to the next one in a directory? This would be an ideal solution :-)

Thanks again for the response!


Stephen


--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To post to this group, send email to psychopy-users@googlegroups.com.
To unsubscribe from this group, send email to psychopy-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/psychopy-users?hl=en.


Jonathan Peirce

unread,
Aug 2, 2011, 4:31:09 AM8/2/11
to psychop...@googlegroups.com
Set your filenames in an excel spreadsheet (xlsx) and create a loop in your flow that repeats your routine selecting trial types 'sequentially'. Have a look at the demos included in the builder.

Jon
To post to this group, send email to psychop...@googlegroups.com.
To unsubscribe from this group, send email to psychopy-user...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/psychopy-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "psychopy-users" group.
To post to this group, send email to psychop...@googlegroups.com.
To unsubscribe from this group, send email to psychopy-user...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/psychopy-users?hl=en.

Stephen Wilson

unread,
Aug 2, 2011, 4:46:15 AM8/2/11
to psychop...@googlegroups.com
Great, thanks!

Stephen Wilson

unread,
Aug 2, 2011, 9:51:16 AM8/2/11
to psychop...@googlegroups.com
Hi Jonathan,

sorry to bother you again with what is no doubt a very stupid question. I am unable to get the loop to work with the files listed in an Excel sheet as suggested. The Excel format I use is CSV as I can't save as xlsx.

I'm confused as to whether absolute or relative pathnames should be used. (I have tried both but with no success). This is what I do from the Builder:

1. Create a movie object, specifying the path to the initial file to be used (e.g. "D:\exp1\file1.flv")
2. Create a loop, selecting "sequentially" from the CSV file containing the filenames.
3. The PsychoPy experiment, the datafiles, and the CSV file are all in the same directory.

What happens is that the initial fully specified video executes (i.e. the movie object created explicitly in the builder), but none of the files listed in the Excel file get looped.

I've tried to find examples in the demo section but have not been able to find anything explicitly referencing an Excel list.

What sometimes happens is that PsychoPy tries to generate a filepath which ends up being wrong (something like: D:\D:Exp1\mymovie.flv). I can stop this happening but still amn't able to get the loop to work correctly.

Do you have any idea what I am doing wrong, or could point me to the correct demo example?

Thanks again fro your help


Best wishes,

Stephen

Rebecca Sharman

unread,
Aug 2, 2011, 9:59:30 AM8/2/11
to psychop...@googlegroups.com
Hi Stephen,

I think if I'm understanding what you've written correctly that you're not telling builder where to look for the list of file names.
What you need to do is specify the csv file to the loop (which I think you're doing right) and then use a code snippet to tell
the movie component what to play. That means entering the dollar sign followed by the column name (from the csv file) into
the movie component, entering something like $movie in your stage 1, rather than the path.

Hope that helps,
Becky

Stephen Wilson

unread,
Aug 2, 2011, 10:48:46 AM8/2/11
to psychop...@googlegroups.com
Indeed! D'oh!!

Thanks a million Becky :-)

Best,

Stephen
Reply all
Reply to author
Forward
0 new messages