HOWTO - Flash video stream in Zoneminder

Add any particular hints or tricks you have found to help with your ZoneMinder experience.
Post Reply
CoYoTe
Posts: 33
Joined: Sat Jul 18, 2009 12:56 pm
Location: Buenos Aires, Argentina

HOWTO - Flash video stream in Zoneminder

Post by CoYoTe »

Hi:
I gonna try to contribute a little with this great project. Sorry if i misspell, and fell free to correct them (my native language is Spanish).

Zoneminder can stream video in many formats. Depending on it, the bandwidth use is affected. So, with a low profile Internet connection, any attempt to see more than 3 or 4 cams in real-time, ends in a big congestion.

To solve this, the best choice is to find a 100% compatible, low band use video stream. For me, the answer was FLASH VIDEO (like youtube streams)

They work on practically every navigation system, can control bandwidth use really well, and can stream multiple channels without too much effort (even can stream audio with a little trick)

So, with only a little adjust in Zoneminder, it works flawlessly, at least for me.

Pros

*Really low bandwidth usage. With a home connection, you can stream all your cams in real-time.
*FFMPEG has a great way to use resources, so, no big CPU usage. In my case even, it goes down a bit, improving the full system performance.
*Full control of stream bandwidth via FFMPEG args.
*Very compatible. Any system or navigator that can see flash streams can use it with no extra requirements.

Contras:

ZM loses the ability to make zoom on streams, but if your browser allow it, you can use view - zoom function to do this.

Requeriments:

ZM v 1.24.2 (on this version i do it)
FFMPEG version SVN-r19836

How to do this:
Under "IMAGES" tab in ZM config, set:

CAN_STREAM to YES (we assume all navigators used can stream)
STREAM_METHOD to MPEG (video mode stream, instead of single image mode)
...
MPEG_LIVE_FORMAT to swf (Flash video format on live stream)
MPEG_REPLAY_FORMAT to swf (flash video format on replay)
RAND_STREAM to checked (useful to avoid stream catching)
...
OPT_FFMPEG to checked (enable the use of FFMPEG)
PATH_FFMPEG to the full path of your FFMPEG executable (ex. /usr/local/bin/ffmpeg)
FFMPEG_INPUT_OPTIONS to -an (we don't need audio, this disable it on encode)
FFMPEG_OUTPUT_OPTIONS to -r 10 -an -b 64k -s qvga -maxrate 64k -bufsize 64k (read FFMPEG doc for details, basically set rate, no audio, input buffer, resolution, etc..
With this settings done, full restart ZM. If all is ok, you must have a multiple stream working with a low band consumption.
I can, for example, see all cams via my home connection with no problem.

You can test with another values, rates and resolutions (remember to set cameras to the resolution you want). In the example, i use 8 analog color generic cams in qvga (320x240), captured with a Geovision GV900 in real-time.

I hope this info can be useful.
Alejandro
DREMA
Posts: 162
Joined: Fri Dec 12, 2008 2:39 am
Location: México

Post by DREMA »

Excellente! Puedes agregarlo al Wiki?
Just... enjoy life! :D
Post Reply