Webkamera Linux alatt
Hogy itt is meglegyen :
To stream video with luvcview (plenty of options to experiment with):
luvcview -f yuv -s 320×240 -d /dev/video0
Open up the camera’s video stream in MPlayer:
mplayer -tv driver=v4l2:device=/dev/video0 tv://
Open in VLC:
vlc v4l2:///dev/video0
To make a recording I use ffmpeg… a ‘swiss army knife’ of video hackery on Linux:
ffmpeg -f oss -i /dev/dsp -f video4linux2 -s 640×480 -i /dev/video0 output.mpg
*Note: the netbook’s internal microphone is ‘/dev/dsp’
Save and open output.mpg in MPlayer or VLC. The quality of the video is rather low. When ffmpeg is running it displays the quality of the capture as q=[value] with value being a scale between 1 (best) to 31 (worst).
Some options that can quickly be modified to improve video capture are:
* increase bitrate… ‘-b’ option
* decrease frame rate… ‘-r’ option
* decrease frame size… ‘-s’ option
The -qscale option is useful. It allows setting a constant quality value with a variable bitrate. Running the previous command with a few modifications produces a decent output:
ffmpeg -f oss -i /dev/dsp -f video4linux2 -qscale 1 -r 24 -s 320×240 -i /dev/video0 output2.mpg
Now that the camera is up and working it is ready and well-suited for tasks such as video chatting and VOIP using Pidgin, Ekiga, Skype, etc.
Leave a Reply