Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to know how to capture webcam video and dump the raw as well as an encoded version using ffmpeg. I want only the video stream. I'm on Windows xp.

share|improve this question
    
Are you partial to ffmpeg or are you looking for any command line tool? – heavyd Feb 9 '10 at 18:18
    
any cmd line tool will do..i think most use ffmpeg somehow..please correct me – iceman Feb 10 '10 at 2:40

From here, you can see a list of DirectShow devices with

ffmpeg -list_devices true -f dshow -i dummy

If you have a built-in webcam on a laptop, it should be called something like `"Integrated Camera", and you can capture from it using the following (obviously, substitute the name of your webcam device, and note that the quotes are required):

ffmpeg -f dshow -i video="Integrated Camera" -c copy raw.avi \
-c:v libx264 -preset veryfast -crf 25 encoded.mp4

You may be better off using huffyuv instead of raw video - it'll halve your filesize, but be completely lossless. Use -c:v huffyuv instead of -c copy.

share|improve this answer

Looks like you can do that using VLC, i.e.

vlc --dshow-vdev="Monitor Webcam" --dshow-size=640x480 -V dummy 
--intf=dummy --dummy-quiet --video-filter=scene --no-audio 
--scene-path=D:\temp --scene-format=jpeg --scene-prefix=snap 
--scene-replace --run-time=1 --scene-ratio=24 "dshow://" vlc://quit
share|improve this answer

With mplayer/mencoder binary for windows.

Show output from web:

"C:\Program Files (x86)\MPlayer for Windows\mplayer.exe" -tv driver=dshow:device=0:adevice=0:audioid=1:input=2 tv://

Write output:

mencoder.exe -tv driver=dshow:device=0:adevice=0:audioid=1:input=2 tv:// -oac copy -ovc copy -o t.avi
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .