Videos in loop freeze online

URL of experiment: Maximilian Nentwich / repeat_loop · GitLab

Description of the problem: I am trying to implement an experiment where participants watch a series of movie clips and classify them in two categories. To enable them to replay a clip I wanted to implement a loop like this.

‘video_loop’ goes over the different clips and ‘repeat_loop’ is ‘infinite’, ends when there is a response in semantic_key, or continues when pressing space.

This works fine offline, but online the videos freeze when repeating. I have re-encoded the videos to H264 and used them in other tasks before where they played fine online, so I think something might be going on with this loop.

Other people that had these issues were asked to look at the java script console in their browser, so I am attaching a screenshot here, though I have no idea how to interpret this:

Does anyone have any ideas on how to troubleshoot this?

That looks quite mystifying indeed! To get a bit of a grasp, I’ve got three questions:

  1. Could I ask what browser you are using?
  2. Does the issues reoccur or was it a one-off occurence?
  3. What happens if you loop without the videos?

Thanks for the response!

  1. I am using firefox, but just tried using chrome and the videos get stuck as well.
  2. It happens every time I run it. If I continue to the next movie it works fine (breaking the inner loop). However, replaying the movie by staying in the inner loop, crashes on whichever movie I try it. It might work once or twice, but eventually freezes. When that happens neither continuing to the movie nor repeating again works and I have to abort the task with esc. Also the first movie mostly plays only the sound.
  3. To test the loop without videos, I substituted them with images. Everything works fine then. So, might this be something about loading/reloading the movies?

Sorry for the troubles. Meanwhile I asked around and heard that it’s a known issue for which a fix will come out in the next release (which is almost ready), but I’m afraid I don’t know the details. @sotiri might be able to tell you more about that.

1 Like

Thanks for checking! Would be great if this works in the next release :slight_smile: @sotiri is there anything I can try implementing already?

Hi @MNentwich, thanks for flagging. You can find more details about the issue and how to fix it on GitHub. I have forked your study, but see no MovieStim components in JS and so I am unable to implement the same boilerplate tweak. Please let me know if you need more help, x

1 Like

Thanks for the reply!

Sorry, I had switched the movies with images to test the loop. The JS now contains movies again: Maximilian Nentwich / repeat_loop · GitLab

I also implemented your fix from github: repeat_loop.js · master · Maximilian Nentwich / repeat_loop · GitLab
This does fix the issue with the freezing and the replay works without problems.

However, now the ‘a’ or ‘c’ keys that are set up to continue to the next movie also replay the movie. I am not sure why that is the case?

I also tried to implement the other suggestion from github to end each movie by time. Because each movie has a different duration, I need to load this from a csv file. So, I added this code component after the movie:

Again, this works offline, but online the JS does not find the ‘thisVideo_loop’ variable:
video_time_error

How are variables from the csv actually loaded in the JS? And could this fix the freezing of the movies as well?

Hi @MNentwich, no problem, I have created a support fork to demonstrate a potential fix, please let me know if that fails to solve the issue, x

1 Like

Thanks a lot, this works now!