A few unrelated events motivated me to start playing with my laptop’s webcam today … and have some fun
First, because the maid was cleaning my computer room, and my wife was having a party with her Thai girl-friends, I was evicted for a short time from my computer room. … Also, I did not go outside, as I am fighting off a mild feaver, so I decided to stay inside, and play with the family laptop (Dell Studio 15) , accessing the web via our home wireless.
I also was trying to support user Larry1019 who wanted to get his internal mic working. I had long since stopped trying to get the internal mic working on my laptop, and when user Larry1019 asked for support, I was rather negative. This was my FAULT.
So I was composing a reply to him, when I recalled I had read (and saved) an Ubuntu user’s solution for the internal integrated laptop mic, but I was busy and I had discarded it because it got a bad Ubuntu reception from various Ubuntu newbies … So I decided to try the solution on my laptop, and well … , one thing lead to another, and my internal mic was working because of that Ubuntu thread.
So I then thought, since my laptop’s integrated mic is working, lets see how far I can go with this, from the command line.
Here are some interesting (for me) command line commands one can use to record audio and video from their webcam and mic. Note one needs the Packman packaged libffmpeg0, ffmpeg, and mplayer to use the commans below:
To just play video (no recording):
mplayer tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0
To record both video only in the file “webcam.avi”:
mencoder tv:// -tv driver=v4l2:width=320:height=240:device=/dev/video0 -ovc lavc -o webcam.avi
To record both video and audio in the file “webcam.avi”:
mencoder tv:// -tv driver=v4l2:width=320:height=240:device=/dev/video0:forceaudio:adevice=/dev/dsp -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o webcam.avi
or with ffmpeg, to record both video and audio in the file “out.mpg”:
ffmpeg -f oss -i /dev/dsp -f video4linux2 -s 320x240 -i /dev/video0 out.mpg
Note with ffmpeg, on my laptop, the audio was about 400 msec ahead of the video. This was easily fixed in avidemux. The mencoder command did not have the audio/video sync problem.
My Dell Studio 15’s webcam is an ID: 05ca:18a1 Ricoh Co., Ltd and it works with the uvc driver.
I found the above commands on a Ubuntu thread, and I modified the commands very slightly to work on openSUSE. https://help.ubuntu.com/community/Webcam
Maybe we can have some more fun on this thread. … Does anyone else know of any neat COMMAND LINE commands to use to play with one’s mic and webcam?