locked
An MP42 avi RRS feed

  • Question

  • Hi all,

    I writing a program that opens an AVI file, i compress it in Microsoft Mpeg4 V2, and in my pc it work fine.

    I try my program in another pc without Mpeg4 codec (but with decode, it is inside Windows Media Player) and my program crash in AVIStreamGetFrameOpen, it return null instead a value, what happens in my pc.

    I try to use ICOpen in decompress mode, but it return null.

    What is the right way to open an AVI file?

     

    Thanks for all useful comments.

    Perry

    Tuesday, October 2, 2007 3:18 PM

Answers

  • Sorry, I missed where you said the file plays OK in Windows Media Player. For AVI playback, I believe that Windows Media Player uses DirectShow, in which case the decoder is a filter or a DMO. In that case, AVIStreamGetFrameOpen won't find the decoder, and you would need to use DirectShow. (Another option is to use the WMP OCX.)

     

    ----------------------------------------------------------------------------
    Mike Wasson, SDK Documentation
    This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.

    (c) 2007 Microsoft Corporation. All rights reserved.

     

    Thursday, October 4, 2007 5:42 PM

All replies

  • http://msdn2.microsoft.com/en-us/library/ms706732.aspx

     

    If the system cannot find a decompressor that can decompress the stream to the given format, or to any RGB format, AVIStreamGetFrameOpen returns NULL.

     

    This is the expected behavior of the function. It returns NULL when it cannot find a suitable codec.

     

    ----------------------------------------------------------------------------
    Mike Wasson, SDK Documentation
    This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.

    (c) 2007 Microsoft Corporation. All rights reserved.


     

    Wednesday, October 3, 2007 8:02 PM

  • I don't want make an avi player. but i want in my program show an avi...
    What compression i must use?
    Why the media player show it if the system don't find the decompressor?
    What functions use Windows media player? don't use microsoft sdk?


    Thursday, October 4, 2007 7:31 AM
  • Sorry, I missed where you said the file plays OK in Windows Media Player. For AVI playback, I believe that Windows Media Player uses DirectShow, in which case the decoder is a filter or a DMO. In that case, AVIStreamGetFrameOpen won't find the decoder, and you would need to use DirectShow. (Another option is to use the WMP OCX.)

     

    ----------------------------------------------------------------------------
    Mike Wasson, SDK Documentation
    This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use.

    (c) 2007 Microsoft Corporation. All rights reserved.

     

    Thursday, October 4, 2007 5:42 PM