Foscam FI9805W: HOW-TO: Stream video to zoneminder

Forum for questions and support relating to the 1.26.x releases only.
Locked
tkalfaoglu
Posts: 65
Joined: Wed Nov 22, 2006 6:19 am

Foscam FI9805W: HOW-TO: Stream video to zoneminder

Post by tkalfaoglu »

I just successfully got streaming working from my camera to zoneminder.
The camera is a HD Foscam FI9805W.

Beforehand, I could take snapshots, but those proved to be too slow -- only 0.7FPS at best.
I eventually got video streaming to work! (took 3 days of work).

Here is how, and its not documented anywhere; long live trial and error.

Platform: Fedora 19

1) Compile zoneminder so that it would have the rtsp support.
The zoneminder that comes with fedora did not have rtsp support. Hence, I had to compile it from scratch.

That required that I recompile ffmpeg..
For ffmpeg, my configure line ended up being:
CFLAGS=-fPIC ./configure --prefix=/usr --enable-gpl --enable-postproc --enable-swscale --enable-pthreads --enable-x11grab --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libxvid --enable-nonfree --enable-version3 --enable-libvpx --enable-nonfree --enable-libopenjpeg --enable-libspeex --enable-libv4l2 --enable-libxvid --enable-libspeex --enable-libpulse --enable-libx264 --arch=x86_64 --enable-runtime-cpudetect --enable-shared

For zoneminder, my configure line was:
export CXXFLAGS=-D__STDC_CONSTANT_MACROS;./configure --prefix=/usr --with-extralibs=-L/usr/lib --with-libarch=lib64 --with-mysql=/usr --with-ffmpeg=/usr --with-webdir=/usr/share/zoneminder/www --with-webhost=localhost --with-cgidir=/usr/libexec/zoneminder/cgi-bin --with-extralibs="-lfreetype -lmp3lame -lopenjpeg -lrtmp -lspeex -ltheora -lvorbis -lvorbisenc -lx264 -lfaac -lgsm -lopenjpeg -lv4l2 -lpulse"

The how-to I used is here: http://tom.webarts.ca/Blog/new-blog-ite ... fromsource , fortunately I did not get all the errors he mentions.

2) Start zoneminder when ready, iron out the quirks.
If this is an upgrade, /var/log/messages will tell you that you need to run zmupdate.pl.. Just run it without options..


3) Go into the camera's web interface: http://192.168.1.111:88 whatever. Go to Video tab in settings, and set the video rate to be
720P, and 5 Frames Per second.

4) Now configure the camera like this:
Source: ffmpeg
Maximum FPS: leave it blank
Alarm FPS: leave it blank
Source Path: rtsp://admin:adminpassword@192.168.1.12:88/videoMain
Capture Width: 1280
Capture Height: 720

Now you should get a video that's up to 10.4 FPS. But As you see, I reduced it to 5FPS so that the software+PC can catch up.

Regards,
Turgut Kalfaoğlu
Izmir - Turkey
Last edited by tkalfaoglu on Sun Sep 22, 2013 4:43 am, edited 2 times in total.
c128
Posts: 88
Joined: Sat Sep 14, 2013 3:36 pm

Re: Foscam FI9805W: How to stream to zoneminder

Post by c128 »

Interesting...just seen this post after replying to your post on the 1.25.x forum.

How stable is your RTSP connection with this camera over time now you're using RTSP?

I seem to have constant issues, that ultimately involve having to reboot the camera to get RTSP streaming working again - all documented here:

http://foscam.us/forum/fi9805w-can-t-ge ... t6980.html

...nothing to do with Zoneminder obviously (have the same problems with VLC) but I'm just wondering whether you suffer the same thing?
tkalfaoglu
Posts: 65
Joined: Wed Nov 22, 2006 6:19 am

Re: Foscam FI9805W: How to stream to zoneminder

Post by tkalfaoglu »

I only had it running for about 10 hours now. The camera still works, and no problems that I can see.
I did apply the new firmware a few days ago. Maybe they fixed something?
-t
tkalfaoglu
Posts: 65
Joined: Wed Nov 22, 2006 6:19 am

Re: Foscam FI9805W: HOW-TO: Stream video to zoneminder

Post by tkalfaoglu »

Ok, the only problem I see is that sometimes a partial video frame is received..
The top part of the picture is there, but the bottom is just the last row repeated all the way down the image.
About a second later, the correct stream resumes (probably after a keyframe?) but this generates an event with a huge score of course.

I'm trying various things against this, such as reducing FPS to 5 (I updated the above document), but its occurrence is low, so I'm not too worried..
c128
Posts: 88
Joined: Sat Sep 14, 2013 3:36 pm

Re: Foscam FI9805W: HOW-TO: Stream video to zoneminder

Post by c128 »

mmm...interesting.

When it works for me, it works pretty well, but when it stops streaming then that's it - a soft reboot from the camera web UI is required to get it to stream anything over RTSP to any client again (either Zoneminder or VLC); the IP Cam Client still works through all of this, it's just that RTSP streaming is broken until the camera reboot. Nothing explicitly to do with Zoneminder, of course, just annoying and frustrating.

I too am using the latest firmware - upgraded at the time of purchase a few weeks ago. The RTSP stream typically lasts about 24 hours for me (sometimes a bit more, sometimes a bit less). I have a support request open with Foscam for this, as have others, but the response so far hasn't exactly been favourable ("our R&D team are trying to reproduce this") and I'm not exactly expecting a fix or a workaround :(
Locked