From: john b. <jo...@jo...> - 2009-05-13 20:24:30
|
On Mon, 2009-05-11 at 15:39 -0500, Bruce M wrote: > Joerg, > > I am using 3.2.11 > > I lowered my framrate to 10fps and I see the idle cpu drop to 15% now. > That is acceptable to me. > > The issue I have is this: > Today, for example, motion detects the mailman delivering my mail and > pulling up to my mailbox. The avi file plays the mailtruck pulling > into the viewable area, then up to my box(center of viewing area) and > then it skips to where I see the back end of the mail truck pulling > away. This is what I am trying to fix. The last part of the avi is the > issue. It seems skippy and jumpy. Any idea on this? i think what you are seeing is similar to what i've seen in that there are big holes in the last part of a movie. motion traditionally tries to conserve disk space by stopping the video when it doesn't see motion for a while. which creates the hole in the video. the problem is that in low light or night situations in particular, this is quite common. some time ago, some changes were made so that you can eliminate this problem. set event_gap to 0 and use post_capture to keep teh video going. for example, i set gap to 0, and then have post_capture at 350, which, at 5 fps gives me 60 seconds after the last motion was detected. this has eliminated the holes in the video that were driving me crazy. you might even want a bigger post_capture setting. you'll need to play with values till it stops leaving holes. that said, if your cpu gets so busy during a capture that it can't keep up, this sure won't help. :-) - john > > Is there anyway for detection to be at 3 fps and recording to be at a > higher rate so I can get a smoother picture? I guess something like a > variable bit rate in encoding kind of thing? > > Thanks! > Bruce > > > On Mon, May 11, 2009 at 2:42 PM, Joerg WEBER > <mo...@al...> wrote: > Bruce, > > first of all: what exact version of motion are you using? > > Some thoughts about your setup: If the goal is catching the > dog, do you really need 30 fps? Look, motion has to work out > 640x480 pixels 30 times a second! If you are using one of the > latest SVN snapshots, motion drops it's internal framerate to > 3 fps. That way you can record at 30 - which is still quite > some work for ffmpeg to code the avi - while you don't wast > too much CPU doing the detection. Furthermore, the detection > algo works best at 3 - 5 fps. If you go above that rate, slow > motion may stay undetected. > > Another hint regarding pre_ and post_capture: The number is > frames. 40 frames at 30 fps is only about a second. When the > dog stops moving a lot, the video becomes really jumpy. > Remember - an event only ends at 'gap' seconds after the last > motion has occurred. > > Besides the framerate, despeckle is a real showstopper. Try > keeping it at the recommended value of eEdDl and you'll really > save some CPU. You may have to adapt 'threshold', but > setup_mode can help you to find out the right value for that > option. > > Brgds Joerg. > > Am Montag, 11. Mai 2009 17:06 schrieb Bruce M: > > > > Hey Steve, > > > > > > Thanks for the reply. > > > It is actually a 2.2Ghz AMD64 3500. Not too old. What do > people with 4 > > > cameras on one core do? > > > > > > I compile motion manually. > > > I am using a 640x480 resolution and 30fps. > > > > > > Here are my settings: > > > > > > daemon off > > > process_id_file /var/run/motion/motion.pid > > > setup_mode off > > > videodevice /dev/video1 > > > v4l2_palette 8 > > > input 1 > > > norm 1 > > > frequency 0 > > > rotate 0 > > > width 640 > > > height 480 > > > framerate 30 > > > minimum_frame_time 0 > > > netcam_tolerant_check off > > > auto_brightness off > > > brightness 0 > > > contrast 0 > > > saturation 0 > > > hue 0 > > > roundrobin_frames 1 > > > roundrobin_skip 1 > > > switchfilter off > > > threshold 300 > > > threshold_tune off > > > noise_level 32 > > > despeckle EedDdDdDdDl > > > mask_file /mask5.pgm > > > smart_mask_speed 0 > > > minimum_motion_frames 1 > > > pre_capture 5 > > > post_capture 40 > > > gap 120 > > > max_mpeg_time 0 > > > output_all off > > > output_normal on > > > output_motion off > > > quality 100 > > > ppm off > > > ffmpeg_cap_new on > > > ffmpeg_cap_motion off > > > ffmpeg_timelapse 0 > > > ffmpeg_timelapse_mode daily > > > ffmpeg_bps 500000 > > > ffmpeg_variable_bitrate 2 > > > ffmpeg_video_codec mpeg4 > > > ffmpeg_deinterlace off > > > snapshot_interval 0 > > > locate on > > > text_right %Y-%m-%d\n%T-%q > > > text_changes on > > > text_event %Y%m%d%H%M%S > > > text_double off > > > target_dir /new/motion > > > snapshot_filename %v-%Y%m%d%H%M%S-snapshot > > > jpeg_filename %Y/jpeg/FrontCam-%H_%M_%S-%v-%q > > > movie_filename %Y/%m/%d/video_%H_%M_%S-%v > > > timelapse_filename %Y%m%d-timelapse > > > webcam_port 8081 > > > webcam_quality 75 > > > webcam_motion on > > > webcam_maxrate 5 > > > webcam_localhost off > > > webcam_limit 0 > > > control_port 8080 > > > control_localhost off > > > control_html_output on > > > track_type 0 > > > track_auto off > > > track_motorx 0 > > > track_motory 0 > > > track_maxx 0 > > > track_maxy 0 > > > 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 > > > sql_log_image on > > > sql_log_snapshot on > > > sql_log_mpeg off > > > sql_log_timelapse off > > > sql_query insert into security(camera, filename, frame, > file_type, > > > time_stamp, event_time_stamp) values('%t', '%f', '%q', '%n', > '%Y-%m-%d %T', > > > '%C') > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > The NEW KODAK i700 Series Scanners deliver under ANY > circumstances! Your > production scanning environment may not be a perfect world - > but thanks to > Kodak, there's a perfect scanner to get the job done! With the > NEW KODAK i700 > Series Scanner you'll get full speed at 300 dpi even with all > image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > Motion-user mailing list > Mot...@li... > https://lists.sourceforge.net/lists/listinfo/motion-user > http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome > > > ------------------------------------------------------------------------------ > The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 > Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ Motion-user mailing list Mot...@li... https://lists.sourceforge.net/lists/listinfo/motion-user http://www.lavrsen.dk/twiki/bin/view/Motion/WebHome -- cleverly disguised as a responsible adult. |