solution for cheap mpeg4 ip cams and others encoding input
solution for cheap mpeg4 ip cams and others encoding input
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/Mo ... backDevice)
- 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
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/Mo ... backDevice)
- 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
vloopback and vpipe for debian (packages compiled against sid)
deb http://packages.medianix.net/ mercury main
apt-get/aptitude install vpipe
m-a get vloopback-source
deb http://packages.medianix.net/ mercury main
apt-get/aptitude install vpipe
m-a get vloopback-source
A little and crappy python daemon to automagically setup vpipe + vloopback for multiple ip cams:
http://download.astronomix.org/ZMmpeg4.tgz
Read the "README" file inside the tarball.
http://download.astronomix.org/ZMmpeg4.tgz
Read the "README" file inside the tarball.
Hi nextime
You seem to have hit exactly what I want to do.
I have set up ffmpeg and vloopback but I can't seem to figure out how to install vpipe and can't find any documentation on it?
I downloaded the package from http://download.astronomix.org/vpipe-0.0.2.tgz
but typing make says there is nothing to be done. I am trying to use your zmmpeg script which says it starts with no errors (I see ffmpeg processes running) but zoneminder gives the following in /var/log/messages:
Dec 4 23:01:15 hypnos zmwatch[2357]: INF [Restarting capture daemon for cam1, shared memory not valid]
Dec 4 23:01:16 hypnos zmdc[2314]: INF ['zmc -d /var/zmmpeg4/cam1' starting at 07/12/04 23:01:16, pid = 26719]
Dec 4 23:01:16 hypnos zmdc[26719]: INF ['zmc -d /var/zmmpeg4/cam1' started at 07/12/04 23:01:16]
Dec 4 23:01:16 hypnos zmwatch[2357]: INF ['zmc -d /var/zmmpeg4/cam1' starting at 07/12/04 23:01:16, pid = 26719]
Dec 4 23:01:16 hypnos zmc_dcam1[26719]: INF [Debug Level = 0, Debug Log = <none>]
Dec 4 23:01:16 hypnos zmc_dcam1[26719]: ERR [Failed to open video device /var/zmmpeg4/cam1: Invalid argument]
Dec 4 23:01:16 hypnos zmdc[2314]: ERR ['zmc -d /var/zmmpeg4/cam1' exited abnormally, exit status 255]
Dec 4 23:01:18 hypnos zmdc[2314]: WAR [Can't find process with command of 'zma -m']
Dec 4 23:01:19 hypnos zmdc[2314]: WAR [Can't find process with command of 'zmc -m']
Not sure what this is. Please forgive my ignorance.
Im running Fedora Core 7
I would really appreciate your help
You seem to have hit exactly what I want to do.
I have set up ffmpeg and vloopback but I can't seem to figure out how to install vpipe and can't find any documentation on it?
I downloaded the package from http://download.astronomix.org/vpipe-0.0.2.tgz
but typing make says there is nothing to be done. I am trying to use your zmmpeg script which says it starts with no errors (I see ffmpeg processes running) but zoneminder gives the following in /var/log/messages:
Dec 4 23:01:15 hypnos zmwatch[2357]: INF [Restarting capture daemon for cam1, shared memory not valid]
Dec 4 23:01:16 hypnos zmdc[2314]: INF ['zmc -d /var/zmmpeg4/cam1' starting at 07/12/04 23:01:16, pid = 26719]
Dec 4 23:01:16 hypnos zmdc[26719]: INF ['zmc -d /var/zmmpeg4/cam1' started at 07/12/04 23:01:16]
Dec 4 23:01:16 hypnos zmwatch[2357]: INF ['zmc -d /var/zmmpeg4/cam1' starting at 07/12/04 23:01:16, pid = 26719]
Dec 4 23:01:16 hypnos zmc_dcam1[26719]: INF [Debug Level = 0, Debug Log = <none>]
Dec 4 23:01:16 hypnos zmc_dcam1[26719]: ERR [Failed to open video device /var/zmmpeg4/cam1: Invalid argument]
Dec 4 23:01:16 hypnos zmdc[2314]: ERR ['zmc -d /var/zmmpeg4/cam1' exited abnormally, exit status 255]
Dec 4 23:01:18 hypnos zmdc[2314]: WAR [Can't find process with command of 'zma -m']
Dec 4 23:01:19 hypnos zmdc[2314]: WAR [Can't find process with command of 'zmc -m']
Not sure what this is. Please forgive my ignorance.
Im running Fedora Core 7
I would really appreciate your help
Ther's no documentation on vpipe, it's just a piece of code written by a my collegue in 2 hours to do the trick in zoneminder.blight wrote:Hi nextime
You seem to have hit exactly what I want to do.
I have set up ffmpeg and vloopback but I can't seem to figure out how to install vpipe and can't find any documentation on it?
Anyway, all you need is to perform "make clean" and "make" if you have problems with it, anyway, you should be able to use it as already compiled, no library dependencies are required (except libc, of course).
To understand how to use it, you can do ./vpipe -i
Take care that "videodev-id" is the leading number of the device, for example, the "videodev-id" of /dev/video3 is "3".
You can simply pipe to it video output from ffmpeg like ffmpeg <options> | ./vpipe <options>.
ZMmpeg4 is also written in about 30 minutes to get things work what i want, but be care that it don't do any errore check, so, the thing that it start with no errors isn't so sure, at least not yet (maybe in future versions).blight wrote: I downloaded the package from http://download.astronomix.org/vpipe-0.0.2.tgz
but typing make says there is nothing to be done. I am trying to use your zmmpeg script which says it starts with no errors (I see ffmpeg processes running) but zoneminder gives the following in /var/log/messages:
Anyway, you can try to check a simple ps aux and look if vpipe and ffmpeg are launched, and you can look on your dmesg to check if vloopback is loaded correctly.
Also, you can try to start ffmpeg and vpipe by hand in console copying the command line created by ZMmpeg4 in shell and look if all lool good.
Is there the simbolic link /var/zmmpeg4/cam1?blight wrote: Dec 4 23:01:15 hypnos zmwatch[2357]: INF [Restarting capture daemon for cam1, shared memory not valid]
Dec 4 23:01:16 hypnos zmdc[2314]: INF ['zmc -d /var/zmmpeg4/cam1' starting at 07/12/04 23:01:16, pid = 26719]
Dec 4 23:01:16 hypnos zmdc[26719]: INF ['zmc -d /var/zmmpeg4/cam1' started at 07/12/04 23:01:16]
Dec 4 23:01:16 hypnos zmwatch[2357]: INF ['zmc -d /var/zmmpeg4/cam1' starting at 07/12/04 23:01:16, pid = 26719]
Dec 4 23:01:16 hypnos zmc_dcam1[26719]: INF [Debug Level = 0, Debug Log = <none>]
Dec 4 23:01:16 hypnos zmc_dcam1[26719]: ERR [Failed to open video device /var/zmmpeg4/cam1: Invalid argument]
Dec 4 23:01:16 hypnos zmdc[2314]: ERR ['zmc -d /var/zmmpeg4/cam1' exited abnormally, exit status 255]
Dec 4 23:01:18 hypnos zmdc[2314]: WAR [Can't find process with command of 'zma -m']
Dec 4 23:01:19 hypnos zmdc[2314]: WAR [Can't find process with command of 'zmc -m']
Is there also the device /dev/videoX linked by /var/zmmpeg4/cam1?
Can you launch mplayer or another videoplayer on it?
Have your zoneminder right permission to real /dev/videoX devices?
-
- Posts: 1
- Joined: Mon Mar 15, 2010 11:53 am
Do you mean that using ZoneMinder one can pipe from, lets say, IP camera to /dev/video* ?kingofkya wrote:See wiki on the subject. You will learn you don't need this anymore.
If this is the case, would you explain how to do so or at least where is that written in wiki?
A nice job vpipe+vloopback might do (i didn't achieve it - that's why i am asking) is to pipe any video (rtsp-stream from CCTV or a movie from file) to /dev/video - and from there i could try to stream it using flumotion, skype or ekiga, because my aim is not to store video locally, but to (re)stream it.