[Q]: VFW capture format


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: [Q]: VFW capture format

  1. #1
    Mike D Sutton Guest

    Re: VFW capture format

    > I am trying to write video capture/edit/etc application.
    > I need to be able to set/get video capture format parameters like RGB vs
    > YUV, or odd vs even buffer sequence.
    > It can be set/retrieved through driver dialogs, but I need an API calls.


    Have a look at Ray Mercer's site over at:
    Http://www.shrinkwrapvb.com/
    Hope this helps,

    Mike


    -- EDais --

    WWW: Http://Members.xoom.com/EDais/
    Work E-Mail: EDais@btinternet.com
    Other E-Mail: Frankle@btinternet.com



  2. #2
    Anatol Guest

    [Q]: VFW capture format

    Hello all,
    I am trying to write video capture/edit/etc application.
    I need to be able to set/get video capture format parameters like RGB vs
    YUV, or odd vs even buffer sequence.
    It can be set/retrieved through driver dialogs, but I need an API calls.

    How is it done ?

    Thanks,
    Anatol Schwarz.





  3. #3
    Ray Mercer Guest

    Re: VFW capture format

    Anatol,

    > > I am trying to write video capture/edit/etc application.
    > > I need to be able to set/get video capture format parameters like RGB vs
    > > YUV, or odd vs even buffer sequence.
    > > It can be set/retrieved through driver dialogs, but I need an API calls.

    >
    > Have a look at Ray Mercer's site over at:
    > Http://www.shrinkwrapvb.com/
    > Hope this helps,


    Since my capture app example doesn't do this - here is the specific api you
    need for setting format (BTW, I copied this from an earlier post on this
    very group).
    >>>

    The specific API for setting the capture format is capSetVideoFormat ( or
    send a WM_CAP_SET_VIDEOFORMAT message to the capture window). One of the
    parameters with this message is a BitmapInfo UDT containing the format you
    are requesting from the driver.
    After you call this, you should call capGetVideoFormat and check to make
    sure the driver actually switched to the requested format since all drivers
    don't support all formats.
    <<<

    Regarding odd vs. even frame capture - this is not specified in VFW which
    means its proprietary to your driver. Proprietary features are only
    supported by the HW manufacturer - you need to contact them for more info.

    HTH,
    Ray Mercer
    MS-MVP Visual Basic
    www.shrinkwrapvb.com





  4. #4
    Ray Mercer Guest

    Re: VFW capture format

    Anatol,

    > Thanks for a rapid response.


    You're welcome ;-)

    > 2. The 'capSetVideoFormat' is based on BitmapInfo. Which is basically
    > BMP/DIB format. It works fine for the RGB formats, but I did not find any
    > documentation about the YUV. It seems to be handled via biCompression and
    > biBitCount fields, but there is no information about the exact values that
    > should be used. I can, of course, use the 'try and see' method, but I need
    > more generic approach.


    Unfortunately, that's the only way I know how to do it. Hunt around on
    sites like www.wotsit.org and others for clues to the particular format you
    are trying to use. You might also want to see John McGowan's excellent AVI
    overview for links to other sites which may have docs for the different
    bit-formats. I have gotten the AVI functions to work with MJPEG formats by
    trial and error so I know it can be done.

    Maybe the guys in the
    news://msnews.microsoft.com/microsof...grammer.mmedia could
    help you out more???

    Ray Mercer



  5. #5
    Anatol Guest

    Re: VFW capture format

    Hello Ray,
    Thanks for a rapid response.
    I have already tried the 'capSetVideoFormat'. There are two problems with
    it:
    1. As you mentioned the odd/even buffer sequence is out of its scope, and
    should be handled directly via card driver (god knows how ...)
    2. The 'capSetVideoFormat' is based on BitmapInfo. Which is basically
    BMP/DIB format. It works fine for the RGB formats, but I did not find any
    documentation about the YUV. It seems to be handled via biCompression and
    biBitCount fields, but there is no information about the exact values that
    should be used. I can, of course, use the 'try and see' method, but I need
    more generic approach.

    Thanks again,
    Anatol

    Ray Mercer <raymer@mvps.org> wrote in message news:39ea4344@news.devx.com...
    > Anatol,
    >
    > > > I am trying to write video capture/edit/etc application.
    > > > I need to be able to set/get video capture format parameters like RGB

    vs
    > > > YUV, or odd vs even buffer sequence.
    > > > It can be set/retrieved through driver dialogs, but I need an API

    calls.
    > >
    > > Have a look at Ray Mercer's site over at:
    > > Http://www.shrinkwrapvb.com/
    > > Hope this helps,

    >
    > Since my capture app example doesn't do this - here is the specific api

    you
    > need for setting format (BTW, I copied this from an earlier post on this
    > very group).
    > >>>

    > The specific API for setting the capture format is capSetVideoFormat ( or
    > send a WM_CAP_SET_VIDEOFORMAT message to the capture window). One of the
    > parameters with this message is a BitmapInfo UDT containing the format you
    > are requesting from the driver.
    > After you call this, you should call capGetVideoFormat and check to make
    > sure the driver actually switched to the requested format since all

    drivers
    > don't support all formats.
    > <<<
    >
    > Regarding odd vs. even frame capture - this is not specified in VFW which
    > means its proprietary to your driver. Proprietary features are only
    > supported by the HW manufacturer - you need to contact them for more info.
    >
    > HTH,
    > Ray Mercer
    > MS-MVP Visual Basic
    > www.shrinkwrapvb.com
    >
    >
    >
    >




  6. #6
    Anatol Guest

    Re: VFW capture format

    Thanks, I'll try it.

    Ray Mercer <raymer@mvps.org> wrote in message news:39eabfa6@news.devx.com...
    > Anatol,
    >
    > > Thanks for a rapid response.

    >
    > You're welcome ;-)
    >
    > > 2. The 'capSetVideoFormat' is based on BitmapInfo. Which is basically
    > > BMP/DIB format. It works fine for the RGB formats, but I did not find

    any
    > > documentation about the YUV. It seems to be handled via biCompression

    and
    > > biBitCount fields, but there is no information about the exact values

    that
    > > should be used. I can, of course, use the 'try and see' method, but I

    need
    > > more generic approach.

    >
    > Unfortunately, that's the only way I know how to do it. Hunt around on
    > sites like www.wotsit.org and others for clues to the particular format

    you
    > are trying to use. You might also want to see John McGowan's excellent

    AVI
    > overview for links to other sites which may have docs for the different
    > bit-formats. I have gotten the AVI functions to work with MJPEG formats

    by
    > trial and error so I know it can be done.
    >
    > Maybe the guys in the
    > news://msnews.microsoft.com/microsof...grammer.mmedia could
    > help you out more???
    >
    > Ray Mercer
    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center