MOTION(1) Motion (NAME) motion - (SYNOPSIS) motion [ -hbnsm ] [ -c __ ] [ -d ] [ -k ] [ -p _pid ] [ -l _ ] (DESCRIPTION) Motion video4linux . () . Motion . ( ) . (OPTIONS) -c . : /home/kurt/motion.conf /usr/local/etc/motion Motion . RPM Debian /etc /etc/motion . -h . -b ( ). -n (). -s (Setup mode). . -d (log level) . -k (log type) . -l (). -p ( pid) /var/run/motion.pid. . pid Motion . -m / (pause mode). (CONFIG FILE OPTIONS) . ! ( ). () ( "1" "yes" "on" / / ). daemon : on/off : off : on Motion ( ) . setup_mode : on/off : off : (Setup-Mode) . pid_file : : : (PID) pid . log_file : : : stderr syslog . log_level : 1 9 (EMG, ALR, CRT, ERR, WRN, NTC, INF, DBG, ALL) : 6 / NTC : . log_type : COR, STR, ENC, NET, DBL, EVT, TRK, VID, ALL : ALL : . quiet : on/off : on : . native_language : (on/off) : on : . off . camera_name : : : . camera_id : : Motion : Motion . Motion . camera : : : . . . motion.conf . motion.conf . : motion.conf . : motion.conf camera1.conf camera2.conf. . camera_dir : : : . target_dir : : : . . . . video_device : : /dev/video0 : . /dev/videoX X . FreeBSD bktr /dev/bktr0 . video_params : : None : video_device. . V4L2 . Motion . auto_brightness : 0 - 3 : 0 : auto_brightness . . 0= 1= (brightness) 2= (exposure) 3= (absolute exposure). tuner_device : : /dev/tuner0 : . FreeBSD . roundrobin_frames : 1 : 1 : (roundrobin). roundrobin_skip : 1 : 1 : . roundrobin_switchfilter : on/off : off : (roundrobin). netcam_url : : None : (URL) . Motion : ftp:// mjpg:// mjpeg:// file:// v4l2:// . . netcam_params : : : . netcam_high_url : : None : . . : rtsp:// rtmp:// . . Motion (basic authentication) . Digest . URL netcam_userpass . netcam_high_params : : : . netcam_userpass : : : . (Basic) . user:password . width : : 640 : . height : : 480 : . framerate : 2 - 100 : 15 : . . . minimum_frame_time : 0 : 0 : . 0 . . rotate : 0, 90, 180, 270 : 0 : . . flip_axis : none, v, h : none : (v) (h). . locate_motion_mode : on/off/preview : off : 'on' . 'preview' (preview_shot) . locate_motion_style : box : redbox : cross : (+) redcross : (+) : box : locate_motion_mode . text_left : : : . strftime(3) C . text_right : : %Y-%m-%d\n%T : . strftime(3) C . text_changes : on/off : off : . (off) . . text_scale : 1 10 : 1 : . text_event : : %Y%m%d%H%M%S : %C. %C . . %C text_left/right . emulate_motion : on/off : off : . pause : on/off : off : Motion (pause) . threshold : 1 : 1500 : . threshold_maximum : 0 1 : 0 : . . threshold_tune : on/off : off : . noise_level : 1 : 32 : . noise_tune : on/off : on : . despeckle_filter : e/E : (erode) d/D : (dilate) l : (label) : : (e/E) (d/D) (l). EedDl . ( ) E e d D . (l) 'l' . . area_detect : 1 9 : : on_area_detected . . . . : 123 456 789 mask_file : : : PGM . PGM . . mask_privacy : : : PGM ( ) . . smart_mask_speed : 0 10 : 0 () : . lightswitch_percent : 0 100 : 0 : . . lightswitch_frames : 1 1000 : 5 : . minimum_motion_frames : 1 : 1 : . 1 . . event_gap : -1 : 60 : . . . -1 (pre_capture) . 0 Motion (gapless) . . post_capture . pre_capture : 0 : 0 : () . . Motion ( ). post_capture . post_capture : 0 : 0 : . (Script Options) on_event_start, on_event_end, on_picture_save on_motion_detected, on_area_detected, on_movie_start on_movie_end, on_camera_lost, on_camera_found : : : . %f . picture_output : on, off, first, best, center : off : . 'first' . 'best' . 'center' . . picture_output_motion : on/off : off : ( /ghost). picture_type : jpeg/ppm/webp/grey : jpeg : . picture_quality : 1 100 : 75 : ( ) jpeg webp. picture_exif : : : EXIF JPEG. picture_filename : : %v-%Y%m%d%H%M%S-%q : (jpeg ppm webp) target_dir. (.jpg .ppm .webp) . 'preview' best-preview . . snapshot_interval : 0 : 0 : 0 . . snapshot_filename : : %v-%Y%m%d%H%M%S-snapshot : target_dir. (.jpg .ppm .webp) . (symlink) lastsnap.jpg target_dir snapshot_filename 'lastsnap' . . movie_output : on/off : on : ffmpeg . movie_output_motion : on/off : off : ffmpeg ( ). movie_max_time : 0 : 120 : . . 0 . movie_bps : 0 : 400000 : (Bitrate) ffmpeg. movie_quality 0 . movie_quality : 0 100 : 60 : ffmpeg. movie_bps . 0 movie_bps . . . movie_codec : Motion: mpeg4 - avi. msmpeg4 - avi. swf - swf. flv - flv. ffv1 - FF (Lossless) mov - QuickTime mp4 - MPEG-4 Part 14 H264 mkv - Matroska H264 hevc - H.265 / HEVC ( ) : mkv : / ffmpeg . movie_duplicate_frames : on/off : off : . movie_passthrough : on/off : off : rtsp ( ) . movie_filename : : %v-%Y%m%d%H%M%S : ffmpeg target_dir. (.swf, .avi, ...) . . movie_extpipe_use : on/off : off : (external pipe) . FFMPEG movie_output . movie_filename timelapse_filename ffmpeg . movie_extpipe : : : . '-' STDIN . timelapse_interval : 0 : 0 : (). 0 . timelapse_mode : hourly () daily () weekly-sunday ( - ) weekly-monday ( - ) monthly () manual () : daily : (rollover) . timelapse_fps : 0 : 30 : . timelapse_codec : mpg - mpg mpeg-2. mpeg4 - avi . : mpg : mpg Motion . mpeg4 Motion . timelapse_filename : : %Y%m%d-timelapse : target_dir. (.mpg .avi) . . video_pipe : : : video4linux. video_pipe_motion : : : video4linux. webcontrol_port : 0 : 0 : . webcontrol_ipv6 : on/off : off : IPv6 localhost IPv4. . webcontrol_localhost : on/off : on : localhost. webcontrol_parms : 0 = 1 = 2 = ( ) 3 = ( ) : 0 : . . webcontrol_interface : 0-2 : 0 : : 0=css 1=text 2=legacy. webcontrol_auth_method : 0 = 1 = (Basic) 2 = MD5 digest ( ) : 0 : . webcontrol_authentication : : : . Username:Password . webcontrol_tls : on/off : off : on SSL/TLS . webcontrol_cert : : : SSL . webcontrol_key : : : SSL . webcontrol_header_params : : : = (header=value) . webcontrol_lock_attempts : : 5 : IP. webcontrol_lock_minutes : : 5 : ( ) IP . webcontrol_lock_max_ips : : 5 : IP . stream_port : 0 : 0 : mini- http . stream_localhost : on/off : on : localhost. stream_auth_method : 0 = 1 = (Basic) 2 = MD5 digest ( ) : 0 : . stream_authentication : : : . Username:Password . stream_tls : on/off : off : on SSL/TLS . stream_header_params : : : = . stream_preview_scale : 1 100 : 25 : . stream_preview_newline : on/off : off : . . stream_preview_method : 0 2 : 0 : : 0= (Full) 1= (Substream) 2= (Static). stream_quality : 1 100 : 50 : jpg . stream_grey : on/off : off : () . stream_maxrate : 1 : 1 : . stream_motion : on, off : off : . database_type : mysql, mariadb, postgresql, sqlite3 : : . database_dbname : : : (dbname). SQLite3 . database_host : : localhost : (DNS) IP . PostgreSQL . SQLite3 . database_port : 0 : : TCP . SQLite3 . : MySQL MariaDB PostgreSQL . database_user : : : . SQLite3 . database_password : : : . SQLite3 . database_busy_timeout : 0 : 0 : SQLite3: . sql_log_picture : on/off : off : . sql_log_snapshot : on/off : off : . sql_log_movie : on/off : off : . sql_log_timelapse : on/off : off : . sql_query : : : SQL Motion sql_log_* on . . : %n = file_type %f = ( sql_query): Mysql: CREATE TABLE security (camera INTEGER NOT NULL, filename CHAR(80) NOT NULL, frame INTEGER, file_type INTEGER NOT NULL, time_stamp DATETIME NOT NULL, text_event CHAR(255)); Postgresql: CREATE TABLE security (camera INTEGER NOT NULL, filename VARCHAR NOT NULL, frame INTEGER, file_type INTEGER NOT NULL, time_stamp TIMESTAMP NOT NULL, text_event VARCHAR); sql_query: INSERT INTO security(camera, filename, frame, file_type, time_stamp, text_event) VALUES(%t, '%f', %q, %n, '%Y-%m-%d %T', '%C') sql_query_start : : : SQL . ( PostgreSQL RETURNING ) %{dbeventid} . %{dbeventid} . sql_query_stop : : : SQL sql_log_* on . track_type : 0 = none 1 = stepper 2 = iomojo 3 = pwc 4 = generic 5 = uvcvideo 6 = servo : 0 : . generic on_motion_detected . track_auto : on/off : off : / . track_port : : : /dev/ttyS0. (Tracking options) track_motorx, track_motorx_reverse, track_motory, track_motory_reverse track_maxx, track_minx, track_maxy, track_miny, track_homex, track_homey track_iomojo_id, track_step_angle_x, track_step_angle_y, track_move_wait track_speed, track_stepsize : : 0 : . track_generic_move : : : (generic) . (SIGNALS) Motion : SIGHUP . SIGTERM Motion . SIGUSR1 Motion . (NOTES) (Snapshot) . (Motion image) <<>> . Motion . . . . (Normal image) <<>> . (Cameras and config files) Motion -c . -c . -c Motion 'motion.conf' : . Motion . . '.motion' ( $HOME) /home/goofy/.motion/motion.conf. . motion/ --sysconfdir=DIR configure. Motion ( /usr/local/etc/ ). /usr/local/etc/motion motion.conf /usr/local/etc/motion . Motion motion-dist.conf . 'make install' /usr/local/etc/motion . motion-dist.conf motion.conf . motion-dist.conf motion.conf . Motion . Motion . Motion (thread) . motion.conf . motion.conf . motion.conf ( ). motion.conf ( ). . motion.conf motion.conf . motion.conf . Motion . : . motion.conf . . "camera" motion.conf () . . Motion motion.conf . . . . motion.conf . motion.conf . Motion ffmpeg mysql . http://host:port/0/config/writeyes Motion motion.conf camera.conf Motion . Motion write . . text_left text_right snapshot_filename jpeg_filename ffmpeg_filename timelapse_filename on_event_start on_event_end on_picture_save on_movie_start on_movie_end on_motion_detected . text_left text_right '\n' . %a (locale) . %A locale . %b locale . %B locale . %c locale . %C text_event. %d ( 01 31). %D . . %E : . %f - on_picture_save on_movie_start on_movie_end sql_query. %F %Y-%m-%d ( ISO 8601). %h . %H ( 00 23). %i ( locate ). %I ( 01 12). %j ( 001 366). %J ( locate ). %k ( ) ( 0 23) ( %H ). %K X . . %l ( ) ( 1 12) ( %I ). %L Y . . %m ( 01 12). %M ( 00 59). %n on_picture_save on_movie_start on_movie_end sql_query. %N . %o . . threshold_tune 'on' . %p 'AM' 'PM' locale . 'pm' 'am' . %P %p : 'am' 'pm' locale . %q . jpeg . mpeg . %Q despeckle. %r a.m. p.m. %R (%H:%M). %s (Epoch) 1970-01-01 00:00:00 UTC. %S ( 00 61). %t . %T (%H:%M:%S). %u ( %w ). %U 00 53 01 ( %V %W ). %v . 'gap' . %V ISO 8601:1988 01 53 1 ( %U %W ). %w 0 6 0 ( %u ). %W 00 53 01. %x locale . %X locale . %y ( 00 99). %Y . %z GMT. %Z . %$ . %{host} . %{fps} . %{dbeventid} mysql_insert_id. %{ver} Motion. (More information) Motion: Motion ( ): /usr/share/doc/motion/motion_guide.html (AUTHORS) Jeroen Vreeken (pe1rxq@amsat.org), Folkert van Heusden, Kenneth Lavrsen (kenneth@lavrsen.dk), Juan Angulo Moreno , motion-project . Motion 2020-10-19 MOTION(1)