Results 1 to 4 of 4

Thread: mci play compressed avi

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    quebec
    Posts
    81

    Question

    I'm using the following code to play an avi file in a picture box:

    ret = mciSendString("open " & A$ & " type avivideo alias movie parent " & Picture1.hWnd & " style child", RS, 128, cb)

    However, when the avi is compressed the device won't open and error number 296 is returned (...file can't be opened...).

    Any clues as to whether this is normal or if there is a way to configure this so it will play compressed video?

    I know I can do this real easy with a mediaplayer control but I'm using a picturebox so I can get it's handle easily and play the control as an elliptical region.

    Thanks.

  2. #2
    Member
    Join Date
    Aug 2000
    Posts
    60

    Thumbs down

    There is no formal information about any problems displaying compressed AVI's using MCI, afterall Microsoft Media Player uses it (is it). I would have thought that aslong as the codec used to compress the avi is on your system it would play ok. Are you sure that you have got the path correct to the file and that it is a true avi and not a navi which though up alot of errors with media player.

    Grant French
    -----------------------------------------------
    E-Mail: [email protected]
    ICQ: 33122184

  3. #3
    Member
    Join Date
    Aug 2000
    Posts
    60
    I have dug out some code i used a while back, try this as a replacement line.

    i = mciSendString("open AVIvideo!" & A$ & " alias movie parent " & Picture1.hwnd & " style child", RS, 128, cb)


    It worked for me. A$ is the path (!!IT HAS TO BE A SHORT PATH!!)

    use the getshortpath api call to convert a long path to a short one. and RS is 128 spaces.


    I am confident that this will work now.
    Grant French
    -----------------------------------------------
    E-Mail: [email protected]
    ICQ: 33122184

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    quebec
    Posts
    81

    Cool

    No go. I had already tried that syntax with no success. I've been unable to find any docs on the subject on the web. So for now I've switched to the Windows Media player control which has no problem and is quicker to code anyway howbeit with some limitations as to my original needs.

    Thanks loads anyway.

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