Click here to Skip to main content
12,402,889 members (72,844 online)
Rate this:
 
Please Sign up or sign in to vote.
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

where
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

Thanks
Posted 1-Jun-11 4:53am
Updated 1-Jun-11 8:13am
v3
Comments
SAKryukov 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.
--SA
orc_orc_orc 1-Jun-11 14:20pm
   
http://koorenneef.nl/content/capture-video-webcam-ffmpeg do you think this link is beneficial?
gksolanki 1-Jun-11 14:25pm
   
Thanks orc_orc_orc, I will give it a shot

Thanks
gksolanki 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 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
 
good
Please Sign up or sign in to vote.

Solution 1

Check if this helps

DirectX.Capture Class Library[^]
  Permalink  
Comments
gksolanki 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 2 Jun 2011
Copyright © CodeProject, 1999-2016
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