Hi all,
I saw adesperate need of this information. So hopefully somebody finds this informative. It uses the open-source Ogg container format as encoder for video and audio.
First, get an overview of all devices (in this example: /dev/video0):
Code:
v4l2-ctl --list-devices
Check the availible formats:
Code:
v4l2-ctl --list-formats-ext -d /dev/video0
Determ sound source (card: 0 ..., device: 1... is equal to hw:0,1. In this example hw:0,0):
Code:
arecord -l
Record video + audio, directly to file:
Code:
cvlc v4l2:///dev/video0:width=640:height=480 :input-slave=alsa://hw:0,0 --sout="#transcode{vcodec=theo,vb=2000,fps=20,scale=1.0,acodec=vorb,ab=90,channels=1,samplerate=44100}:standard{access=file,mux=ogg,dst=output.ogg}"
Same but with live video:
Code:
cvlc v4l2:///dev/video0:width=640:height=480 :input-slave=alsa://hw:0,0 --sout="#transcode{vcodec=theo,vb=2000,fps=20,scale=1.0,acodec=vorb,ab=90,channels=1,samplerate=44100}:duplicate{dst=display,dst=standard{access=file,mux=ogg,dst=output.ogg}}"
You could change cvlc back to vlc if you want to have controls + menu.