You are not logged in.

#1 2006-04-11 13:00:02

From: Tartu, Estonia
Registered: 2003-08-15
Posts: 88

Trying to capture video with webcam

Hi all,

I have a Logitech QuickCam 400 Pro USB webcam and I just got it working with the help of the forum mates. I can see my moving image with xawtv and camstream and make snapshots. Sending webcam stream with Kopete works as well. However, trying to make a video clip with xawtv's streamer gives an error:

[jan@localhost ~]$ streamer -c /dev/video0 -f mjpeg -o test.avi
avi / video: MJPEG (AVI) / audio: none
no way to get: 320x240 MJPEG (AVI)
movie writer initialisation failed

Changing the output codec does not help. Can anyone suggest an idea what might be wrong here? Google'ing gave me several formums where people had the same problem, but none contained any solutions.

Thus, every piece of help is greatly appreciated. Are there any other applications worth of try?



#2 2006-04-14 02:15:35

From: St. Somewhere
Registered: 2006-01-06
Posts: 302

Re: Trying to capture video with webcam

I also have a Quickcam Pro 4000 and tried all sorts of stuff for recording video before finally settling on this.

ffmpeg seems to work pretty well. Use ffmpeg to record and mplayer to play back. Here are the command lines that I use for the purpose on my 3 GHz PIV (mention CPU and speed just in case some of this may be dependant on that):

To record:

ffmpeg -sameq -s 640x480 output-filename.mpg

or, for a smaller captured image:

ffmpeg -sameq -s cif output-filename.mpg

To playback:

mplayer -fps 15 output-filename.mpg

You can change the "15" to whatever value seems to make the playback go at the "right" speed. I have never figured out how to control the record framerate, or even what the default is, and so I have always had to specify the playback frame rate.

ffmpeg and mplayer are both available in the Arch repositories.

Cast off the Microsoft shackles Jan 2005


Board footer

Powered by FluxBB