|
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
|
|
|
|
|
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!
|
|
|
|
|
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.
|
|
|
|
|
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
|
|
|
|
|
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.
|
|
|
|
|
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!
|
|
|
|
|
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).
|
|
|
|
|
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. <
|
|
|
|
|
i have just entered into c,c++ programming.how can i improve my c,c++ programming skills.Anybody please help me out.
|
|
|
|
|
madhu9124 wrote: how can i improve my c,c++ programming skills.
By first realizing that they are two separate languages. Just because you know one (C) does not automatically mean you know the other (C++). When I see folks write "C/C++" on resumes and such, that's a big red flag.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
He posted the same thing in Java.
He must have finished them all at the same time! *phew* and who said this stuff was difficult...
|
|
|
|
|
Both Java and Java++?
> 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. <
|
|
|
|
|
Practice, practice, practice...
> 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. <
|
|
|
|
|
and to add to that, find a good tutor/mentor, either at school or at your job.
This signature was proudly tested on animals.
|
|
|
|
|
study good books in C and C++. try to practice given examples. We don't have any shortcuts
Thanks and Regards,
Selvam,
http://www.wincpp.com
|
|
|
|
|
First of all, are there any previous languages that you have learned, or is this your first one? Knowing which languages you might already use can help to direct you to decent learning resources.
There are differences between C and C++.
C is a standardized language. One of the major benefits of C is the fact that it does not change (as quoted from one of my CS professors). C can be compiled to many systems, and it is very, very fast. However, C also has a few drawbacks to the language. Dynamic memory is one issue (having a variable that stores strings of various sizes, for example) and requires more complex programming requiring things such as Malloc() and Free(). Another element is the fact that C is not an Object Oriented language. This is why C++ was developed.
C++ is an Object Oriented language. It builds upon the basic building blocks of C and extends it quite a bit. Classes are the biggest difference, allowing to group your various functions into "objects" (hence the Object Oriented). The nice thing about C++ is that it is backwards compatible with C.
All right. Resources.
CPlusPlus.com is a wonderful resource. They have one of the most comprehensive sets of documentation that I've seen on C and C++ to date. Also, they have very good, detailed tutorials.
You may also consider purchasing a textbook on the subject. The industry standard for C appears to be The C Programming Language by Kerrigan and Ritchie. I own both the first and second editions of this text, and I have used them extensively.
Hopefully this will be of help to you. Best of luck!
|
|
|
|
|
General Rule Applicable for any Programming language
*Read the Concept.
*Understand the Program logic.
*Practice
All the very best Pal
Thanks,
Rane
|
|
|
|
|
The first step is to read introductory books. You should probably learn C first because C is a subset of C++, so you'll already know the C part when you study C++.
The next step is to practice writing programs. Programming is like swimming in that you have to do it to learn it. You can't learn to swim just from reading about it.
Reading and understanding other peoples' code is also helpful.
Then more advanced books will help. I recommend Effective C++ by Scott Meyers. Design Patterns is a good book for learning how to effectively use the object-oriented features of C++.
|
|
|
|
|
Hi everybody,
I received a task that need to automatic download an internet page. I just have an URL and, from my software, whould like get it into a directory.
Someone can help me with this ?
Tanks for read my question
|
|
|
|
|
|
Can you use URLDownloadToFile() ?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hello All,
Good Evening,
I converted my project from ANSI to UNICODE project. In the Unicode project, the values changing in a text doesn't reflect by itself and the textbox needs UpdateWindow() to be called whenever there is a change in it. But this kind of behaviour doesn't happen with the ANSI project previously.
Can anyone advice on this ?
Many thanks in advance.
Bhanu
|
|
|
|
|
Could you give a bit more detail? I doubt there should be such a behaviour change in your program just because you went from ANSII to UNICODE. What did you change on your code? There are certain messages/notifications which have an ANSII and a UNICODE version (these are usually postfixed with an A or a W to indicate ANSII or unicode (WIDE) versions), could it be that somewhere you are listening for the ANSII version of a message which is not being sent anymore since you changed to UNICODE and now the WIDE version is sent? Show some code snipplet how you handled changes in one of your edit boxes which no longer functions.
> 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. <
|
|
|
|
|
Hi all,
I have a rich edit control in my application(VC6.0)which display some log messages.
How can I store the content of it to a text file.
Is there any direct method to do it?
Regards,
Sunil Kumar
|
|
|
|
|
If you are using MFC, call the StreamOut() method. Otherwise, send the control a WM_STREAMOUT message.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|