[chbot] V4L2 tutorial

Col colp42 at gmail.com
Thu Oct 27 04:54:25 BST 2011


On 27/10/11 13:37, Mark Atherton wrote:
> Hi All,
>
> I have a PCI video capture card (with on board MPEG-2 video encoder)
> plugged into an x86 loaded with Ubuntu Studio 11.04.
>
> I believe that with a little cunning, it is possible to configure one
> of the dev/video devices to become a block file video source (so you
> could open it, and copy the data to a file for example, or pipe it
> through a filter etc).
>
> Anyone know of any good tutorials on the subject ?
>

Hi Mark, I used to have a similar card. Heres some notes I had made when 
using it.


play composite
$ v4l2-ctl -i 2
$ mplayer /dev/video0

play and record at same time
$ cat /dev/video0 | tee file.mpg | mplayer -

watch tv using tuner
$ v4l2-ctl -i 0
$ ivtv-tune -f224.25
$ mplayer /dev/video0
or
$ ivtv-tune -tnewzealand -c8

radio using aplay
$ ivtv-radio -f 102.5
or
$ ivtv-radio -j -f 102.5
$ aplay -f dat < /dev/video24

stream tv with netcat
on client $ nc -l -p 5000 | mplayer -
on server $ cat /dev/video0 | nc 10.10.10.6 5000



Cheers
Col.





More information about the Chchrobotics mailing list