Video Storage Possible?

Forum for questions and support relating to the 1.25.x releases only.
Locked
enito
Posts: 7
Joined: Fri Sep 02, 2011 10:51 pm

Video Storage Possible?

Post by enito »

Hi ,

i recently installed in a debian box a zoneminder, looks so nice..my question, if possible storage videos making with motion in a dir for access to user using samba? i see video can be generated from jpg captures, but i wanna do it automaticly , and send to a dir for access via network, possible?

thx !!!
christophe_y2k
Posts: 102
Joined: Mon Oct 12, 2009 8:47 am
Location: EUROPE-FRANCE-MANDELIEU

Re: Video Storage Possible?

Post by christophe_y2k »

hello,
it's possible to share with samba the stockage dir of ZoneMinder (safe with read only)

But give us viewer access directly to zoneminder
User avatar
nightcrawler
Posts: 71
Joined: Fri Aug 12, 2011 9:54 am
Location: the netherlands

Re: Video Storage Possible?

Post by nightcrawler »

yes it's posible.

take a look here:

it's from an other forumboard (homeseer), for home domotica software. 2 members here, ZEN en Pete made an 24H alarm script. that generates an video of all events in the last 24 hour. works well and you probably can alter it in an 1-hour or event trigger video script if you know some basic scripting.

copy&past from the homeseer board and code:

Code: Select all

# !/bin/bash

# Use this script for creating alarm video-files 
# Modded by -Mike- aka Zap

# Enumerate existing ZoneMinder Monitors
cameraList=(`ls /var/cache/zoneminder/events/ | grep '[A-z]'`)
cameraNum=${#cameraList[@]}
eventsFolder=/var/cache/zoneminder/events/
echo Number of detected ZoneMinder Monitors: ${#cameraList[@]}

# Start working through all detected ZoneMinder Monitors
 for (( i=0; i<${cameraNum}; i++ ));
 do
  echo Doing ZoneMinder Monitor: ${cameraList[$i]}

# Get a list of images for the last 24 hours from each of the detected ZoneMinder Monitors.
  find $eventsFolder${cameraList[$i]} -follow -mtime -1 -name \*capture.jpg > /tmp/alarmvideos/${cameraList[$i]}.list

# Sort output file for a consistent movie
  sort /tmp/alarmvideos/${cameraList[$i]}.list -o /tmp/alarmvideos/${cameraList[$i]}-sorted.list

# Encode each 24hr events into a movie
  mencoder mf://@/tmp/alarmvideos/${cameraList[$i]}-sorted.list  -mf w=640:h=480:fps=10:type=jpg -ovc lavc -lavcopts vcodec=mpeg4 -ofps 10 -oac copy -o /tmp/alarmvideos/${cameraList[$i]}-`date +%F`.avi

# Find avi's with actual events-move to new dir
  cd /tmp/alarmvideos
  find *.avi -size +5k -exec mv {} /tmp/zmvideos \;

# Cleanup
  rm -rf /tmp/alarmvideos/*.list
  rm -rf /tmp/alarmvideos/*.avi

  done
@*#() can't past the URL because i'm an user with less post...stupid rule...
Zoneminder @Ubuntu 11 server, ZM 1.25.0 , FFMPEG, 4 Analoge cameras, 1.6ghz P4mobile, 2GB ram, 60GB-HDD.
I also have an (homeseer) domotica system up-and-running with touchscreens,light controllers,weather forecast etc.
enito
Posts: 7
Joined: Fri Sep 02, 2011 10:51 pm

Re: Video Storage Possible?

Post by enito »

Hi,

thx a lot for the reply, now i try to analyze the script you give, btw, possible send me via private message the link of the board, where the script was posted? thx!!
enito
Posts: 7
Joined: Fri Sep 02, 2011 10:51 pm

Re: Video Storage Possible?

Post by enito »

Hi,

i discovered this script, for generate the video made in url in section make in video format, to move to a dir , and works..

How to store all recordings as video files in a common folder
url wiki. mikeality. com / Zoneminder



My question is make run the script like in crontab , the script zmvideo.pl for auto detect events, and made the files...
greets
bb99
Posts: 943
Joined: Wed Apr 02, 2008 12:04 am

Re: Video Storage Possible?

Post by bb99 »

aptsys
Posts: 6
Joined: Wed Sep 07, 2011 8:59 pm

Re: Video Storage Possible?

Post by aptsys »

Useful info. Thanks very much :)
Locked