Results 1 to 5 of 5

Thread: how to loop an avi video?

  1. #1
    sabrina
    Guest

    how to loop an avi video?

    Here's the problem: I'm using mciSendString to play an AVI video. How to loop / repeat a video forever with that API function?

  2. #2
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Well

    Gettickcount? Do you know the duration?
    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  3. #3
    Fanatic Member Kaverin's Avatar
    Join Date
    Oct 2000
    Posts
    930
    Take a look at the link in my signature. It is for looping an MIDI file, but the principle should still be the same for other media types since you're using mciSendString().
    I'm baaaack...
    VB5 Professional Edition, VC++ 6
    Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se

    I feel special because I finally figured out how to loop midis: Post link
    I'm a fanatic too

  4. #4
    sabrina
    Guest
    This is the code I’m using to play an avi video. I think it’s very much the same code they have here in vbworld.com.

    I tried to get information on mciSendString() from MSDN and from the web, but didn’t get any understandable facts. I would appreciate it if someone could tell the actual code how to get this work (that means to loop an avi video).

    Dim Ret As Long, A$, X As Integer, Y As Integer
    X = 0
    Y = 0
    A$ = "C:\FileName.avi"
    Ret = mciSendString("stop movie", 0&, 128, 0)
    Ret = mciSendString("close movie", 0&, 128, 0)
    Ret = mciSendString("open AVIvideo!" & A$ & " alias movie parent " & Form1.hwnd & " style child", 0&, 128, 0)
    Ret = mciSendString("put movie window client at " & X & " " & Y & " 0 0", 0&, 128, 0)
    Ret = mciSendString("play movie", 0&, 128, 0)

    Ret = mciSendString("close all", 0&, 128, 0)

  5. #5
    Fanatic Member Kaverin's Avatar
    Join Date
    Oct 2000
    Posts
    930
    Did you look at the link in my signature? It will tell you how to loop something being played by MCI.

    http://161.58.186.97/showthread.php?s=&threadid=95340
    I'm baaaack...
    VB5 Professional Edition, VC++ 6
    Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se

    I feel special because I finally figured out how to loop midis: Post link
    I'm a fanatic too

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width