Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

media_player_mpy doesn't close the video adequately causing a build up of open files #6

Open
humanboring opened this issue Aug 2, 2018 · 8 comments

Comments

@humanboring
Copy link

As described at https://forum.cogsci.nl/discussion/4004/another-errno-24-too-many-open-files-error when loading a large number of video stimuli using media_player_mpy in an OpenSesame project the plugin causes the "[Errno 24] too many open files error".

@dschreij
Copy link
Member

dschreij commented Aug 3, 2018

Hmm, I don't think this is easy to solve. The problem is that video files are opened during the prepare phase of a sequence to ensure a quick start of the video playback whenever the run phase of the item is reached. If you have many videos in one sequence, then they are indeed all opened/loaded before the first one is played. I could fix this by moving the opening/loading procedures to the run phase, but this may delay the start of playback and possibly introduce other kinds of problems. @smathot, what do you think about this?

@dschreij
Copy link
Member

dschreij commented Aug 3, 2018

Just for my understanding, how many videos do you estimate you are loading at once?

@humanboring
Copy link
Author

I'm opening about 196 videos, but each one multiple times (5 different durations). If each duration counts then it would be 960

@dschreij
Copy link
Member

dschreij commented Aug 6, 2018

Alright, that's quite a lot. I haven't tested with that many videos. Do you all have them in one sequence, or do you use a loop item in which you repeat the playback of one or more videos?

@humanboring
Copy link
Author

I have a sequence of playing the same video multiple times (for different durations) and then this is looped to change to a new video until each has been played

@sakelariev
Copy link

Wondering if anyone has found a solution or workaround for this problem? I'm also experiencing the same problem (120 1-sec videos), but so far I can't find a way to make it run on Windows, on Mac I don't have this problem.

@dschreij
Copy link
Member

I've been neglecting this project for quite a while and my response here. Sorry for that. I don't have an idea how to solve this for OpenSesame without altering the prepare-run paradigm. I hope I find the time soon to dive deeper into looking for solutions, but as it looks, this won't be in quite a while...

@dschreij
Copy link
Member

Alright, some time is opening up and I hope to have a look at this soon. Will keep you posted!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants