play many movies with transparent background and variable playposition
September 13, 2024 01:58AM
Dear Jaewon,

I am trainning a monkey to identify movie clips. The trainning paradigm is quite like DMS tasks, but with the pictures replaced by movie clips. I need the movies to be tranparent to the backgroud and can be played and variable playposition at each trial.

Currently, I preloaded the ARGB movies (~700 MB/movie,11movies in total) as TaskObjects during the first run of the userloop script, via gen(moviefile), however, I failed to set the PlayPosition of the TaskObjects at each trial.

I tried preloaded the ARGB movies as persistant matlab matrices and generate movie via MovieGraphic with movie data specified by Y-by-X-by-4-by-N type matrix. In this way, I can change the playposition at each trial, however, MonkeyLogic produced huge bhv2 file that I can't afford.

I also tried to make some avi/mp4/... movie files, but Matlab VideoWriter don't support 4 channels.

Do you have any suggestions?

Thank you!
Re: play many movies with transparent background and variable playposition
September 13, 2024 05:01AM
Why did you fail to set the playback position of TaskObjects? How did you do it?
Re: play many movies with transparent background and variable playposition
September 14, 2024 03:40AM
I set the playposition by specifing TaskObject.MoreInfo{i}.CurrentPosition in the timing file, it doesn't work. Actually, I am not sure is this the correct parameters, but I can't find a more appropriate one. BTW, set TaskObject.Scale(i) in the same timing file works well.
Re: play many movies with transparent background and variable playposition
September 14, 2024 04:29AM
MoreInfo and Scale are the properties of TaskObjects, but CurrentPosition is just a field of MoreInfo, not part of TaskObjects.

You are supposed to use rewind_object() to change the playback position of MOV or SND.

To manipulate the properties of TaskObjects, use one of the following timing script functions.
reposition_object()
rescale_object()
rotate_object()
Re: play many movies with transparent background and variable playposition
September 17, 2024 11:22AM
rewind_object() works quite well, thank you very much!

The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.