Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: WinXP C++ Video audio
I want to capture audio and video from webcam using ffmpeg on WindowsXP.
I know the command to capture only video as given below (In case somebody need it)
ffmpeg -f vfwcap -r 25 -i 0 sample.avi
1) -f is to specify force format.
2) vfwcap is for webcam video stream on Windows XP
3) -r 25 is to specify frame rate
4) -i 0 is to specify input device which is 0 incase of default webcam
5) sample.avi is the output file
So, this command will capture video stream from the webcam and store it into sample.avi
My problem is like I also want to capture audio at the same time.
ffmpeg has options for the same in Linux. But I didn't kind of find any help regarding this for Windows O/S.
If anybody knows this, then please help me.
Thanks in advance.
BTW, I know how to compile ffmpeg source on windows using MinGW and MSys. I also know how to use ffmpeg libraries in VC++ Express edition and VC++ VS2005 edition.
If anybody has the same requirements then please let me know
Posted 1-Jun-11 5:53am
Edited 1-Jun-11 9:13am
SAKryukov at 1-Jun-11 14:05pm
You have only one tag "audio-video". Please tag platform and language. This way you have a chance that a right expert pays attention for your question.
orc_orc_orc at 1-Jun-11 14:20pm do you think this link is beneficial?
gksolanki at 1-Jun-11 14:25pm
Thanks orc_orc_orc, I will give it a shot
gksolanki at 2-Jun-11 2:25am
Thanks for the link. I got the same command line option that I gave in this question earlier and they are for capturing video. My requirement is to capture audio too which is not there in that command line options. But thanks for your reply. If you have any other link then please give it to me.
WRCooke at 9-Mar-12 9:41am
gksolanki, did you ever find a solution for this? I am having the exact same issue.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Check if this helps
DirectX.Capture Class Library[^]
gksolanki at 3-Jun-11 2:09am
Will this solution work with ffmpeg? It seems that it is for DirectX and .NET
Thanks for the help. I will go through it and check whether it is helpful or not?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 9,455
1 OriginalGriff 8,295
2 Peter Leow 4,839
3 Kornfeld Eliyahu Peter 3,210
4 Maciej Los 2,301

Advertise | Privacy | Mobile
Web04 | 2.8.150327.1 | Last Updated 2 Jun 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100