1. Compile the
vloopback device (http://directory.fsf.org/vloopback.html) and load it into
memory. At the moment (12 June 2007 it seems that the original server
seems offline. A copy of the 1.0 version can be downloaded here)
modprobe vloopback
2. set the
permissions of all the following devices to your liking
/dev/video1394/*
/dev/raw1394/*
/dev/video[01]
3. Open
coriander and set the receive tab configuration to for instance 16 bpp,
1024x768 downsampled at 30fps.
4. Start the
receiving service (you could also start the display service to see
whether the results are ok)
5. When the
vloopback module loads it reports which video device is input and
output of the video pipe. On my macjhine th einput is /dev/video0. Set
the input of the video pipe in the V4L tab and start the service.
6. To record the
movie now, we can use mencoder to capture the stream on the fly. The
following small script contains the necessary parameters. Note that we
use here the video out device of the video loopback pipe (being
/dev/video1). The width and height must be right as well as the outfmt
(this took some testing to find the correct values)
#!/bin/bash
mencoder
tv:// \
-tv
driver=v4l:device=/dev/video1:outfmt=rgb24:width=512:height=384 \
-flip \
-ovc
lavc -o $1 \
-lavcopts vbitrate=15000
To use it enter
./catchv4lstream512x384
test.avi
This will write
the stream to the file test.avi. Standard mplayer can afterwards play
the data.