Re: A question about function "AVISaveOptions"

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Mike D Sutton (EDais_at_mvps.org)
Date: 01/17/05


Date: Mon, 17 Jan 2005 23:44:02 -0000


> Hi,There are some codes in http://www.shrinkwrapvb.com/avihelp/avihlp_4.htm
> ,which is very helpful to create AVI file by BMP files.
<code snipped>
> When the function of AVISaveOptions is executed,a form will appear and user
> can choose AVI save options in it by mouse clicking,such as:
> DivX Pro 5.0.5 Codec
> XviD MPEG-4 Codec
> Microsoft MPEG-4 Video Codec
> ......
> -------------------------------------------------------------------
> My question is:
> How to specify the AVI save options in design-stage as some default
> settings,other than by user's mouse clicking in running-stage?

AFAIK all the call does is to fill an AVICOMPRESSOPTIONS structure (and IIRC append any private data the end?) for each stream so
all you need to do is call the function once and get the contents of the buffer it fills, this if then the information you have to
populate your UDT with next time. If you're feeling brave then hard code these values, although there's no guarantee that the
structure of this buffer will remain the same over different versions so you may find that it crashes your clients machines unless
they have exactly the same build of the codec installed - a real pain with something like XviD of which there are hundreds of builds
of! It's a much better idea to let the user choose their format the first time and optionally just re-use those settings for the
next operation since it will be set up for their specific codec and doesn't restrict their options.
Hope this helps,

    Mike

 - Microsoft Visual Basic MVP -
E-Mail: EDais@mvps.org
WWW: http://EDais.mvps.org/



Relevant Pages

  • Re: [SLE] can I convert a dvd to mpeg, avi. . . OFF LIST
    ... Also try avidemux2 home page. ... AVI: Missing video strem!? ... for quality try the FFm AC3 codec. ... I get a .avi file but it crashes Mplayer. ...
    (SuSE)
  • Re: codec for .avi
    ... Codec is short for Compression/Decompression or Coder/Decoder. ... hundreds of different codec that can be used to encode/decode video. ... Most AVI content is now encoded with some variation of MPEG-4. ... > when i tried to open a .avi file, windows media player came up with an ...
    (microsoft.public.windowsmedia.player)
  • Re: Video in PowerPoint
    ... Sounds as if your AVI came from your digital camera. ... it's created with a proprietary codec. ... > slide but the player will not open the avi file that I ... > The avi files will open through MS Media Player (ver 8.0 ...
    (microsoft.public.powerpoint)
  • Re: ERROR = 80040154
    ... If you get this for AVI content.. ... bad install of the codec. ... Chris Lanier ... > I am trying to play a mpg or an avi file. ...
    (microsoft.public.windowsmedia.player)
  • Re: Data Execution Prevention (DEP)
    ... a video codec on Pinnacle Studio 9 which is not DEP compliant. ... Certain AVI & Mpeg files all worked fine but when I ... Microsoft MVP - Windows XP Shell/User ...
    (microsoft.public.windows.mediacenter)