# How to play avi files with psychtoolbox on PC ?

**URL:** <https://psychtoolbox.discourse.group/t/how-to-play-avi-files-with-psychtoolbox-on-pc/1948>\
**Category:** Uncategorized\
**Created:** [March 12, 2008, 3:17pm UTC](https://psychtoolbox.discourse.group/t/how-to-play-avi-files-with-psychtoolbox-on-pc/1948 "2008-03-12T15:17:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [March 12, 2008, 3:17pm UTC](https://psychtoolbox.discourse.group/t/how-to-play-avi-files-with-psychtoolbox-on-pc/1948/1 "2008-03-12T15:17:07Z")

</div>

Hi  
  
I'am trying to play an avi file with psychtoolbox and I always have  
the same message :  
  
Error in function OpenMovie: Incorrect argument type supplied  
??? Usage:  
  
[moviePtr [duration] [fps] [width] [height]  
[count]]=Screen('OpenMovie', windowPtr, moviefile [, async=0]);  
  
Here is my code :  
  
 moviename=aviread('.\stimuli\grenoble.avi');  
 [movie movieduration fps imgw imgh] = Screen('OpenMovie', window,  
moviename);  
  
What is wrong ?  
  
thanks for your help  
  
Christophe

---

<div class="post-metadata">

**Author:** ![mariokleiner](https://avatars.discourse-cdn.com/v4/letter/m/13edae/32.png) [@mariokleiner](https://psychtoolbox.discourse.group/u/mariokleiner)\
**Post date:** [March 12, 2008, 6:27pm UTC](https://psychtoolbox.discourse.group/t/how-to-play-avi-files-with-psychtoolbox-on-pc/1948/2 "2008-03-12T18:27:24Z")

</div>

This way's correct:  
  
moviename= '.\stimuli\grenoble.avi';  
...  
  
"help QuicktimeDemos" for some demos.  
  

> --- In [psychtoolbox@yahoogroups.com](mailto:psychtoolbox@yahoogroups.com), "savariaux" \<christophe.savariaux@...\> wrote:  
> \>  
> \> Hi  
> \>   
> \> I'am trying to play an avi file with psychtoolbox and I always have  
> \> the same message :  
> \>   
> \> Error in function OpenMovie: Incorrect argument type supplied  
> \> ??? Usage:  
> \>   
> \> [moviePtr [duration] [fps] [width] [height]  
> \> [count]]=Screen('OpenMovie', windowPtr, moviefile [, async=0]);  
> \>   
> \> Here is my code :  
> \>   
> \> moviename=aviread('.\stimuli\grenoble.avi');  
> \> [movie movieduration fps imgw imgh] = Screen('OpenMovie', window,  
> \> moviename);  
> \>   
> \> What is wrong ?  
> \>   
> \> thanks for your help  
> \>   
> \> Christophe  
> \>

---

<div class="post-metadata">

**Author:** ![Allen\_Ingling](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@Allen\_Ingling](https://psychtoolbox.discourse.group/u/Allen_Ingling)\
**Post date:** [August 22, 2008, 9:14am UTC](https://psychtoolbox.discourse.group/t/how-to-play-avi-files-with-psychtoolbox-on-pc/1948/3 "2008-08-22T09:14:16Z")

</div>

i have the same problem...did you find the answer?  
  
i tried to download quick time since it seemed psychtoolbox works with  
QT's API an dthe only thing i'have obtained is to hear only one second  
of a .mov file (not .avi) without image...  
  
have you got a better results???
