Vpipe

From ZoneMinder Wiki
Revision as of 12:04, 2 December 2007 by Nextime (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

A way to get the stream from mpeg4 only capable ip cams ( or other encoding also ) captured in zm:

This way work better in terms of load and FPS than the method of save a single frame a time with mplayer in jpeg.

You need: - ffmpeg - vloopback (http://www.lavrsen.dk/twiki/bin/view/Motion/VideoFourLinuxLoopbackDevice) - vpipe (http://download.astronomix.org/vpipe-0.0.2.tgz )

compile vloopback and modprobe it to create a v4l loopback device. It create a videoN and videoN+1 couple of devices, /dev/video0 and /dev/video1 for example. In this case, video0 is the input device, and video1 is the output device.

Now. with ffmpeg, do something like:

ffmpeg -i http://<ip_of_your_cam>/img/video.asf -r 8 -f rawvideo - | ./vpipe -f <format> -i 0 where 0 mean "/dev/video0"

Now you can simply create a monitor that point to /dev/video1 chan 0 whith the same resolution and color palette of your ffmpeg formatted output, and you get your cam work with zoneminder

If you hare on debian sid:

deb http://packages.medianix.net/ mercury main

apt-get/aptitude install vpipe m-a get vloopback-source