1 |
On Sat, Oct 06, 2012 at 07:48:50AM -0400, Michael Mol wrote |
2 |
|
3 |
> When I last used guvcview, it muxed both audio and video into an |
4 |
> appropriate container format for me, but it was all very configurable. |
5 |
> I do recall I went with MJPEG for a video codec.[1] |
6 |
> |
7 |
> I realize you're not fond of GNOME, but guvcview doesn't require |
8 |
> pulling in all of gnome. Though looking at it now, it may require |
9 |
> pulseaudio. |
10 |
> |
11 |
> I haven't tried luvcview, sorry. |
12 |
> |
13 |
> [1] This video was recorded with guvcview, and then uploaded as-is. |
14 |
> http://www.youtube.com/watch?v=kul0eGILCI4 |
15 |
|
16 |
I eventually did it "the unix way", stringing together a couple of |
17 |
programs. The following is one long line... |
18 |
|
19 |
ffmpeg -y -f alsa -i plughw:0,0 -f video4linux2 -i /dev/video0 -f avi -vcodec mpeg4 /dev/stdout | tee output.avi | mplayer -cache 32 - |
20 |
|
21 |
|
22 |
ffmpeg encodes the streams from webcam+microphone, and spits it out to |
23 |
stdout, which is piped to the "tee" program. "tee" sends out 2 |
24 |
duplicate streams... |
25 |
1) to diskfile output.avi |
26 |
2) to stdout, which is piped to mplayer, which displays a copy of the |
27 |
stream onscreen |
28 |
|
29 |
There's approximately a 1-second lag, but that's OK. The terminal |
30 |
from which the command is launched produces warnings each time the cache |
31 |
is emptied, but it works. Remember that this is an early Intel Atom Z520 |
32 |
which is rather weak. There is finally an open source kernel driver for |
33 |
the Intel/Poulsbo GPU, but it has no acceleration. The fact that it |
34 |
works acceptably is a minor miracle. The only mplayer video option that |
35 |
works properly is the barebones "x11" option. All others except the |
36 |
"fbdev2" either produce no video, or output in "seconds per frame", |
37 |
rather than "frames per second" <G>. fbdev2 may be a bit faster than |
38 |
x11, but it has its own issues... |
39 |
|
40 |
1) Since it bangs away directly at the framebuffer, you need higher |
41 |
permissions; i.e. either root or setuid. |
42 |
|
43 |
2) It slaps the output in the upper left corner of the screen, |
44 |
overwriting X, because it writes directly to framebuffer. |
45 |
|
46 |
-- |
47 |
Walter Dnes <waltdnes@××××××××.org> |
48 |
I don't run "desktop environments"; I run useful applications |