Thursday, February 12, 2015

How To make Simple CCTV Server using Webcam And Motion on OpenWRT

1. Plug your webcam to router openwrt
2. run this command :
opkg update
opkg install kmod-usb-core kmod-usb2 kmod-video-core
opkg install kmod-video-gspca-core kmod-video-gspca-ov519

opkg install kmod-video-uvc

3. reboot your router
4. type this command :
ls /dev => and press enter

do you see video0..??

5. install motion on openwrt
opkg install motion

6. edit file motion.conf on /etc/motion.conf using this script :
#######################
daemon on
process_id_file /var/run/motion/motion.pid
setup_mode off
log_level 6
log_type all
videodevice /dev/video0
v4l2_palette 8
input -1
norm 0
frequency 0
rotate 0
width 352
height 288
framerate 5
minimum_frame_time 0
netcam_keepalive off
netcam_tolerant_check off
auto_brightness on
brightness 0
contrast 0
saturation 0
hue 0
roundrobin_frames 1
roundrobin_skip 1
switchfilter off
threshold 1000
threshold_tune off
noise_level 32
noise_tune on
despeckle_filter EedDl
smart_mask_speed 0
lightswitch 0
minimum_motion_frames 2
pre_capture 0
post_capture 0
event_gap 60
max_movie_time 0
emulate_motion off
output_pictures off
output_debug_pictures off
quality 75
picture_type jpeg
ffmpeg_output_movies off
ffmpeg_output_debug_movies off
ffmpeg_timelapse 0
ffmpeg_timelapse_mode daily
ffmpeg_bps 500000
ffmpeg_variable_bitrate 0
ffmpeg_video_codec mpeg4
ffmpeg_deinterlace off
sdl_threadnr 0
use_extpipe off
snapshot_interval 0
locate_motion_mode on
locate_motion_style redbox
text_right %Y-%m-%d\n%T-%q
text_left SR-C39-PWT
text_changes off
text_event %Y%m%d%H%M%S
text_double off
target_dir /mnt/usb/cctv
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
ipv6_enabled off
stream_port 8080
stream_quality 80
stream_motion off
stream_maxrate 5
stream_localhost off
stream_limit 0
stream_auth_method 0
webcontrol_port 8081
webcontrol_localhost on
webcontrol_html_output on
track_type 0
track_auto off
track_iomojo_id 0
track_step_angle_x 10
track_step_angle_y 10
track_move_wait 10
track_speed 255
track_stepsize 40
quiet on
#######################

7. run motion using command
motion -c /etc/motion.conf

8. open firefox and type this address http://192.168.100.254:8080/?action=stream


No comments:

Post a Comment

Berkomentarlah dengan kata-kata yang sopan,,
Jika menurut Sahabat Blogger Artikel ini bermanfaat silahkan di COPAST (Copy Paste) tanpa mencantumkan sumber..
#Kalau ingin dicantumkan, Alhamdulillah.. :) ^_^

Ilmu itu milik ALLAH, Siapapun berhak mempelajarinya.. :)

Terimakasih Telah Berkunjung.. :)