|
@ motion.conf の編集
28 # for FreeBSD default is /dev/bktr0
29 #videodevice /dev/video0 <--- コメントアウト
58 # The video norm to use (only for video capture and TV tuner cards)
59 # Values: 0 (PAL), 1 (NTSC), 2 (SECAM), 3 (PAL NC no colour).……
60 norm 0
↓
norm 1
69 # Image width (pixels). Valid range: Camera dependent, default: 352
70 width 320
↓
width 640
71
72 # Image height (pixels). Valid range: Camera dependent, defaul……
73 height 240
↓
height 480
74
75 # Maximum number of frames to be captured per second.
76 # Valid range: 2-100. Default: 100 (almost no limit).
77 framerate 2
↓
framerate 15
151 # Threshold for number of changed pixels in an image that
152 # triggers motion detection (default: 1500)
153 threshold 1500
226 # Can be used as preview shot for the corresponding movie.
227 output_normal on
↓
output_normal off
246 # Use ffmpeg to encode mpeg movies in realtime (default: off)
247 ffmpeg_cap_new on
↓
ffmpeg_cap_new off
290 #######################################
291 # Snapshots (Traditional Periodic Webcam File Output)
292 #######################################
293
294 # Make automated snapshot every N seconds (default: 0 = disabled)
295 snapshot_interval 0
↓
snapshot_interval 1 <--- 1秒毎に画像が書込まれる。
316 # Draws the timestamp using same options as C function strftime(3)
317 # Default: %Y-%m-%d\n%T = date in ISO format and time in 24 h……
318 # Text is placed in lower right corner
319 text_right %Y-%m-%d\n%T-%q
↓
text_right %Y-%m-%d\n%T <--- 年月日時分秒 %q は、不要なので削除。
339 # Draw characters at twice normal size on images. (default: off)
340 text_double off
↓
text_double on <--- 書込みを文字大きくする。
357 # Target base directory for pictures and films
358 # Recommended to use absolute path. (Default: current working……
359 target_dir /usr/local/apache2/htdocs/cam1
↓ ここは、コメントアウトし、個別ファイル(thread)で設定する。
#target_dir /usr/local/apache2/htdocs/cam1
367 # point to the latest snapshot, unless snapshot_filename is e……'
368 snapshot_filename %v-%Y%m%d%H%M%S-snapshot
↓ 画像ファイルは、snapshot の名前で上書きさせる。
snapshot_filename snapshot
399 # The mini-http server listens to this port for requests (def……
400 webcam_port 8081
↓ ここは、コメントアウトし、個別ファイル(thread)で設定する。
#webcam_port 8081
402 # Quality of the jpeg (in percent) images produced (default: 50)
403 webcam_quality 50
↓
webcam_quality 100
409 # Maximum framerate for webcam streams (default: 1)
webcam_maxrate 1
↓
webcam_maxrate 15
412 # Restrict webcam connections to localhost only (default: on)
webcam_localhost on
↓
webcam_localhost off
428 # Restrict control connections to localhost only (default: on)
429 control_localhost on
↓
control_localhost off
431 # Output for http server, select off to choose raw text plain……
432 control_html_output on
↓
control_html_output off
632 # thread config files.
633 ; thread /usr/local/etc/thread1.conf
634 ; thread /usr/local/etc/thread2.conf
635 ; thread /usr/local/etc/thread3.conf
636 ; thread /usr/local/etc/thread4.conf
637 thread /usr/local/etc/thread1.conf <--- 個別設定ファイルの定義を追加する
2台目は、thread2.conf で設定する。
thread1.conf を保存する場所は、任意ですが、motion.conf と同じパスにしました。
#---------------------------------------------------------------------
A 個別設定ファイル thread1.conf の編集
hread1.conf のファイルは、/usr/local/src/motion-3.2.12 に展開された設定ファイルの中に
あります。 /usr/local/etc/ にコピーして編集します。
cp /usr/local/src/motion-3.2.12/thread1.conf /usr/local/etc/
vi /usr/local/etc/thread1.conf
11 # Videodevice to be used for capturing (default /dev/video0)
12 # for FreeBSD default is /dev/bktr0
13 videodevice /dev/video0
↓
videodevice /dev/video1 <--- video0 は、fswebcam で使用しているので
video1 にします。
21 # Text is placed in lower left corner
22 text_left CAMERA 1 <--- "CAMERA 1"が左下に書込みされ表示する。
日本語にすると動作しなくなります。。
39 # Target base directory for pictures and films
40 # Recommended to use absolute patch. (Default: current working directory)
41 target_dir /usr/local/apache2/htdocs/cam1
↓ 静止画映像を書込むパスをしていします。
あなたの環境に合わせてください。
target_dir /var/www/html/www.smiyasaka.com/
48 # The mini-http server listens to this port for requests (defa……)
49 webcam_port 8081
↓
webcam_port 8082 <--- カメラのポート番号は、8082 にしています。
2台目のときは、8083 にしてください。
8081 は、LAN カメラで使用済みの為、8082 にしています。
51 # Command to be executed when a picture (.ppm|.jpg) is saved ……
52 # The filename of the picture is appended as an argument for t……
53 on_picture_save /usr/local/motion-extras/camparse1.pl
↓ ここは、不要なのでコメントアウトします。
#on_picture_save /usr/local/motion-extras/camparse1.pl
55 # Command to be executed when a movie file (.mpg|.avi) is clos ……)
56 # Filename of movie is appended as an argument for the command.
57 on_movie_end /usr/local/motion-extras/mpegparse1.pl
↓ ここは、不要なのでコメントアウトします。
#on_movie_end /usr/local/motion-extras/mpegparse1.pl
#---------------------------------------------------------------------
2代目の個別の設定は、thread2.conf して motion.conf に
thread /usr/local/etc/thread2.conf を追加します。
|