2011/07/21

Video Audio Capture in Linux

Video
Webcam support in Linux is mainly provided by the Linux UVC Project's UVC driver.

The UVC driver implements the Video4Linux 2 (V4L2) API

The specification of V4L2 API can be found at http://v4l2spec.bytesex.org/

Example:
In ffmpeg, file libavdevice/v4l2.c
http://v4l2spec.bytesex.org/v4l2spec/capture.c

Command:
#To capture video
ffmpeg -f video4linux2 -i /dev/video0 out.mpeg


Audio
Ubuntu is using ALSA for audio input output

Command:
#To capture audio
ffmpeg -f alsa -ac 2 -i hw:0 alsaout.wav

#To get hardware info
arecord -l



Reference:
http://ffmpeg.org/ffmpeg-doc.html
http://www.ideasonboard.org/uvc/
https://help.ubuntu.com/community/Webcam
https://help.ubuntu.com/community/UVC
http://v4l2spec.bytesex.org/
http://www.alsa-project.org/

No comments:

Post a Comment

Post Code on Blogger

Simplest way to post code to blogger for me: <pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black;overflow-x:...