How to compile AMCap

July 20, 2007 at 8:53 am 11 comments

The DirectShow SDK (now part of the Windows SDK) includes a sample application called AMCap (Active Movie Capture) that illustrates the use of DirectShow filters to capture video from a device like a webcam or camcorder. I had all kinds of trouble the first few times I tried to build this, so I documented the steps for a successful build. Here they are:

These are the steps I followed to successfully build and run AMCap. I used Visual Studio 2005 Professional edition, SP1 for Vista, running on Windows Vista Business version . Note: the paths I have listed are the default installation paths and may be different on your computer.

A. Install the Windows SDK

1. Download and install the Windows SDK

2. Run “Integrate Windows SDK with Visual Studio” from the “Visual Studio Registration” folder under “Windows SDK programs” on the start menu.

3. Reboot the computer.

B. Build the DirectShow base classes

1. Open the BaseClasses c++ solution (baseclasses.sln) using VS2005. The source code for the base classes is located in C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\Multimedia\DirectShow\BaseClasses.

2. Set the active configuration to “debug”

3. Build the solution.

C. Build AmCap

1. Open the solution.

2. Add the DirectShow include directory to the project properties under: “Property Pages – Configuration properties – C/C++ – General”. The path is: C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\Multimedia\DirectShow\Common

3. Add the path to the DirectShow base classes directory to the project properties. The path is: C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\Multimedia\DirectShow\BaseClasses\Debug

2. Build the solution.

3. Run it!


Here’s a referral code to get a $20 credit when you join Google Fi! Redeem it at https://g.co/fi/r/HXW558

Entry filed under: C#, Development, DirectShow, Technology, video, Windows SDK. Tags: , .

Directshow SDK Installation Steps « fungileo.com The Windows USB video class driver

11 Comments Add your own

  • 1. blue  |  July 30, 2007 at 7:28 am

    I m encountering same problem these days.
    I follow ur steps but can u plz tell wot m i supposed to give in EXECUTABLE file drop-down list?
    Furthermore, I tried to download WSDK from this
    and wen starts the set up it gives me error. I got Directshow Folder from someone. So i didnt perform ur step “A”.

    Reply
  • 2. Bahrom  |  August 2, 2007 at 9:05 pm

    I didn’t need to set anything in the executable drop down. I don’t know what might have caused your setup error. You probably still need to run the program that sets up the environment vairables for VS2005. The progarm is at this path on my computer:
    \Program Files\Microsoft SDKs\Windows\v6.0\Setup\VCIntegrate.exe

    I hope that helps!

    Reply
  • 3. blue  |  August 8, 2007 at 6:41 am

    Thanku so much for the help !
    I managed to run the programme by following again all the guidlines given on this site.
    Thanku !!! 🙂

    Reply
  • 4. 22li  |  October 25, 2007 at 4:05 pm

    I follow the steps you discribed to compile AMcap.

    I built the solution successfully for Baseclasses

    But when I built AMcap I have the error : can’t open Strmbasd.lib
    The file exist, I put the following path C:\Program Files\Microsoft SDKs\Windows\v6.0\Samples\Multimedia\DirectShow\BaseClasses\Debug in Property Pages – Configuration properties – C/C++ – General”.

    but the error is remaining.

    I don’t understand whats wrong
    Could you help me?

    Reply
    • 5. hanme  |  March 23, 2011 at 9:45 pm

      It’s too late for the above comment, but, I’m adding this for other people who can have the same problem as him/her including myself.

      I had exactly same problem as the above comment after I had done everything following this post (thanks to Bird anyway), and I could solve it by updating my VS2005 as described in this link (http://support.microsoft.com/kb/949009/).

      Hope it helps.

      Reply
  • 6. Hanme Kim  |  March 23, 2011 at 10:09 pm

    How to compile AMCap…

    It took me few days to compile a sample application called AmCap of the DirectShow SDK (part of the Microsoft Windows SDK). Big sigh.. 😦 After I followed everyth……

    Reply
  • 7. Anmol Rana  |  January 9, 2012 at 5:12 am

    can amcap be compiled for arm wince6.0 kit

    i am using compulab’s cm-t3530 (omap3530) kit running wince 6.0
    i have compiled the usb camera driver successfully. can amcap capture fromt he usb camera

    regards.

    Reply
    • 8. Tien Nhan  |  April 24, 2013 at 6:36 pm

      If anyone is using the Windows SDK on a windows 7 computer , 32bit, and microsoft visual studios 2010. These are steps i used to compile amcap.
      1) Open baseclass project, run it (mine failed right before the end but the file u need for amcap is still made)
      2) Open amcap project and add the path to the debug file in baseclass
      3) Run amcap, should work

      Reply
  • 9. Anmol Rana  |  January 10, 2012 at 10:52 am

    i get the following error when i build the application for my arm kit.

    1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\include\crtdefs.h(100) : fatal error C1189: #error : ERROR: Use of C runtime library internal header file.

    1>status.cpp

    1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\include\crtdefs.h(100) : fatal error C1189: #error : ERROR: Use of C runtime library internal header file.

    1>SampleCGB.cpp

    1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\include\crtdefs.h(100) : fatal error C1189: #error : ERROR: Use of C runtime library internal header file.

    1>crossbar.cpp

    1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\include\crtdefs.h(100) : fatal error C1189: #error : ERROR: Use of C runtime library internal header file.

    1>amcap.cpp

    1>C:\Program Files\Microsoft Visual Studio 8\VC\ce\include\crtdefs.h(100) : fatal error C1189: #error : ERROR: Use of C runtime library internal header file.

    1>Generating Code…

    1>Build log was saved at “file://c:\Program Files\Microsoft SDKs\Windows\v7.0\Samples\multimedia\directshow\capture\amcap\CM_T35_SDK (ARMV4I)\Release\BuildLog.htm”

    1>AmCap – 5 error(s), 0 warning(s)

    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    regards.

    Reply
  • 10. Alex  |  October 28, 2016 at 7:42 am

    Still works in msvc 2013. Thank you very much!

    Reply
  • 11. Sevim tel  |  October 23, 2020 at 8:41 pm

    How can we get uvcam driver for wince 6.0 arm

    Reply

Leave a comment

Trackback this post  |  Subscribe to the comments via RSS Feed


Bird’s Bits

Computers, software & the Internet

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 41 other subscribers