Motion PHP Interface

Introduction

This is a PHP web application that allows you to browse through all events recorded by motion and watch / download the respective video.

There is a timeline where you can see the thumbnail for each event. The timeline is for ‘n’ cameras in one day selected from a calendar.

You can also select events and delete them.

It's a great! interface for running Motion on a computer without monitor / keyboard / mouse and you only have a network connection!


MotionBrowser_Screenshot.jpg

Attached Files

motionbrowser_20060313.tar - PHP web interface

Installation

First you must have the motion application installed and running with;

  • mysql server and the ffmpeg libraries.
  • GD as in php4-gd or php5-gd. --this is required for drawing the thumbnails.
  • Apache web server.
  • PHP.

I've tested it with motion 3.2.8.1.

Secondly a new database and table needs to be added to your mysql server. Run the command as root

mysql -h localhost -p -u root

then

CREATE USER 'newmotionuser'@'localhost' IDENTIFIED BY 'somepassword';

This will setup the new user for your php pages to use. Now add a database.

CREATE DATABASE motiondb;

then

grant all on motiondb.* to 'motionuser1'@'localhost' identified by 'somepassword';

at this point you can check to see if you created the database by a

USE motiondb;

then

CREATE TABLE `security` (`camera` int(11) default NULL, `filename` varchar(80) NOT NULL default '',`frame` int(11) default NULL, `file_type` int(11) default NULL,`time_stamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,`text_event` varchar(40) NOT NULL default '0000-00-00 00:00:00',`event_time_stamp` timestamp NOT NULL default '0000-00-00 00:00:00', `file_size` varchar(36) NOT NULL default '0',KEY `time_stamp` (`time_stamp`),KEY `event_time_stamp` (`event_time_stamp`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;

this must be all as one command. This is also in the README file in the mb.tar.

There are some options in the configuration file motion.conf that are important for the way MotionBrowser works. I'm only indicating the ones that are different from the default:

  • output_normal best (I haven't tested with 'on', but it should also work)
  • ffmpeg_cap_new on
  • sql_log_mpeg on
  • mysql_db motion (my database name)
  • mysql_host localhost
  • mysql_user ... (the user name i created in MySQL)
  • mysql_password ... (the password associated with user)

Now, lets continue,

untar the motionbrowser_20060313.tar file to a folder on the root of your web server (for example: /var/www/http/motionbrowser).

Edit the extracted file config.inc to match your configuration.

If you installed php you may need to restart Apache. Now you can open MotionBrowser using http://localhost/motionbrowser/index.php

and see the PHP goodness.

Users Guide

Once you have MotionBrowser running, you can select the day you want clicking on the calendar.

To view a video of an event, click on the image of the desired event.

You can delete any event, checking the checkbox near each image and then click the button "delete selected".

You can also the select all if you want do delete all events on the current day.

You also have a link to motions setup and a link for each webcam using the small icon on the header close to the "Camera x" title.

Comments and Bug Reports

I've created a yahoo group to manage this project.

Check the url: http://groups.yahoo.com/group/motionbrowser/


-- DanielAgar - 20 Jan 2007

-- JamesCordell - 20 Sep 2007


RelatedProjectsForm edit

ProjectSummary PHP interface to manage the Motion recorded events.
ProjectStatus Stable
ReleaseVersion 1.0.0
ProjectSubmitter CarlosLadeira
Topic attachments
I Attachment Action Size Date Who Comment
MotionBrowser_Screenshot.jpgjpg MotionBrowser_Screenshot.jpg manage 55.4 K 14 Mar 2006 - 14:20 CarlosLadeira MotionBrowser screenshot
motionbrowser.tartar motionbrowser.tar manage 50.0 K 21 Sep 2007 - 12:02 JamesCordell A PHP web interface for motion in english and French
Topic revision: r7 - 21 Sep 2007, JamesCordell
 
Motion - Motion Browser
Copyright 1999-2014 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.