Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pub
cams
Commits
576a3fdc
Commit
576a3fdc
authored
Sep 01, 2018
by
Neil Gershenfeld
Browse files
wip
parent
7cc405a9
Changes
3
Hide whitespace changes
Inline
Side-by-side
motion/README.md
View file @
576a3fdc
<pre>
shopcam server
can use Ubuntu
MATE on a Raspberry Pi 3
with an HD Webcam
sudo apt-get updat
e
can use Ubuntu
18.04
with an HD Webcam
sudo apt-get updat
sudo apt-get dist-upgrade
sudo apt-get install
gedit chromium-browser
git ristretto tightvncserver openssh-server motion
sudo apt-get install git ristretto tightvncserver openssh-server motion
sudo systemctl enable ssh
System -> Administration -> Time and Date -> Keep synchronized with internet servers
sudo update-manager -> turn off automatic updates
...
...
@@ -13,6 +13,11 @@ clone repos:
git clone https://gitlab.cba.mit.edu/pub/cams.git
git clone https://github.com/novnc/noVNC.git
set up motion
mkdir ~/.motion
cp ~/cams/motion.conf ~/.motion
mousepad ~/.motion/motion.conf
set VNC password:
tightvncpasswd
...
...
@@ -21,7 +26,7 @@ set up VNC:
chmod +x ~/.vnc/xstartup
can use https certificates
install VNC service
(assuming username is fab)
:
install VNC service
for remote picture viewing
:
cd ~/cams
sudo cp tightvncserver.service /lib/systemd/system
sudo systemctl daemon-reload
...
...
@@ -35,16 +40,7 @@ reboot
connect to VNC:
http://your_ip_address:6789/vnc.html
view and set configuration at http://127.0.0.1:8081
once connected:
view camera at http://127.0.0.1:8081
set configuration at http://127.0.0.1:8080
sample settings:
daemon: on
target_dir: ~/Pictures
ffmpeg_output_movies: off
width: 1280
height: 1024
threshold: 40000
framerate: 2
minimum_frame_time: 1
connect to stream:
http://your_ip_address:8080
motion/motion.conf
0 → 100644
View file @
576a3fdc
# Rotate image the given number of degrees.
rotate
0
# Threshold for number of changed pixels that triggers motion.
threshold
10000
# The noise level is used as a threshold for distinguishing between noise and motion.
noise_level
50
# Maximum number of frames to be captured per second.
framerate
2
# Minimum time in seconds between the capturing picture frames from the camera
minimum_frame_time
1
# Image width in pixels.
width
1280
# Image height in pixels.
height
720
# Let motion regulate the brightness of a video device
auto_brightness
on
# The brightness level for the video device
brightness
128
# The contrast level for the video device.
contrast
128
# Start in daemon (background) mode and release terminal.
daemon
off
# Start in Setup-Mode, daemon disabled.
setup_mode
off
# Level of log messages [1..9] (EMG, ALR, CRT, ERR, WRN, NTC, INF, DBG, ALL).
log_level
5
# Target directory for pictures, snapshots and movies
target_dir
Pictures
# Video device (e.g. /dev/video0) to be used for capturing.
videodevice
/
dev
/
video0
# Text to be overlayed in the lower left corner of images
#text_left CAMERA1
# Text to be overlayed in the lower right corner of images.
text_right
%
Y
-%
m
-%
d
\
n
%
T
-%
q
\
n
%
D
# Always save pictures and movies even if there was no motion.
emulate_motion
off
# Despeckle the image using (E/e)rode or (D/d)ilate or (l)abel.
despeckle_filter
EedDl
# Number of images that must contain motion to trigger an event.
minimum_motion_frames
1
# Gap in seconds of no motion detected that triggers the end of an event.
event_gap
0
# The number of pre-captured (buffered) pictures from before motion.
pre_capture
0
# Number of frames to capture after motion is no longer detected.
post_capture
0
# This option controls the output of the normal image.
output_pictures
on
# File name(without extension) for pictures relative to target directory
picture_filename
%
Y
-%
m
-%
d
-%
H
-%
M
-%
S
# Port number used for the webcontrol.
webcontrol_port
8081
# Restrict webcontrol connections to the localhost.
webcontrol_localhost
on
# This parameter establishes the username and password to use for the stream
webcontrol_authentication
user
:
pass
# The port number for the live stream.
stream_port
8080
# Restrict stream connections to the localhost.
stream_localhost
off
# This parameter establishes desired authentication method for the stream and web control ports
stream_auth_method
2
# This parameter establishes the username and password to use for the stream
stream_authentication
user
:
pass
motion/xstartup
View file @
576a3fdc
...
...
@@ -4,7 +4,7 @@
unset
DBUS_SESSION_BUS_ADDRESS
#xrdb $HOME/.Xresources
#xsetroot -solid grey
motion
-c
/home/fab
/.motion/motion.conf
-l
/home/fab
/.motion/motion.log
-p
/home/fab
/.motion/motion.pid
motion
-c
~
/.motion/motion.conf
-l
~
/.motion/motion.log
-p
~
/.motion/motion.pid
ristretto /home/fab/Pictures &
cd
/home/fab/noVNC
./utils/launch.sh
--listen
6789
--vnc
127.0.0.1:5901 &
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment