Thread: motion video tearing 10.10
having issue motion.
seems working (i mean, there no error messages or crashes) except frames of horizontal garbage.
fresh install of ubuntu server 10.10.
installed motion package using apt-get install motion.
thanks, mark.
here motion.conf file:
----------------------------------------------------------------
code:# rename distribution example file motion.conf # # config file generated motion 3.2.11 ############################################################ # daemon ############################################################ # start in daemon (background) mode , release terminal (default: off) daemon off # file store process id, called pid file. (default: not defined) process_id_file /var/run/motion/motion.pid ############################################################ # basic setup mode ############################################################ # start in setup-mode, daemon disabled. (default: off) setup_mode off ########################################################### # capture device options ############################################################ # videodevice used capturing (default /dev/video0) # freebsd default /dev/bktr0 videodevice /dev/video0 # v4l2_palette allows choose preferable palette use motion # capture supported videodevice. (default: 8) # e.g. if videodevice supports both v4l2_pix_fmt_sbggr8 , # v4l2_pix_fmt_mjpeg motion default use v4l2_pix_fmt_mjpeg. # setting v4l2_palette 1 forces motion use v4l2_pix_fmt_sbggr8 # instead. # # values : # v4l2_pix_fmt_sn9c10x : 0 's910' # v4l2_pix_fmt_sbggr8 : 1 'ba81' # v4l2_pix_fmt_mjpeg : 2 'mjpeg' # v4l2_pix_fmt_jpeg : 3 'jpeg' # v4l2_pix_fmt_rgb24 : 4 'rgb3' # v4l2_pix_fmt_uyvy : 5 'uyvy' # v4l2_pix_fmt_yuyv : 6 'yuyv' # v4l2_pix_fmt_yuv422p : 7 '422p' # v4l2_pix_fmt_yuv420 : 8 'yu12' v4l2_palette 8 # tuner device used capturing using tuner source (default /dev/tuner0) # used freebsd. leave commented out linux ; tunerdevice /dev/tuner0 # video input used (default: 8) # should set 0 or 1 video/tv cards, , 8 usb cameras input 0 # video norm use (only video capture , tv tuner cards) # values: 0 (pal), 1 (ntsc), 2 (secam), 3 (pal nc no colour). default: 0 (pal) norm 0 # frequency set tuner (khz) (only tv tuner cards) (default: 0) frequency 0 # rotate image number of degrees. rotation affects saved images # mpeg movies. valid values: 0 (default = no rotation), 90, 180 , 270. rotate 0 # image width (pixels). valid range: camera dependent, default: 352 width 320 # image height (pixels). valid range: camera dependent, default: 288 height 240 # maximum number of frames captured per second. # valid range: 2-100. default: 100 (almost no limit). framerate 2 # minimum time in seconds between capturing picture frames camera. # default: 0 = disabled - capture rate given camera framerate. # option used when want capture images @ rate lower 2 per second. minimum_frame_time 0 # url use if using network camera, size autodetected (incl http:// ftp:// or file:///) # must url returns single jpeg pictures or raw mjpeg stream. default: not defined ; netcam_url value # username , password network camera (only if required). default: not defined # syntax user:password ; netcam_userpass value # setting keep-alive of network socket, should improve performance on compatible net cameras. # 1.0: historical implementation using http/1.0, closing socket after each http request. # keep_alive: use http/1.0 requests keep alive header reuse same connection. # 1.1: use http/1.1 requests support keep alive default. # default: 1.0 ; netcam_http 1.0 # url use netcam proxy server, if required, e.g. "http://myproxy". # if port number other 80 needed, use "http://myproxy:1234". # default: not defined ; netcam_proxy value # set less strict jpeg checks network cameras poor/buggy firmware. # default: off netcam_tolerant_check off # let motion regulate brightness of video device (default: off). # auto_brightness feature uses brightness option target value. # if brightness 0 auto_brightness adjust average brightness value 128. # recommended cameras without auto brightness auto_brightness off # set initial brightness of video device. # if auto_brightness enabled, value defines average brightness level # motion try , adjust to. # valid range 0-255, default 0 = disabled brightness 0 # set contrast of video device. # valid range 0-255, default 0 = disabled contrast 0 # set saturation of video device. # valid range 0-255, default 0 = disabled saturation 0 # set hue of video device (ntsc feature). # valid range 0-255, default 0 = disabled hue 0 ############################################################ # round robin (multiple inputs on same video device name) ############################################################ # number of frames capture in each roundrobin step (default: 1) roundrobin_frames 1 # number of frames skip before each roundrobin step (default: 1) roundrobin_skip 1 # try filter out noise generated roundrobin (default: off) switchfilter off ############################################################ # motion detection settings: ############################################################ # threshold number of changed pixels in image # triggers motion detection (default: 1500) threshold 1500 # automatically tune threshold down if possible (default: off) threshold_tune off # noise threshold motion detection (default: 32) noise_level 32 # automatically tune noise threshold (default: on) noise_tune on # despeckle motion image using (e)rode or (d)ilate or (l)abel (default: not defined) # recommended value eeddl. combination (and number of) of e, e, d, , d valid. # (l)abeling must used once , 'l' must last letter. # comment out disable despeckle eeddl # detect motion in predefined areas (1 - 9). areas numbered that: 1 2 3 # script (on_area_detected) started when motion 4 5 6 # detected in 1 of given areas, once during event. 7 8 9 # 1 or more areas can specified option. (default: not defined) ; area_detect value # pgm file use sensitivity mask. # full path name to. (default: not defined) ; mask_file value # dynamically create mask file during operation (default: 0) # adjust speed of mask changes 0 (off) 10 (fast) smart_mask_speed 0 # ignore sudden massive light intensity changes given percentage of picture # area changed intensity. valid range: 0 - 100 , default: 0 = disabled lightswitch 0 # picture frames must contain motion @ least specified number of frames # in row before detected true motion. @ default of 1, # motion detected. valid range: 1 thousands, recommended 1-5 minimum_motion_frames 1 # specifies number of pre-captured (buffered) pictures before motion # detected output @ motion detection. # recommended range: 0 5 (default: 0) # not use large values! large values cause motion skip video frames , # cause unsmooth mpegs. smooth mpegs use larger values of post_capture instead. pre_capture 2 # number of frames capture after motion no longer detected (default: 0) post_capture 5 # gap seconds of no motion detection triggers end of event # event defined series of motion images taken within short timeframe. # recommended value 60 seconds (default). value 0 allowed , disables # events causing motion written 1 single mpeg file , no pre_capture. gap 60 # maximum length in seconds of mpeg movie # when value exceeded new mpeg file created. (default: 0 = infinite) max_mpeg_time 0 # save images if there no motion (default: off) output_all off ############################################################ # image file output ############################################################ # output 'normal' pictures when motion detected (default: on) # valid values: on, off, first, best, center # when set 'first', first picture of event saved. # picture motion of event saved when set 'best'. # picture motion nearest center of picture saved when set 'center'. # can used preview shot corresponding movie. output_normal on # output pictures pixels moving object (ghost images) (default: off) output_motion off # quality (in percent) used jpeg compression (default: 75) quality 75 # output ppm images instead of jpeg (default: off) ppm off ############################################################ # ffmpeg related options # film (mpeg) file output, , deinterlacing of video input # options movie_filename , timelapse_filename used # ffmpeg feature ############################################################ # use ffmpeg encode mpeg movies in realtime (default: off) ffmpeg_cap_new on # use ffmpeg make movies pixels moving # object (ghost images) (default: off) ffmpeg_cap_motion off # use ffmpeg encode timelapse movie # default value 0 = off - else save frame every nth second ffmpeg_timelapse 0 # file rollover mode of timelapse video # valid values: hourly, daily (default), weekly-sunday, weekly-monday, monthly, manual ffmpeg_timelapse_mode daily # bitrate used ffmpeg encoder (default: 400000) # option ignored if ffmpeg_variable_bitrate not 0 (disabled) ffmpeg_bps 500000 # enables , defines variable bitrate ffmpeg encoder. # ffmpeg_bps ignored if variable bitrate enabled. # valid values: 0 (default) = fixed bitrate defined ffmpeg_bps, # or range 2 - 31 2 means best quality , 31 worst. ffmpeg_variable_bitrate 0 # codec used ffmpeg video compression. # timelapse mpegs made in mpeg1 format independent option. # supported formats are: mpeg1 (ffmpeg-0.4.8 only), mpeg4 (default), , msmpeg4. # mpeg1 - gives files extension .mpg # mpeg4 or msmpeg4 - gives files extension .avi # msmpeg4 recommended use windows media player because # requires no installation of codec on windows client. # swf - gives flash film extension .swf # flv - gives flash video extension .flv # ffv1 - ff video codec 1 lossless encoding ( experimental ) # mov - quicktime ( testing ) ffmpeg_video_codec mpeg1 # use ffmpeg deinterlace video. necessary if use analog camera # , see horizontal combing on moving objects in video or pictures. # (default: off) ffmpeg_deinterlace off ############################################################ # snapshots (traditional periodic webcam file output) ############################################################ # make automated snapshot every n seconds (default: 0 = disabled) snapshot_interval 1 ############################################################ # text display # %y = year, %m = month, %d = date, # %h = hour, %m = minute, %s = second, %t = hh:mm:ss, # %v = event, %q = frame number, %t = thread (camera) number, # %d = changed pixels, %n = noise level, \n = new line, # %i , %j = width , height of motion area, # %k , %l = x , y coordinates of motion center # %c = value defined text_event - not use text_event! # can put quotation marks around text allow # leading spaces ############################################################ # locate , draw box around moving object. # valid values: on, off , preview (default: off) # set 'preview' draw box in preview_shot pictures. locate off # draws timestamp using same options c function strftime(3) # default: %y-%m-%d\n%t = date in iso format , time in 24 hour clock # text placed in lower right corner text_right %y-%m-%d\n%t-%q # draw user defined text on images using same options c function strftime(3) # default: not defined = no text # text placed in lower left corner ; text_left camera %t # draw number of changed pixed on images (default: off) # set off except when setup , adjust motion settings # text placed in upper right corner text_changes off # option defines value of special event conversion specifier %c # can use conversion specifier in option except %c. date , time # values timestamp of first image in current event. # default: %y%m%d%h%m%s # idea %c can used filenames , text_left/right creating # unique identifier each event. text_event %y%m%d%h%m%s # draw characters @ twice normal size on images. (default: off) text_double off ############################################################ # target directories , filenames images , films # options snapshot_, jpeg_, mpeg_ , timelapse_filename # can use conversion specifiers # %y = year, %m = month, %d = date, # %h = hour, %m = minute, %s = second, # %v = event, %q = frame number, %t = thread (camera) number, # %d = changed pixels, %n = noise level, # %i , %j = width , height of motion area, # %k , %l = x , y coordinates of motion center # %c = value defined text_event # quotation marks round string allowed. ############################################################ # target base directory pictures , films # recommended use absolute path. (default: current working directory) target_dir /mnt/legolas80g/motionvideos # file path snapshots (jpeg or ppm) relative target_dir # default: %v-%y%m%d%h%m%s-snapshot # default value equivalent legacy oldlayout option # motion 3.0 compatible mode choose: %y/%m/%d/%h/%m/%s-snapshot # file extension .jpg or .ppm automatically added not include this. # note: symbolic link called lastsnap.jpg created in target_dir # point latest snapshot, unless snapshot_filename 'lastsnap' snapshot_filename snapshot/%y_%m_%d/%h-%m-%s # file path motion triggered images (jpeg or ppm) relative target_dir # default: %v-%y%m%d%h%m%s-%q # default value equivalent legacy oldlayout option # motion 3.0 compatible mode choose: %y/%m/%d/%h/%m/%s-%q # file extension .jpg or .ppm automatically added not include # set 'preview' best-preview feature enables special naming # convention preview shots. see motion guide details jpeg_filename jpeg-motion/%y_%m_%d/%h-%m-%s-%q # file path motion triggered ffmpeg films (mpeg) relative target_dir # default: %v-%y%m%d%h%m%s # default value equivalent legacy oldlayout option # motion 3.0 compatible mode choose: %y/%m/%d/%h%m%s # file extension .mpg or .avi automatically added not include # option called ffmpeg_filename movie_filename mpeg-motion/%y_%m_%d/%h-%m-%s # file path timelapse mpegs relative target_dir # default: %y%m%d-timelapse # default value near equivalent legacy oldlayout option # motion 3.0 compatible mode choose: %y/%m/%d-timelapse # file extension .mpg automatically added not include timelapse_filename timelapse/%y_%m_%d/timelapse ############################################################ # live webcam server ############################################################ # mini-http server listens port requests (default: 0 = disabled) webcam_port 8081 # quality of jpeg images produced (default: 50) webcam_quality 50 # output frames @ 1 fps when no motion detected , increase # rate given webcam_maxrate when motion detected (default: off) webcam_motion off # maximum framerate webcam streams (default: 1) webcam_maxrate 1 # restrict webcam connections localhost (default: on) webcam_localhost on # limits number of images per connection (default: 0 = unlimited) # number can defined multiplying actual webcam rate desired number of seconds # actual webcam rate smallest of numbers framerate , webcam_maxrate webcam_limit 0 ############################################################ # http based control ############################################################ # tcp/ip port http server listen on (default: 0 = disabled) control_port 8080 # restrict control connections localhost (default: on) control_localhost on # output http server, select off choose raw text plain (default: on) control_html_output on # authentication http based control. syntax username:password # default: not defined (disabled) ; control_authentication username:password ############################################################ # tracking (pan/tilt) ############################################################ # type of tracker (0=none (default), 1=stepper, 2=iomojo, 3=pwc, 4=generic, 5=uvcvideo) # generic type enables definition of motion center , motion size # used conversion specifiers options on_motion_detected track_type 0 # enable auto tracking (default: off) track_auto off # serial port of motor (default: none) ; track_port value # motor number x-axis (default: 0) track_motorx 0 # motor number y-axis (default: 0) track_motory 0 # maximum value on x-axis (default: 0) track_maxx 0 # maximum value on y-axis (default: 0) track_maxy 0 # id of iomojo camera if used (default: 0) track_iomojo_id 0 # angle in degrees camera moves per step on x-axis # auto-track (default: 10) # used pwc type cameras track_step_angle_x 10 # angle in degrees camera moves per step on y-axis # auto-track (default: 10) # used pwc type cameras track_step_angle_y 10 # delay wait after tracking movement number # of picture frames (default: 10) track_move_wait 10 # speed set motor (stepper motor option) (default: 255) track_speed 255 # number of steps make (stepper motor option) (default: 40) track_stepsize 40 ############################################################ # external commands, warnings , logging: # can use conversion specifiers on_xxxx commands # %y = year, %m = month, %d = date, # %h = hour, %m = minute, %s = second, # %v = event, %q = frame number, %t = thread (camera) number, # %d = changed pixels, %n = noise level, # %i , %j = width , height of motion area, # %k , %l = x , y coordinates of motion center # %c = value defined text_event # %f = filename full path # %n = number indicating filetype # both %f , %n defined on_picture_save, # on_movie_start , on_movie_end # quotation marks round string allowed. ############################################################ # not sound beeps when detecting motion (default: on) # note: motion never beeps when running in daemon mode. quiet on # command executed when event starts. (default: none) # event starts @ first motion detected after period of no motion defined gap ; on_event_start value # command executed when event ends after period of no motion # (default: none). period of no motion defined option gap. ; on_event_end value # command executed when picture (.ppm|.jpg) saved (default: none) # give filename argument command append %f ; on_picture_save value # command executed when motion frame detected (default: none) ; on_motion_detected value # command executed when motion in predefined area detected # check option 'area_detect'. (default: none) ; on_area_detected value # command executed when movie file (.mpg|.avi) created. (default: none) # give filename argument command append %f ; on_movie_start value # command executed when movie file (.mpg|.avi) closed. (default: none) # give filename argument command append %f ; on_movie_end value # command executed when camera can't opened or if lost # note: there situations when motion doesn't detect lost camera! # depends on driver, drivers don't detect lost camera @ # hang motion thread. hang pc! (default: none) ; on_camera_lost value ############################################################ # common options mysql , postgresql database features. # options require mysql/postgresql options active also. ############################################################ # log database when creating motion triggered image file (default: on) sql_log_image on # log database when creating snapshot image file (default: on) sql_log_snapshot on # log database when creating motion triggered mpeg file (default: off) sql_log_mpeg off # log database when creating timelapse mpeg file (default: off) sql_log_timelapse off # sql query string sent database # use same conversion specifiers has text features # additional special conversion specifiers # %n = number representing file_type # %f = filename full path # default value: # insert security(camera, filename, frame, file_type, time_stamp, text_event) values('%t', '%f', '%q', '%n', '%y-%m-%d %t', '%c') sql_query insert security(camera, filename, frame, file_type, time_stamp, event_time_stamp) values('%t', '%f', '%q', '%n', '%y-%m-%d %t', '%c') ############################################################ # database options mysql ############################################################ # mysql database log (default: not defined) ; mysql_db value # host on database located (default: localhost) ; mysql_host value # user account name mysql database (default: not defined) ; mysql_user value # user password mysql database (default: not defined) ; mysql_password value ############################################################ # database options postgresql ############################################################ # postgresql database log (default: not defined) ; pgsql_db value # host on database located (default: localhost) ; pgsql_host value # user account name postgresql database (default: not defined) ; pgsql_user value # user password postgresql database (default: not defined) ; pgsql_password value # port on postgresql database located (default: 5432) ; pgsql_port 5432 ############################################################ # video loopback device (vloopback project) ############################################################ # output images video4linux loopback device # value '-' means next available (default: not defined) ; video_pipe value # output motion images video4linux loopback device # value '-' means next available (default: not defined) ; motion_video_pipe value ############################################################## # thread config files - 1 each camera. # except if 1 camera - need config file. # if have more 1 camera must define 1 thread # config file each camera in addition config file. ############################################################## # remember: if have more 1 camera must have 1 # thread file each camera. e.g. 2 cameras requires 3 files: # motion.conf file , thread1.conf , thread2.conf. # put options unique each camera in # thread config files. ; thread /usr/local/etc/thread1.conf ; thread /usr/local/etc/thread2.conf ; thread /usr/local/etc/thread3.conf ; thread /usr/local/etc/thread4.conf
issue solved. has capture device set pal.
once set ntsc works.
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [SOLVED] motion video tearing 10.10
Ubuntu
Comments
Post a Comment