# Movie doesn't play

**URL:** <https://discourse.psychopy.org/t/movie-doesnt-play/8103>\
**Category:** Coding\
**Created:** [June 12, 2019, 7:56pm UTC](https://discourse.psychopy.org/t/movie-doesnt-play/8103 "2019-06-12T19:56:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vicky](https://avatars.discourse-cdn.com/v4/letter/v/b19c9b/32.png) [@Vicky](https://discourse.psychopy.org/u/Vicky)\
**Post date:** [June 12, 2019, 7:56pm UTC](https://discourse.psychopy.org/t/movie-doesnt-play/8103/1 "2019-06-12T19:56:53Z")

</div>

I am new here and don’t have experience about Psychopy before. I am trying to add video stimulus in my task, but when I try to add the .mp4 video by using MovieStim3, the video doesn’t play. The code shown below:

```auto
from psychopy import visual,event

win = visual.Window(
        size = [800,800],
        units = "pix",
        fullscr = False,
        color = [0,0,0],# [1,1,1]=white [0,0,0]=grey
        monitor="testMonitor")

  mov = visual.MovieStim3(
        win=win,
        filename = "Countdown.mp4",
        flipVert=False)

mov.draw()
win.flip()
event.waitKeys()
win.close()

```

\*\* I haven’t built the whole module yet. I want to make sure my video module works well first, and then add multiple modules together. But I have been stuck here for a while now, thanks for your help!!

---

<div class="post-metadata">

**Author:** ![Michael](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/michael/32/16_2.png) [@Michael](https://discourse.psychopy.org/u/Michael)\
**Post date:** [June 12, 2019, 11:14pm UTC](https://discourse.psychopy.org/t/movie-doesnt-play/8103/2 "2019-06-12T23:14:53Z")

</div>

Hello, in the future, please do this to make your code readable (I’ve already edited your post above), as often issues with code are due to indentation problems, and we can’t see these when code is posted as normal text:

> [@Please surround python code with backticks](https://discourse.psychopy.org/t/please-surround-python-code-with-backticks/1775):
>
> When you include python code on this forum please put triple “backticks” like this ``` on the line before and the line after your code. If you’ve done it correctly then your code will appear in a grey box with correct indentation like this (check the preview of your post on the right hand side before posting it) and other people will be better able to work out what might be right/wrong with your code. if myVal==True: break If you’ve already posted something that didn’t follow this rule th…

But in answer to your question, check out the movie demos under the demos menu in the Coder view of PsychoPy. In essence, you need to actively play a movie, by drawing each of its frames. At best above, the code would just draw the first image from the movie and then pause, waiting for a key. You need instead to create a loop, and call `mov.draw()` and `win.flip()` repeatedly until the movie is finished.

---

<div class="post-metadata">

**Author:** ![Vicky](https://avatars.discourse-cdn.com/v4/letter/v/b19c9b/32.png) [@Vicky](https://discourse.psychopy.org/u/Vicky)\
**Post date:** [June 13, 2019, 5:18pm UTC](https://discourse.psychopy.org/t/movie-doesnt-play/8103/4 "2019-06-13T17:18:53Z")

</div>

Thank you so much for your help! The demos menu is a very good resource!
