Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. What is the best method for capturing video using Visual C++? [solved]

What is the best method for capturing video using Visual C++? [solved]

Scheduled Pinned Locked Moved C / C++ / MFC
c++questionbusinessjsonhelp
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    N Rackley
    wrote on last edited by
    #1

    Hey everyone! I am currently working on a project that requires the capture of video from a video capture card. This video needs to be recorded for later analysis. There are many different examples online, and a few here on CodeProject, but I would really like some advice. Which API or method is the best for video capture with the requirements below? 1. Ability to select from multiple devices. In this particular case, I need support for a TV capture card or a webcam. 2. Ability to preview video in realtime. 3. Ability to record the output to a file or series of files. 4. Has to be compatible with Visual C++. Thanks for the help! -Nathan

    modified on Wednesday, August 19, 2009 2:49 PM

    L C 2 Replies Last reply
    0
    • N N Rackley

      Hey everyone! I am currently working on a project that requires the capture of video from a video capture card. This video needs to be recorded for later analysis. There are many different examples online, and a few here on CodeProject, but I would really like some advice. Which API or method is the best for video capture with the requirements below? 1. Ability to select from multiple devices. In this particular case, I need support for a TV capture card or a webcam. 2. Ability to preview video in realtime. 3. Ability to record the output to a file or series of files. 4. Has to be compatible with Visual C++. Thanks for the help! -Nathan

      modified on Wednesday, August 19, 2009 2:49 PM

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      DirectX DirectShow is the answer your questions.You could use it to capture and configurate web cams,capture video from files,capture from TV tuners,capture network streams and etc.Microsoft Media Foundation which starts from Windows Vista as alternative of DirectX and Windows media SDK also could be useful. :)

      Life is a stage and we are all actors!

      N 1 Reply Last reply
      0
      • N N Rackley

        Hey everyone! I am currently working on a project that requires the capture of video from a video capture card. This video needs to be recorded for later analysis. There are many different examples online, and a few here on CodeProject, but I would really like some advice. Which API or method is the best for video capture with the requirements below? 1. Ability to select from multiple devices. In this particular case, I need support for a TV capture card or a webcam. 2. Ability to preview video in realtime. 3. Ability to record the output to a file or series of files. 4. Has to be compatible with Visual C++. Thanks for the help! -Nathan

        modified on Wednesday, August 19, 2009 2:49 PM

        C Offline
        C Offline
        Code o mat
        wrote on last edited by
        #3

        As Hristo Bojilov's, so does my vote also go to DirectShow.

        > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Life: great graphics, but the gameplay sux. <

        1 Reply Last reply
        0
        • L Lost User

          DirectX DirectShow is the answer your questions.You could use it to capture and configurate web cams,capture video from files,capture from TV tuners,capture network streams and etc.Microsoft Media Foundation which starts from Windows Vista as alternative of DirectX and Windows media SDK also could be useful. :)

          Life is a stage and we are all actors!

          N Offline
          N Offline
          N Rackley
          wrote on last edited by
          #4

          Thank you for the quick response to my question! Yes, I've heard mention of DirectShow. I have tried reading some of the DirectShow documentation, but I am not exactly sure where I should get started with the API. Do you have any suggestions of resources that I should read? The regular MSDN documentation seems a bit clunky to navigate, and I'm not exactly sure what my starting point should be.

          L C 2 Replies Last reply
          0
          • N N Rackley

            Thank you for the quick response to my question! Yes, I've heard mention of DirectShow. I have tried reading some of the DirectShow documentation, but I am not exactly sure where I should get started with the API. Do you have any suggestions of resources that I should read? The regular MSDN documentation seems a bit clunky to navigate, and I'm not exactly sure what my starting point should be.

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            There isn't many to many samples how to work with DirectShow in C++.The reason is that COM is not the favourite model for most of the developers.Here is nice sample how to capture single frame from web camera using C++.You could easy adapt it to your MFC app for example.I highly recommend to test your graphs with GraphEdit or GraphStudio or some similar graph configuration testing tool before you create them programatically.

            Life is a stage and we are all actors!

            modified on Wednesday, August 19, 2009 12:30 PM

            N 1 Reply Last reply
            0
            • L Lost User

              There isn't many to many samples how to work with DirectShow in C++.The reason is that COM is not the favourite model for most of the developers.Here is nice sample how to capture single frame from web camera using C++.You could easy adapt it to your MFC app for example.I highly recommend to test your graphs with GraphEdit or GraphStudio or some similar graph configuration testing tool before you create them programatically.

              Life is a stage and we are all actors!

              modified on Wednesday, August 19, 2009 12:30 PM

              N Offline
              N Offline
              N Rackley
              wrote on last edited by
              #6

              Thank you, Hristo. Those resources look good (much better than my searches were yielding). I will read up on them and I will attempt to test them within GraphEdit.

              L 1 Reply Last reply
              0
              • N N Rackley

                Thank you, Hristo. Those resources look good (much better than my searches were yielding). I will read up on them and I will attempt to test them within GraphEdit.

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                Always glad to help you. :) There is plenty of articles at codeproject how to use DirectShow with .NET.I believe that code translation from .NET to C++ style shouldn't be difficult. Regards!

                Life is a stage and we are all actors!

                1 Reply Last reply
                0
                • N N Rackley

                  Thank you for the quick response to my question! Yes, I've heard mention of DirectShow. I have tried reading some of the DirectShow documentation, but I am not exactly sure where I should get started with the API. Do you have any suggestions of resources that I should read? The regular MSDN documentation seems a bit clunky to navigate, and I'm not exactly sure what my starting point should be.

                  C Offline
                  C Offline
                  Chris Losinger
                  wrote on last edited by
                  #8

                  last time i looked, there were a whole bunch of samples in the DirectShow SDK. i found them quite useful for what i had to do (frame grabbing).

                  image processing toolkits | batch image processing

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups