Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 210239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:59:14+00:00 2026-05-11T17:59:14+00:00

AMcap is a app for capturing video or to preview from webcam. Its source

  • 0

AMcap is a app for capturing video or to preview from webcam. Its source code comes with Microsoft Windows SDK as sample.

I want to (bypass the following process of user interaction in amcap code or say want to) set it as default:

Ampcap menu

  Options

    Video Capture Pin ...

        Color Space/Compression: YUY2

        Output size: 1600x1200

I have a compatible webcam and works fine on changing manually to YUY2 and 1600×1200 in AMcap app.

By default it is:

    Color Space/Compression: MJPG

    Output size: 160x120

I tried to find ‘YUY2’ string in whole project, but I could not find it, so that I could hardcode it. It seems it is created dynamically and then operated; refer: in the file amcap.cpp nearby line no 3395.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T17:59:15+00:00Added an answer on May 11, 2026 at 5:59 pm

    Hey @Dani van der Meer: Thanks for the Pointer … I have done it by:
    In the function BOOL InitCapFilters()

    after

     if(hr != NOERROR)
    {
    
        hr = gcap.pBuilder->FindInterface(&PIN_CATEGORY_CAPTURE,
                                          &MEDIATYPE_Video, gcap.pVCap,
                                          IID_IAMStreamConfig, (void **)&gcap.pVSC);
    
        if(hr != NOERROR)
        {
            // this means we can't set frame rate (non-DV only)
            ErrMsg(TEXT("Error %x: Cannot find VCapture:IAMStreamConfig"), hr);
        }
    }
    
    gcap.fCapAudioIsRelevant = TRUE;
    

    Paste:

    CMediaType *pmt;
    // default capture format
    if(gcap.pVSC && gcap.pVSC->GetFormat((AM_MEDIA_TYPE**)&pmt) == S_OK)
    {
        // DV capture does not use a VIDEOINFOHEADER
        if(pmt->formattype == FORMAT_VideoInfo)
        {
         pmt->SetType(&MEDIATYPE_Video);
         pmt->SetFormatType(&FORMAT_VideoInfo);
         pmt->SetSubtype(&MEDIASUBTYPE_YUY2);
         pmt->SetTemporalCompression(FALSE);
    
         VIDEOINFOHEADER* lpvihin = (VIDEOINFOHEADER*) pmt->pbFormat;
    
            {
    
                 //DWORD fccYUY2 =  'YUY2' ;
                 //lpvihin->bmiHeader.biCompression  =fccYUY2;
                //'YUY2';// MAKEFOURCC('Y','U','Y','2');
                //lpvihin->bmiHeader.biBitCount = 16; 
                lpvihin->bmiHeader.biWidth =  1600;// 960; //1600;
                lpvihin->bmiHeader.biHeight =  1200;//  720; //1200;
                lpvihin->bmiHeader.biSizeImage =   1600*1200*3; 
    
                hr = gcap.pVSC->SetFormat(pmt);
    
                ResizeWindow(HEADER(pmt->pbFormat)->biWidth,
                         ABS(HEADER(pmt->pbFormat)->biHeight));
            }
        }
        if(pmt->majortype != MEDIATYPE_Video)
        {
            // This capture filter captures something other that pure video.
            // Maybe it's DV or something?  Anyway, chances are we shouldn't
            // allow capturing audio separately, since our video capture
            // filter may have audio combined in it already!
            gcap.fCapAudioIsRelevant = FALSE;
            gcap.fCapAudio = FALSE;
        }
        DeleteMediaType(pmt);
    }
    

    Thanks a lot

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 141k
  • Answers 141k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Check out the official Rails Guides. These should provide a… May 12, 2026 at 8:11 am
  • Editorial Team
    Editorial Team added an answer According to the comment on this blog post, Firebird 1.5… May 12, 2026 at 8:11 am
  • Editorial Team
    Editorial Team added an answer The :last-child pseudoclass still cannot be reliably used across browsers.… May 12, 2026 at 8:11 am

Related Questions

Suppose I have three classes. It is valid to instantiate A, but there are
I was trying to erase a range of elements from map based on particular
I am trying to modify the amcap, an application from Windows SDK's example to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.