# Videos fail to repeat

**URL:** <https://discourse.psychopy.org/t/videos-fail-to-repeat/20842>\
**Category:** Online experiments\
**Created:** [February 26, 2021, 8:57pm UTC](https://discourse.psychopy.org/t/videos-fail-to-repeat/20842 "2021-02-26T20:57:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![E\_Claes](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/e_claes/32/14195_2.png) [@E\_Claes](https://discourse.psychopy.org/u/E_Claes)\
**Post date:** [February 26, 2021, 8:57pm UTC](https://discourse.psychopy.org/t/videos-fail-to-repeat/20842/1 "2021-02-26T20:57:38Z")

</div>

URL of experiment: [https://gitlab.pavlovia.org/Claes/rpep\_elfe\_claes](https://gitlab.pavlovia.org/Claes/rpep_elfe_claes)

Hi, I use 16 different videos and 32 different conditions. I want to present every condition twice, resulting in 64 trials. However, when the same video is presented for the second time, the experiment freezes on the last frame of that video. There is no error message and the only way to continue is by exiting the experiment. In ‘developer tools’ i get this error message: ‘Failed to load resource: the server responded with a status of 404 ()’.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/9/1/91de81f84ced4df81800b3f6325f1f997a58443d.png)  
I saw two similar threads on this topic where they solved this problem by adding a code component with either movie.play(); at the beginning of the routine and movie.stop(); at the end or just ‘movie.reset();’ at the beginning or both. I’ve tried this but nothing changes and it still freezes when a video is played for the second time. I’ve also tried to copy the videos from 8 to 64 so that there is no iteration needed. But if I then change nReps to 1, no video is presented at all. Is there anything else I can do to solve this? Thanks in advance! It would mean so much for me if there would be a solution!

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [March 2, 2021, 7:04am UTC](https://discourse.psychopy.org/t/videos-fail-to-repeat/20842/2 "2021-03-02T07:04:03Z")

</div>

The error message you’ve shown isn’t related. Everyone gets that (unless they’ve added a favicon).

Are all the videos downloading at the start?

Does it work if you only have a few videos?

Please show any code related to the videos plus your video component.

---

<div class="post-metadata">

**Author:** ![E\_Claes](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/e_claes/32/14195_2.png) [@E\_Claes](https://discourse.psychopy.org/u/E_Claes)\
**Post date:** [March 2, 2021, 4:53pm UTC](https://discourse.psychopy.org/t/videos-fail-to-repeat/20842/3 "2021-03-02T16:53:21Z")

</div>

Hi,  
Thank you so much for replying!  
Yes, all the videos are downloading at the start.  
I encounter the same problem with only a few videos. When 1 of the vidoes needs to be presented for the second time, this happens. Even if it’s just 1 video in total.  
I’m not sure how to share the code though…

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [March 3, 2021, 2:39pm UTC](https://discourse.psychopy.org/t/videos-fail-to-repeat/20842/4 "2021-03-03T14:39:03Z")

</div>

Here’s a previous topic on this issue.

> [@Video stimuli not resetting to beginning in online experiment](https://discourse.psychopy.org/t/video-stimuli-not-resetting-to-beginning-in-online-experiment/10459/13):
>
> Couldn’t you do something like the following…? Begin Routine moviestarted=0 Each Frame if t \> .5 and moviestarted == 0: moviestarted = t myMovie.play() End Routine myMovie.stop() myMovie.seek(0) Best wishes, Wakefield

---

<div class="post-metadata">

**Author:** ![E\_Claes](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/e_claes/32/14195_2.png) [@E\_Claes](https://discourse.psychopy.org/u/E_Claes)\
**Post date:** [March 4, 2021, 7:48am UTC](https://discourse.psychopy.org/t/videos-fail-to-repeat/20842/5 "2021-03-04T07:48:21Z")

</div>

Okay I definitely going to try that! Thank you very much!
