yum localinstall -y --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
yum install cheese motion ffmpeg ffmpeg-devel vlc
UUID=99c4e523-5bc0-455a-8c9b-a5870a04464d / ext4 defaults 1 1
UUID=c1a77fdc-9cee-471f-9472-ad74c88d6b59 /boot ext4 defaults 1 2
UUID=58492d68-56ce-42da-a705-1f2f440b6ab3 /home ext4 defaults 1 2
UUID=3098b26b-2182-4d8d-ae50-92eba3b46393 swap swap defaults 0 0
UUID=060496D64CADD265 /var/motion ntfs uid=motion,gid=video,umask=002 0 0
[root@cam01 motion]# diff -y --suppress-common-lines motion.conf.org motion.conf
rotate 0
width 320
height 240
auto_brightness off
minimum_motion_frames 1
pre_capture 0
output_pictures on
quality 75
ffmpeg_timelapse 0
ffmpeg_variable_bitrate 0
locate_motion_mode off
locate_motion_style box
; text_left CAMERA %t
snapshot_filename %v-%Y%m%d%H%M%S-snapshot
picture_filename %v-%Y%m%d%H%M%S-%q
movie_filename %v-%Y%m%d%H%M%S
timelapse_filename %Y%m%d-timelapse
stream_motion off
stream_localhost on
|
rotate 180
width 1920
height 1080
auto_brightness on
minimum_motion_frames 3
pre_capture 3
output_pictures best
quality 95
ffmpeg_timelapse 30
ffmpeg_variable_bitrate 2
locate_motion_mode on
locate_motion_style redbox
text_left CAMERA %t
snapshot_filename %Y%m%d/%H%M%S-%v-snapshot
picture_filename %Y%m%d/%H%M%S-%v-%q
movie_filename %Y%m%d/%H%M%S-%v
timelapse_filename timelapse/%Y%m%d
stream_motion on
stream_localhost off
|
[root@cam01 motion]# systemctl enable motion.service
ln -s '/usr/lib/systemd/system/motion.service' '/etc/systemd/system/multi-user.target.wants/motion.service'
[root@cam01 motion]# systemctl start motion.service
[root@cam01 motion]# systemctl status motion.service
motion.service - motion detection system
Loaded: loaded (/usr/lib/systemd/system/motion.service; enabled)
Active: active (running) since Sat 2014-05-24 18:05:54 KST; 6s ago
Docs: man:motion(1)
http://www.lavrsen.dk/foswiki/bin/view/Motion/WebHome
Main PID: 2889 (motion)
CGroup: /system.slice/motion.service
└─2889 /usr/bin/motion -n
...
[root@cam01 motion]#
[root@cam01 motion]# groupmems --add tsohr --group video
[root@cam01 motion]#
[root@cam01 system]# diff -y --suppress-common-lines motion.service motion.service.old
#Environment=LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so
|
Environment=LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so
Restart=always
RestartSec=30
|
while true; do
pcent=`df --sync --output=pcent /var/motion \
| tail -n 1 | rev | cut -c 2- | rev`;
if [[ "$pcent" < "95" ]]; then
exit 0;
fi;
deltaret=`ls -d 20* | sort | head -n 1`;
rm -rvf "$deltaret";
done;
No comments:
Post a Comment