Motion-Project / motion

Motion, a software motion detector. Home page: https://motion-project.github.io/
GNU General Public License v2.0
3.67k stars 549 forks source link

Dont save database motion 4.2 #858

Closed oriolrg closed 5 years ago

oriolrg commented 5 years ago

I'm working with motion, I've encountered the problem that works correctly, but it does not store the data in the mysql database. A priori the motion.log gets everything right, and even when you put the user in the wrong database, the same message comes up:

" [1:ml1] [WRN] [ALL] [nov 27 19:56:01] motion_init: Motion continues using width and height from config file(s) [1:ml1] [NTC] [ALL] [nov 27 19:56:01] image_ring_resize: Resizing pre_capture buffer to 1 items [1:ml1] [NTC] [DBL] [nov 27 19:56:01] dbse_init: Database backend mysql " So it seems eur works correctly, but it is not. I have run ./config again to verify that mysql qqque work correctly and it appears:

" fmpeg -lavdevice-ffmpeg SQLite3 support: No MYSQL support: Yes PostgreSQL support: No "

I have been reading different threads from this list, and I see that it has been talked about but I have not been able to find a solution

Mr-Dave commented 5 years ago

Please post the full log to a gist at the INF level.

The log snippet from above indicates

1:ml1] [WRN] [ALL] [nov 27 19:56:01] motion_init: Motion continues using width and height from config file(s)

which usually indicates that Motion can not open the camera. In this situation, there would be nothing to save to the database....since there is no camera..

oriolrg commented 5 years ago

Here you can see the log. The system correctly stores the videos on the disk, but does not insert the information into the database or give a connection error.

Database connection data (user and password) are correct, in fact if I try to put incorrect data, and in this case it does return the log error.

Thank you for the help

[0:motion] [NTC] [ALL] [nov 29 12:39:01] motion_start_thread: Stream port 0 [0:motion] [NTC] [ALL] [nov 29 12:39:01] main: Waiting for threads to finish, pid: 12213 [1:ml1:Gimnas] [NTC] [ALL] [nov 29 12:39:01] motion_init: Camera 161 started: motion detection Enabled [1:ml1:Gimnas] [NTC] [VID] [nov 29 12:39:01] vid_start: Opening Netcam [1:ml1:Gimnas] [NTC] [NET] [nov 29 12:39:01] netcam_start: Network Camera starting for camera (Gimnas) [1:ml1:Gimnas] [NTC] [NET] [nov 29 12:39:04] netcam_read_first_header: Found Conn: close header ('Connection: close') [1:ml1:Gimnas] [NTC] [NET] [nov 29 12:39:04] netcam_setup_html: connected, going on to read image. [1:ml1:Gimnas] [NTC] [ALL] [nov 29 12:39:06] image_ring_resize: Resizing pre_capture buffer to 1 items [1:ml1:Gimnas] [WRN] [NET] [nov 29 12:39:06] netcam_next: called with no data in buffer [1:nc2:Gimnas] [NTC] [NET] [nov 29 12:39:06] netcam_handler_loop: Camera handler thread [2] started [1:ml1:Gimnas] [NTC] [DBL] [nov 29 12:39:08] dbse_init: Database backend mysql [1:ml1:Gimnas] [NTC] [ALL] [nov 29 12:39:08] image_ring_resize: Resizing pre_capture buffer to 4 items [1:ml1:Gimnas] [WRN] [NET] [nov 29 12:39:08] netcam_init_jpeg: no new pic, no signal rcvd [1:ml1:Gimnas] [WRN] [NET] [nov 29 12:39:09] netcam_init_jpeg: no new pic, no signal rcvd [1:ml1:Gimnas] [WRN] [NET] [nov 29 12:39:10] netcam_init_jpeg: no new pic, no signal rcvd [1:ml1:Gimnas] [WRN] [NET] [nov 29 12:39:11] netcam_init_jpeg: no new pic, no signal rcvd [1:ml1:Gimnas] [WRN] [NET] Above message repeats 1 times [1:ml1:Gimnas] [WRN] [NET] [nov 29 12:39:25] netcam_init_jpeg: no new pic, no signal rcvd [1:ml1:Gimnas] [WRN] [NET] Above message repeats 1 times [1:ml1:Gimnas] [WRN] [NET] [nov 29 12:39:27] netcam_init_jpeg: no new pic, no signal rcvd [1:ml1:Gimnas] [WRN] [NET] [nov 29 12:39:31] netcam_init_jpeg: no new pic, no signal rcvd [1:ml1:Gimnas] [WRN] [NET] [nov 29 12:39:42] netcam_init_jpeg: no new pic, no signal rcvd [1:ml1:Gimnas] [WRN] [NET] Above message repeats 1 times [1:ml1:Gimnas] [WRN] [NET] [nov 29 12:39:49] netcam_init_jpeg: no new pic, no signal rcvd [1:ml1:Gimnas] [WRN] [NET] [nov 29 12:39:50] netcam_init_jpeg: no new pic, no signal rcvd [1:ml1:Gimnas] [WRN] [NET] [nov 29 12:39:51] netcam_init_jpeg: no new pic, no signal rcvd [1:ml1:Gimnas] [WRN] [NET] [nov 29 12:39:53] netcam_init_jpeg: no new pic, no signal rcvd [1:ml1:Gimnas] [WRN] [NET] [nov 29 12:40:05] netcam_init_jpeg: no new pic, no signal rcvd [1:ml1:Gimnas] [NTC] [EVT] [nov 29 12:40:07] event_newfile: File of type 8 saved to: /home/tecnolord/VideoControl/videoVigilancia/Gravacions/Gimnas/Ginmas_161-01-20181129124006.mp4 [1:ml1:Gimnas] [NTC] [ALL] [nov 29 12:40:07] motion_detected: Motion detected - starting event 1 [1:ml1:Gimnas] [WRN] [NET] [nov 29 12:40:24] netcam_init_jpeg: no new pic, no signal rcvd [1:ml1:Gimnas] [WRN] [NET] [nov 29 12:40:26] netcam_init_jpeg: no new pic, no signal rcvd [1:ml1:Gimnas] [WRN] [NET] [nov 29 12:40:27] netcam_init_jpeg: no new pic, no signal rcvd [1:ml1:Gimnas] [WRN] [NET] [nov 29 12:40:51] netcam_init_jpeg: no new pic, no signal rcvd

oriolrg commented 5 years ago

This is the part of the motion.config corresponding to the test database

# Log into the database when creating motion triggered image file (default: on)
sql_log_picture on

# Log into the database when creating a snapshot image file (default: on)
sql_log_snapshot on

# Log into the database when creating motion triggered movie file (default: off)
sql_log_movie on

# Log into the database when creating timelapse movie file (default: off)
sql_log_timelapse on

sql_query insert into security (camera, filename, frame, file_type, time_stamp, text_event) values ('% t', '% f', '% q', '% n', '% Y-% m-% d% T ','% C ')
tosiara commented 5 years ago

Can you please upload full log started with -d 7 where you have at least one complete event logged?

oriolrg commented 5 years ago

I do not know if you mean this. Thank you

[0:motion] [NTC] [ALL] [Nov 29 13:32:54] motion_startup: Motion 4.2+git20181127-d8377cb Started
[0:motion] [NTC] [ALL] [Nov 29 13:32:54] motion_startup: Using default log type (ALL)
[0:motion] [NTC] [ALL] [Nov 29 13:32:54] motion_startup: Using log type (ALL) log level (NTC)
[0:motion] [NTC] [STR] [Nov 29 13:32:54] webu_start_strm: Starting all camera streams on port 8081
[0:motion] [NTC] [STR] [Nov 29 13:32:54] webu_start_ctrl: Starting webcontrol on port 8080
[0:motion] [NTC] [ENC] [Nov 29 13:32:54] ffmpeg_global_init: ffmpeg libavcodec version 56.60.100 libavformat version 56.40.101
[0:motion] [NTC] [ALL] [nov 29 13:32:54] translate_init: Language: English
[0:motion] [NTC] [ALL] [nov 29 13:32:54] motion_start_thread: Camera ID: 161 is from /home/tecnolord/VideoControl/videoVigilancia/config/configCams/gimnas.conf
[0:motion] [NTC] [ALL] [nov 29 13:32:54] motion_start_thread: Camera ID: 161 Camera Name: Gimnas Service: http:
[0:motion] [NTC] [ALL] [nov 29 13:32:54] motion_start_thread: Stream port 0
[0:motion] [NTC] [ALL] [nov 29 13:32:54] main: Waiting for threads to finish, pid: 3512
[1:ml1:Gimnas] [NTC] [ALL] [nov 29 13:32:54] motion_init: Camera 161 started: motion detection Enabled
[1:ml1:Gimnas] [NTC] [VID] [nov 29 13:32:54] vid_start: Opening Netcam
[1:ml1:Gimnas] [NTC] [NET] [nov 29 13:32:54] netcam_start: Network Camera starting for camera (Gimnas)
[1:ml1:Gimnas] [NTC] [NET] [nov 29 13:32:54] netcam_read_first_header: Found Conn: close header ('Connection: close')
[1:ml1:Gimnas] [NTC] [NET] [nov 29 13:32:54] netcam_setup_html: connected, going on to read image.
[1:ml1:Gimnas] [NTC] [ALL] [nov 29 13:32:54] image_ring_resize: Resizing pre_capture buffer to 1 items
[1:nc2:Gimnas] [NTC] [NET] [nov 29 13:32:54] netcam_handler_loop: Camera handler thread [2] started
[1:ml1:Gimnas] [WRN] [NET] [nov 29 13:32:54] netcam_next: called with no data in buffer
[1:ml1:Gimnas] [NTC] [DBL] [nov 29 13:32:56] dbse_init: Database backend mysql
[1:ml1:Gimnas] [NTC] [ALL] [nov 29 13:32:56] image_ring_resize: Resizing pre_capture buffer to 4 items
[1:ml1:Gimnas] [NTC] [EVT] [nov 29 13:33:05] event_newfile: File of type 8 saved to: /home/tecnolord/VideoControl/videoVigilancia/Gravacions/Gimnas/Ginmas_161-01-20181129133305.mp4
tosiara commented 5 years ago

No, I mean to start motion with -d 7 parameter which should generate much bigger log than you provided

oriolrg commented 5 years ago
[0:motion] [NTC] [ALL] [Nov 29 13:48:20] motion_startup: Motion 4.2+git20181127-d8377cb Started
[0:motion] [NTC] [ALL] [Nov 29 13:48:20] motion_startup: Using default log type (ALL)
[0:motion] [NTC] [ALL] [Nov 29 13:48:20] motion_startup: Using log type (ALL) log level (INF)
[0:motion] [INF] [ALL] [Nov 29 13:48:20] conf_output_parms: Writing configuration parameters from all files (2):
[0:motion] [INF] [ALL] [Nov 29 13:48:20] Thread 0 - Config file: /home/tecnolord/VideoControl/videoVigilancia/config/motion/motion.conf
[0:motion] [INF] [ALL] [Nov 29 13:48:20] daemon                    off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] setup_mode                off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] pid_file                  
[0:motion] [INF] [ALL] [Nov 29 13:48:20] log_file                  /home/tecnolord/VideoControl/videoVigilancia/log/motion/motion.log
[0:motion] [INF] [ALL] [Nov 29 13:48:20] log_level                 7
[0:motion] [INF] [ALL] [Nov 29 13:48:20] log_type                  ALL
[0:motion] [INF] [ALL] [Nov 29 13:48:20] quiet                     on
[0:motion] [INF] [ALL] [Nov 29 13:48:20] native_language           on
[0:motion] [INF] [ALL] [Nov 29 13:48:20] camera_name               
[0:motion] [INF] [ALL] [Nov 29 13:48:20] camera_id                 0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] target_dir                
[0:motion] [INF] [ALL] [Nov 29 13:48:20] videodevice               /dev/video0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] vid_control_params        
[0:motion] [INF] [ALL] [Nov 29 13:48:20] v4l2_palette              17
[0:motion] [INF] [ALL] [Nov 29 13:48:20] input                     -1
[0:motion] [INF] [ALL] [Nov 29 13:48:20] norm                      0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] frequency                 0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] auto_brightness           0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] tunerdevice               
[0:motion] [INF] [ALL] [Nov 29 13:48:20] roundrobin_frames         1
[0:motion] [INF] [ALL] [Nov 29 13:48:20] roundrobin_skip           1
[0:motion] [INF] [ALL] [Nov 29 13:48:20] roundrobin_switchfilter   off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] netcam_url                
[0:motion] [INF] [ALL] [Nov 29 13:48:20] netcam_highres            
[0:motion] [INF] [ALL] [Nov 29 13:48:20] netcam_userpass           
[0:motion] [INF] [ALL] [Nov 29 13:48:20] netcam_keepalive          off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] netcam_proxy              
[0:motion] [INF] [ALL] [Nov 29 13:48:20] netcam_tolerant_check     off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] netcam_use_tcp            on
[0:motion] [INF] [ALL] [Nov 29 13:48:20] mmalcam_name              
[0:motion] [INF] [ALL] [Nov 29 13:48:20] mmalcam_control_params    
[0:motion] [INF] [ALL] [Nov 29 13:48:20] width                     640
[0:motion] [INF] [ALL] [Nov 29 13:48:20] height                    480
[0:motion] [INF] [ALL] [Nov 29 13:48:20] framerate                 15
[0:motion] [INF] [ALL] [Nov 29 13:48:20] minimum_frame_time        0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] rotate                    0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] flip_axis                 none
[0:motion] [INF] [ALL] [Nov 29 13:48:20] locate_motion_mode        off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] locate_motion_style       box
[0:motion] [INF] [ALL] [Nov 29 13:48:20] text_left                 CAMERA1
[0:motion] [INF] [ALL] [Nov 29 13:48:20] text_right                %Y-%m-%d\n%T-%q
[0:motion] [INF] [ALL] [Nov 29 13:48:20] text_changes              off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] text_scale                1
[0:motion] [INF] [ALL] [Nov 29 13:48:20] text_event                %Y%m%d%H%M%S
[0:motion] [INF] [ALL] [Nov 29 13:48:20] emulate_motion            off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] threshold                 1500
[0:motion] [INF] [ALL] [Nov 29 13:48:20] threshold_maximum         0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] threshold_tune            off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] noise_level               32
[0:motion] [INF] [ALL] [Nov 29 13:48:20] noise_tune                on
[0:motion] [INF] [ALL] [Nov 29 13:48:20] despeckle_filter          EedDl
[0:motion] [INF] [ALL] [Nov 29 13:48:20] area_detect               
[0:motion] [INF] [ALL] [Nov 29 13:48:20] mask_file                 
[0:motion] [INF] [ALL] [Nov 29 13:48:20] mask_privacy              
[0:motion] [INF] [ALL] [Nov 29 13:48:20] smart_mask_speed          0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] lightswitch_percent       0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] lightswitch_frames        5
[0:motion] [INF] [ALL] [Nov 29 13:48:20] minimum_motion_frames     1
[0:motion] [INF] [ALL] [Nov 29 13:48:20] event_gap                 60
[0:motion] [INF] [ALL] [Nov 29 13:48:20] pre_capture               3
[0:motion] [INF] [ALL] [Nov 29 13:48:20] post_capture              0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] on_event_start            
[0:motion] [INF] [ALL] [Nov 29 13:48:20] on_event_end              
[0:motion] [INF] [ALL] [Nov 29 13:48:20] on_picture_save           
[0:motion] [INF] [ALL] [Nov 29 13:48:20] on_area_detected          
[0:motion] [INF] [ALL] [Nov 29 13:48:20] on_motion_detected        
[0:motion] [INF] [ALL] [Nov 29 13:48:20] on_movie_start            
[0:motion] [INF] [ALL] [Nov 29 13:48:20] on_movie_end              
[0:motion] [INF] [ALL] [Nov 29 13:48:20] on_camera_lost            
[0:motion] [INF] [ALL] [Nov 29 13:48:20] on_camera_found           
[0:motion] [INF] [ALL] [Nov 29 13:48:20] picture_output            off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] picture_output_motion     off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] picture_type              jpeg
[0:motion] [INF] [ALL] [Nov 29 13:48:20] picture_quality           75
[0:motion] [INF] [ALL] [Nov 29 13:48:20] picture_exif              
[0:motion] [INF] [ALL] [Nov 29 13:48:20] picture_filename          %Y%m%d%H%M%S-%q
[0:motion] [INF] [ALL] [Nov 29 13:48:20] snapshot_interval         0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] snapshot_filename         %v-%Y%m%d%H%M%S-snapshot
[0:motion] [INF] [ALL] [Nov 29 13:48:20] movie_output              on
[0:motion] [INF] [ALL] [Nov 29 13:48:20] movie_output_motion       off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] movie_max_time            60
[0:motion] [INF] [ALL] [Nov 29 13:48:20] movie_bps                 400000
[0:motion] [INF] [ALL] [Nov 29 13:48:20] movie_quality             50
[0:motion] [INF] [ALL] [Nov 29 13:48:20] movie_codec               mp4
[0:motion] [INF] [ALL] [Nov 29 13:48:20] movie_duplicate_frames    off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] movie_passthrough         off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] movie_filename            %t-%v-%Y%m%d%H%M%S
[0:motion] [INF] [ALL] [Nov 29 13:48:20] movie_extpipe_use         off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] movie_extpipe             
[0:motion] [INF] [ALL] [Nov 29 13:48:20] timelapse_interval        0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] timelapse_mode            daily
[0:motion] [INF] [ALL] [Nov 29 13:48:20] timelapse_fps             30
[0:motion] [INF] [ALL] [Nov 29 13:48:20] timelapse_codec           mpg
[0:motion] [INF] [ALL] [Nov 29 13:48:20] timelapse_filename        %Y%m%d-timelapse
[0:motion] [INF] [ALL] [Nov 29 13:48:20] video_pipe                
[0:motion] [INF] [ALL] [Nov 29 13:48:20] video_pipe_motion         
[0:motion] [INF] [ALL] [Nov 29 13:48:20] webcontrol_port           8080
[0:motion] [INF] [ALL] [Nov 29 13:48:20] webcontrol_ipv6           off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] webcontrol_localhost      on
[0:motion] [INF] [ALL] [Nov 29 13:48:20] webcontrol_parms          0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] webcontrol_interface      0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] webcontrol_auth_method    0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] webcontrol_authentication 
[0:motion] [INF] [ALL] [Nov 29 13:48:20] webcontrol_tls            off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] webcontrol_cert           
[0:motion] [INF] [ALL] [Nov 29 13:48:20] webcontrol_key            
[0:motion] [INF] [ALL] [Nov 29 13:48:20] webcontrol_cors_header    
[0:motion] [INF] [ALL] [Nov 29 13:48:20] stream_port               8081
[0:motion] [INF] [ALL] [Nov 29 13:48:20] stream_localhost          on
[0:motion] [INF] [ALL] [Nov 29 13:48:20] stream_auth_method        0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] stream_authentication     
[0:motion] [INF] [ALL] [Nov 29 13:48:20] stream_tls                off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] stream_cors_header        
[0:motion] [INF] [ALL] [Nov 29 13:48:20] stream_preview_scale      25
[0:motion] [INF] [ALL] [Nov 29 13:48:20] stream_preview_newline    off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] stream_preview_method     0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] stream_quality            50
[0:motion] [INF] [ALL] [Nov 29 13:48:20] stream_grey               off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] stream_motion             off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] stream_maxrate            1
[0:motion] [INF] [ALL] [Nov 29 13:48:20] stream_limit              0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] database_type             mysql
[0:motion] [INF] [ALL] [Nov 29 13:48:20] database_dbname           videoVigilancia
[0:motion] [INF] [ALL] [Nov 29 13:48:20] database_host             localhost
[0:motion] [INF] [ALL] [Nov 29 13:48:20] database_port             3306
[0:motion] [INF] [ALL] [Nov 29 13:48:20] database_user             <redacted>
[0:motion] [INF] [ALL] [Nov 29 13:48:20] database_password         <redacted>
[0:motion] [INF] [ALL] [Nov 29 13:48:20] database_busy_timeout     0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] sql_log_picture           on
[0:motion] [INF] [ALL] [Nov 29 13:48:20] sql_log_snapshot          on
[0:motion] [INF] [ALL] [Nov 29 13:48:20] sql_log_movie             on
[0:motion] [INF] [ALL] [Nov 29 13:48:20] sql_log_timelapse         on
[0:motion] [INF] [ALL] [Nov 29 13:48:20] sql_query_start           
[0:motion] [INF] [ALL] [Nov 29 13:48:20] sql_query_stop            
[0:motion] [INF] [ALL] [Nov 29 13:48:20] sql_query                 insert into security2(camera, filename, frame, file_type, time_stamp, text_event) values('%t', '%f', '%q', '%n', '%Y-%m-%d %T', '%C')
[0:motion] [INF] [ALL] [Nov 29 13:48:20] track_type                0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] track_auto                off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] track_port                
[0:motion] [INF] [ALL] [Nov 29 13:48:20] track_motorx              0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] track_motorx_reverse      off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] track_motory              0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] track_motory_reverse      off
[0:motion] [INF] [ALL] [Nov 29 13:48:20] track_maxx                0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] track_minx                0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] track_maxy                0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] track_miny                0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] track_homex               128
[0:motion] [INF] [ALL] [Nov 29 13:48:20] track_homey               128
[0:motion] [INF] [ALL] [Nov 29 13:48:20] track_iomojo_id           0
[0:motion] [INF] [ALL] [Nov 29 13:48:20] track_step_angle_x        10
[0:motion] [INF] [ALL] [Nov 29 13:48:20] track_step_angle_y        10
[0:motion] [INF] [ALL] [Nov 29 13:48:20] track_move_wait           10
[0:motion] [INF] [ALL] [Nov 29 13:48:20] track_speed               255
[0:motion] [INF] [ALL] [Nov 29 13:48:20] track_stepsize            40
[0:motion] [INF] [ALL] [Nov 29 13:48:20] track_generic_move        
[0:motion] [INF] [ALL] [Nov 29 13:48:20] camera                    
[0:motion] [INF] [ALL] [Nov 29 13:48:20] camera_dir                
[0:motion] [INF] [ALL] [Nov 29 13:48:20] Thread 1 - Config file: /home/tecnolord/VideoControl/videoVigilancia/config/configCams/gimnas.conf
[0:motion] [INF] [ALL] [Nov 29 13:48:20] log_file                  /home/tecnolord/VideoControl/videoVigilancia/log/motion/motionCam1.log
[0:motion] [INF] [ALL] [Nov 29 13:48:20] camera_name               Gimnas
[0:motion] [INF] [ALL] [Nov 29 13:48:20] camera_id                 161
[0:motion] [INF] [ALL] [Nov 29 13:48:20] target_dir                /home/tecnolord/VideoControl/videoVigilancia/Gravacions/Gimnas
[0:motion] [INF] [ALL] [Nov 29 13:48:20] netcam_url                <redacted>
[0:motion] [INF] [ALL] [Nov 29 13:48:20] width                     352
[0:motion] [INF] [ALL] [Nov 29 13:48:20] height                    288
[0:motion] [INF] [ALL] [Nov 29 13:48:20] text_left                 Ginmas
[0:motion] [INF] [ALL] [Nov 29 13:48:20] text_right                Ginmas\n%Y-%m-%d\n%T-%q
[0:motion] [INF] [ALL] [Nov 29 13:48:20] movie_filename            Ginmas_%t-%v-%Y%m%d%H%M%S
[0:motion] [NTC] [STR] [Nov 29 13:48:20] webu_start_strm: Starting all camera streams on port 8081
[0:motion] [INF] [STR] [Nov 29 13:48:20] webu_mhd_features_basic: Basic authentication: available
[0:motion] [INF] [STR] [Nov 29 13:48:20] webu_mhd_features_digest: Digest authentication: available
[0:motion] [INF] [STR] [Nov 29 13:48:20] webu_mhd_features_ipv6: IPV6: available
[0:motion] [INF] [STR] [Nov 29 13:48:20] webu_mhd_features_tls: SSL/TLS: available
[0:motion] [NTC] [STR] [Nov 29 13:48:20] webu_start_ctrl: Starting webcontrol on port 8080
[0:motion] [INF] [STR] [Nov 29 13:48:20] webu_mhd_features_basic: Basic authentication: available
[0:motion] [INF] [STR] [Nov 29 13:48:20] webu_mhd_features_digest: Digest authentication: available
[0:motion] [INF] [STR] [Nov 29 13:48:20] webu_mhd_features_ipv6: IPV6: available
[0:motion] [INF] [STR] [Nov 29 13:48:20] webu_mhd_features_tls: SSL/TLS: available
[0:motion] [NTC] [ENC] [Nov 29 13:48:20] ffmpeg_global_init: ffmpeg libavcodec version 56.60.100 libavformat version 56.40.101
[0:motion] [NTC] [ALL] [nov 29 13:48:20] translate_init: Language: English
[0:motion] [NTC] [ALL] [nov 29 13:48:20] motion_start_thread: Camera ID: 161 is from /home/tecnolord/VideoControl/videoVigilancia/config/configCams/gimnas.conf
[0:motion] [NTC] [ALL] [nov 29 13:48:20] motion_start_thread: Camera ID: 161 Camera Name: Gimnas Service: http:
[0:motion] [NTC] [ALL] [nov 29 13:48:20] motion_start_thread: Stream port 0
[0:motion] [NTC] [ALL] [nov 29 13:48:20] main: Waiting for threads to finish, pid: 4082
[1:ml1:Gimnas] [NTC] [ALL] [nov 29 13:48:20] motion_init: Camera 161 started: motion detection Enabled
[1:ml1:Gimnas] [NTC] [VID] [nov 29 13:48:20] vid_start: Opening Netcam
[1:ml1:Gimnas] [NTC] [NET] [nov 29 13:48:20] netcam_start: Network Camera starting for camera (Gimnas)
[1:ml1:Gimnas] [INF] [NET] [nov 29 13:48:20] netcam_url_parse: Using port number 80
[1:ml1:Gimnas] [INF] [NET] [nov 29 13:48:20] netcam_start: Netcam_http parameter 'off' converts to flags: HTTP/1.0: 1 HTTP/1.1: 0 Keep-Alive OFF.
[1:ml1:Gimnas] [INF] [NET] [nov 29 13:48:20] netcam_start: now calling netcam_setup_html()
[1:ml1:Gimnas] [INF] [NET] [nov 29 13:48:20] netcam_http_build_url: Netcam has flags: HTTP/1.0: 1 HTTP/1.1: 0 Keep-Alive OFF.
[1:ml1:Gimnas] [INF] [NET] [nov 29 13:48:20] netcam_http_request: about to try to connect, time #0
[1:ml1:Gimnas] [INF] [NET] [nov 29 13:48:20] netcam_connect: disconnecting netcam since keep-alive not set.
[1:ml1:Gimnas] [INF] [NET] [nov 29 13:48:20] netcam_connect: with no keepalive, new socket created fd 7
[1:ml1:Gimnas] [INF] [NET] [nov 29 13:48:20] netcam_connect: re-using socket 7 since keepalive is set.
[1:ml1:Gimnas] [NTC] [NET] [nov 29 13:48:21] netcam_read_first_header: Found Conn: close header ('Connection: close')
[1:ml1:Gimnas] [NTC] [NET] [nov 29 13:48:21] netcam_setup_html: connected, going on to read image.
[1:ml1:Gimnas] [INF] [NET] [nov 29 13:48:21] netcam_get_dimensions: JFIF_marker IS PRESENT ret 0
[1:ml1:Gimnas] [NTC] [ALL] [nov 29 13:48:21] image_ring_resize: Resizing pre_capture buffer to 1 items
[1:ml1:Gimnas] [WRN] [NET] [nov 29 13:48:21] netcam_next: called with no data in buffer
[1:nc2:Gimnas] [NTC] [NET] [nov 29 13:48:21] netcam_handler_loop: Camera handler thread [2] started
[1:ml1:Gimnas] [NTC] [DBL] [nov 29 13:48:23] dbse_init: Database backend mysql
[1:ml1:Gimnas] [NTC] [ALL] [nov 29 13:48:23] image_ring_resize: Resizing pre_capture buffer to 4 items
[1:ml1:Gimnas] [INF] [EVT] [nov 29 13:49:01] event_new_video: Source FPS 13
[1:ml1:Gimnas] [INF] [ENC] [nov 29 13:49:01] ffmpeg_set_quality: libx264 codec vbr/crf/bit_rate: 25
[1:ml1:Gimnas] [NTC] [EVT] [nov 29 13:49:01] event_newfile: File of type 8 saved to: /home/tecnolord/VideoControl/videoVigilancia/Gravacions/Gimnas/Ginmas_161-01-20181129134900.mp4
[1:ml1:Gimnas] [NTC] [ALL] [nov 29 13:49:01] motion_detected: Motion detected - starting event 1
tosiara commented 5 years ago

Your log ends at "starting event 1", but we need to see the end of the event too

oriolrg commented 5 years ago

I hope that is what you say @tosiara , thanks

[0:motion] [NTC] [ALL] [Nov 29 15:36:24] motion_startup: Motion 4.2+git20181127-d8377cb Started
[0:motion] [NTC] [ALL] [Nov 29 15:36:24] motion_startup: Using default log type (ALL)
[0:motion] [NTC] [ALL] [Nov 29 15:36:24] motion_startup: Using log type (ALL) log level (INF)
[0:motion] [INF] [ALL] [Nov 29 15:36:24] conf_output_parms: Writing configuration parameters from all files (2):
[0:motion] [INF] [ALL] [Nov 29 15:36:24] Thread 0 - Config file: /home/tecnolord/VideoControl/videoVigilancia/config/motion/motion.conf
[0:motion] [INF] [ALL] [Nov 29 15:36:24] daemon                    off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] setup_mode                off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] pid_file                  
[0:motion] [INF] [ALL] [Nov 29 15:36:24] log_file                  /home/tecnolord/VideoControl/videoVigilancia/log/motion/motion.log
[0:motion] [INF] [ALL] [Nov 29 15:36:24] log_level                 7
[0:motion] [INF] [ALL] [Nov 29 15:36:24] log_type                  ALL
[0:motion] [INF] [ALL] [Nov 29 15:36:24] quiet                     on
[0:motion] [INF] [ALL] [Nov 29 15:36:24] native_language           on
[0:motion] [INF] [ALL] [Nov 29 15:36:24] camera_name               
[0:motion] [INF] [ALL] [Nov 29 15:36:24] camera_id                 0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] target_dir                
[0:motion] [INF] [ALL] [Nov 29 15:36:24] videodevice               /dev/video0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] vid_control_params        
[0:motion] [INF] [ALL] [Nov 29 15:36:24] v4l2_palette              17
[0:motion] [INF] [ALL] [Nov 29 15:36:24] input                     -1
[0:motion] [INF] [ALL] [Nov 29 15:36:24] norm                      0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] frequency                 0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] auto_brightness           0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] tunerdevice               
[0:motion] [INF] [ALL] [Nov 29 15:36:24] roundrobin_frames         1
[0:motion] [INF] [ALL] [Nov 29 15:36:24] roundrobin_skip           1
[0:motion] [INF] [ALL] [Nov 29 15:36:24] roundrobin_switchfilter   off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] netcam_url                
[0:motion] [INF] [ALL] [Nov 29 15:36:24] netcam_highres            
[0:motion] [INF] [ALL] [Nov 29 15:36:24] netcam_userpass           
[0:motion] [INF] [ALL] [Nov 29 15:36:24] netcam_keepalive          off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] netcam_proxy              
[0:motion] [INF] [ALL] [Nov 29 15:36:24] netcam_tolerant_check     off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] netcam_use_tcp            on
[0:motion] [INF] [ALL] [Nov 29 15:36:24] mmalcam_name              
[0:motion] [INF] [ALL] [Nov 29 15:36:24] mmalcam_control_params    
[0:motion] [INF] [ALL] [Nov 29 15:36:24] width                     640
[0:motion] [INF] [ALL] [Nov 29 15:36:24] height                    480
[0:motion] [INF] [ALL] [Nov 29 15:36:24] framerate                 15
[0:motion] [INF] [ALL] [Nov 29 15:36:24] minimum_frame_time        0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] rotate                    0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] flip_axis                 none
[0:motion] [INF] [ALL] [Nov 29 15:36:24] locate_motion_mode        off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] locate_motion_style       box
[0:motion] [INF] [ALL] [Nov 29 15:36:24] text_left                 CAMERA1
[0:motion] [INF] [ALL] [Nov 29 15:36:24] text_right                %Y-%m-%d\n%T-%q
[0:motion] [INF] [ALL] [Nov 29 15:36:24] text_changes              off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] text_scale                1
[0:motion] [INF] [ALL] [Nov 29 15:36:24] text_event                %Y%m%d%H%M%S
[0:motion] [INF] [ALL] [Nov 29 15:36:24] emulate_motion            off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] threshold                 1500
[0:motion] [INF] [ALL] [Nov 29 15:36:24] threshold_maximum         0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] threshold_tune            off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] noise_level               32
[0:motion] [INF] [ALL] [Nov 29 15:36:24] noise_tune                on
[0:motion] [INF] [ALL] [Nov 29 15:36:24] despeckle_filter          EedDl
[0:motion] [INF] [ALL] [Nov 29 15:36:24] area_detect               
[0:motion] [INF] [ALL] [Nov 29 15:36:24] mask_file                 
[0:motion] [INF] [ALL] [Nov 29 15:36:24] mask_privacy              
[0:motion] [INF] [ALL] [Nov 29 15:36:24] smart_mask_speed          0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] lightswitch_percent       0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] lightswitch_frames        5
[0:motion] [INF] [ALL] [Nov 29 15:36:24] minimum_motion_frames     1
[0:motion] [INF] [ALL] [Nov 29 15:36:24] event_gap                 60
[0:motion] [INF] [ALL] [Nov 29 15:36:24] pre_capture               3
[0:motion] [INF] [ALL] [Nov 29 15:36:24] post_capture              0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] on_event_start            
[0:motion] [INF] [ALL] [Nov 29 15:36:24] on_event_end              
[0:motion] [INF] [ALL] [Nov 29 15:36:24] on_picture_save           
[0:motion] [INF] [ALL] [Nov 29 15:36:24] on_area_detected          
[0:motion] [INF] [ALL] [Nov 29 15:36:24] on_motion_detected        
[0:motion] [INF] [ALL] [Nov 29 15:36:24] on_movie_start            
[0:motion] [INF] [ALL] [Nov 29 15:36:24] on_movie_end              
[0:motion] [INF] [ALL] [Nov 29 15:36:24] on_camera_lost            
[0:motion] [INF] [ALL] [Nov 29 15:36:24] on_camera_found           
[0:motion] [INF] [ALL] [Nov 29 15:36:24] picture_output            off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] picture_output_motion     off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] picture_type              jpeg
[0:motion] [INF] [ALL] [Nov 29 15:36:24] picture_quality           75
[0:motion] [INF] [ALL] [Nov 29 15:36:24] picture_exif              
[0:motion] [INF] [ALL] [Nov 29 15:36:24] picture_filename          %Y%m%d%H%M%S-%q
[0:motion] [INF] [ALL] [Nov 29 15:36:24] snapshot_interval         0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] snapshot_filename         %v-%Y%m%d%H%M%S-snapshot
[0:motion] [INF] [ALL] [Nov 29 15:36:24] movie_output              on
[0:motion] [INF] [ALL] [Nov 29 15:36:24] movie_output_motion       off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] movie_max_time            60
[0:motion] [INF] [ALL] [Nov 29 15:36:24] movie_bps                 400000
[0:motion] [INF] [ALL] [Nov 29 15:36:24] movie_quality             50
[0:motion] [INF] [ALL] [Nov 29 15:36:24] movie_codec               mkv
[0:motion] [INF] [ALL] [Nov 29 15:36:24] movie_duplicate_frames    off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] movie_passthrough         off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] movie_filename            %t-%v-%Y%m%d%H%M%S
[0:motion] [INF] [ALL] [Nov 29 15:36:24] movie_extpipe_use         off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] movie_extpipe             
[0:motion] [INF] [ALL] [Nov 29 15:36:24] timelapse_interval        0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] timelapse_mode            daily
[0:motion] [INF] [ALL] [Nov 29 15:36:24] timelapse_fps             30
[0:motion] [INF] [ALL] [Nov 29 15:36:24] timelapse_codec           mpg
[0:motion] [INF] [ALL] [Nov 29 15:36:24] timelapse_filename        %Y%m%d-timelapse
[0:motion] [INF] [ALL] [Nov 29 15:36:24] video_pipe                
[0:motion] [INF] [ALL] [Nov 29 15:36:24] video_pipe_motion         
[0:motion] [INF] [ALL] [Nov 29 15:36:24] webcontrol_port           8080
[0:motion] [INF] [ALL] [Nov 29 15:36:24] webcontrol_ipv6           off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] webcontrol_localhost      on
[0:motion] [INF] [ALL] [Nov 29 15:36:24] webcontrol_parms          0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] webcontrol_interface      0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] webcontrol_auth_method    0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] webcontrol_authentication 
[0:motion] [INF] [ALL] [Nov 29 15:36:24] webcontrol_tls            off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] webcontrol_cert           
[0:motion] [INF] [ALL] [Nov 29 15:36:24] webcontrol_key            
[0:motion] [INF] [ALL] [Nov 29 15:36:24] webcontrol_cors_header    
[0:motion] [INF] [ALL] [Nov 29 15:36:24] stream_port               8081
[0:motion] [INF] [ALL] [Nov 29 15:36:24] stream_localhost          on
[0:motion] [INF] [ALL] [Nov 29 15:36:24] stream_auth_method        0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] stream_authentication     
[0:motion] [INF] [ALL] [Nov 29 15:36:24] stream_tls                off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] stream_cors_header        
[0:motion] [INF] [ALL] [Nov 29 15:36:24] stream_preview_scale      25
[0:motion] [INF] [ALL] [Nov 29 15:36:24] stream_preview_newline    off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] stream_preview_method     0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] stream_quality            50
[0:motion] [INF] [ALL] [Nov 29 15:36:24] stream_grey               off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] stream_motion             off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] stream_maxrate            1
[0:motion] [INF] [ALL] [Nov 29 15:36:24] stream_limit              0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] database_type             mysql
[0:motion] [INF] [ALL] [Nov 29 15:36:24] database_dbname           videoVigilancia
[0:motion] [INF] [ALL] [Nov 29 15:36:24] database_host             localhost
[0:motion] [INF] [ALL] [Nov 29 15:36:24] database_port             3306
[0:motion] [INF] [ALL] [Nov 29 15:36:24] database_user             <redacted>
[0:motion] [INF] [ALL] [Nov 29 15:36:24] database_password         <redacted>
[0:motion] [INF] [ALL] [Nov 29 15:36:24] database_busy_timeout     0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] sql_log_picture           on
[0:motion] [INF] [ALL] [Nov 29 15:36:24] sql_log_snapshot          on
[0:motion] [INF] [ALL] [Nov 29 15:36:24] sql_log_movie             on
[0:motion] [INF] [ALL] [Nov 29 15:36:24] sql_log_timelapse         on
[0:motion] [INF] [ALL] [Nov 29 15:36:24] sql_query_start           
[0:motion] [INF] [ALL] [Nov 29 15:36:24] sql_query_stop            
[0:motion] [INF] [ALL] [Nov 29 15:36:24] sql_query                 insert into security2(camera, filename, frame, file_type, time_stamp, text_event) values('%t', '%f', '%q', '%n', '%Y-%m-%d %T', '%C')
[0:motion] [INF] [ALL] [Nov 29 15:36:24] track_type                0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] track_auto                off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] track_port                
[0:motion] [INF] [ALL] [Nov 29 15:36:24] track_motorx              0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] track_motorx_reverse      off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] track_motory              0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] track_motory_reverse      off
[0:motion] [INF] [ALL] [Nov 29 15:36:24] track_maxx                0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] track_minx                0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] track_maxy                0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] track_miny                0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] track_homex               128
[0:motion] [INF] [ALL] [Nov 29 15:36:24] track_homey               128
[0:motion] [INF] [ALL] [Nov 29 15:36:24] track_iomojo_id           0
[0:motion] [INF] [ALL] [Nov 29 15:36:24] track_step_angle_x        10
[0:motion] [INF] [ALL] [Nov 29 15:36:24] track_step_angle_y        10
[0:motion] [INF] [ALL] [Nov 29 15:36:24] track_move_wait           10
[0:motion] [INF] [ALL] [Nov 29 15:36:24] track_speed               255
[0:motion] [INF] [ALL] [Nov 29 15:36:24] track_stepsize            40
[0:motion] [INF] [ALL] [Nov 29 15:36:24] track_generic_move        
[0:motion] [INF] [ALL] [Nov 29 15:36:24] camera                    
[0:motion] [INF] [ALL] [Nov 29 15:36:24] camera_dir                
[0:motion] [INF] [ALL] [Nov 29 15:36:24] Thread 1 - Config file: /home/tecnolord/VideoControl/videoVigilancia/config/configCams/pavello.conf
[0:motion] [INF] [ALL] [Nov 29 15:36:24] camera_name               Pavello
[0:motion] [INF] [ALL] [Nov 29 15:36:24] camera_id                 177
[0:motion] [INF] [ALL] [Nov 29 15:36:24] target_dir                /home/tecnolord/VideoControl/videoVigilancia/Gravacions/Pavello
[0:motion] [INF] [ALL] [Nov 29 15:36:24] netcam_url                <redacted>
[0:motion] [INF] [ALL] [Nov 29 15:36:24] width                     352
[0:motion] [INF] [ALL] [Nov 29 15:36:24] height                    288
[0:motion] [INF] [ALL] [Nov 29 15:36:24] text_left                 Pavello
[0:motion] [INF] [ALL] [Nov 29 15:36:24] text_right                Pavello\n%Y-%m-%d\n%T-%q
[0:motion] [INF] [ALL] [Nov 29 15:36:24] movie_filename            Pavello_%t-%v-%Y%m%d%H%M%S
[0:motion] [NTC] [STR] [Nov 29 15:36:24] webu_start_strm: Starting all camera streams on port 8081
[0:motion] [INF] [STR] [Nov 29 15:36:24] webu_mhd_features_basic: Basic authentication: available
[0:motion] [INF] [STR] [Nov 29 15:36:24] webu_mhd_features_digest: Digest authentication: available
[0:motion] [INF] [STR] [Nov 29 15:36:24] webu_mhd_features_ipv6: IPV6: available
[0:motion] [INF] [STR] [Nov 29 15:36:24] webu_mhd_features_tls: SSL/TLS: available
[0:motion] [NTC] [STR] [Nov 29 15:36:24] webu_start_ctrl: Starting webcontrol on port 8080
[0:motion] [INF] [STR] [Nov 29 15:36:24] webu_mhd_features_basic: Basic authentication: available
[0:motion] [INF] [STR] [Nov 29 15:36:24] webu_mhd_features_digest: Digest authentication: available
[0:motion] [INF] [STR] [Nov 29 15:36:24] webu_mhd_features_ipv6: IPV6: available
[0:motion] [INF] [STR] [Nov 29 15:36:24] webu_mhd_features_tls: SSL/TLS: available
[0:motion] [NTC] [ENC] [Nov 29 15:36:24] ffmpeg_global_init: ffmpeg libavcodec version 56.60.100 libavformat version 56.40.101
[0:motion] [NTC] [ALL] [nov 29 15:36:24] translate_init: Language: English
[0:motion] [NTC] [ALL] [nov 29 15:36:24] motion_start_thread: Camera ID: 177 is from /home/tecnolord/VideoControl/videoVigilancia/config/configCams/pavello.conf
[0:motion] [NTC] [ALL] [nov 29 15:36:24] motion_start_thread: Camera ID: 177 Camera Name: Pavello Service: http:
[0:motion] [NTC] [ALL] [nov 29 15:36:24] motion_start_thread: Stream port 0
[0:motion] [NTC] [ALL] [nov 29 15:36:24] main: Waiting for threads to finish, pid: 6154
[1:ml1:Pavello] [NTC] [ALL] [nov 29 15:36:24] motion_init: Camera 177 started: motion detection Enabled
[1:ml1:Pavello] [NTC] [VID] [nov 29 15:36:24] vid_start: Opening Netcam
[1:ml1:Pavello] [NTC] [NET] [nov 29 15:36:24] netcam_start: Network Camera starting for camera (Pavello)
[1:ml1:Pavello] [INF] [NET] [nov 29 15:36:24] netcam_url_parse: Using port number 80
[1:ml1:Pavello] [INF] [NET] [nov 29 15:36:24] netcam_start: Netcam_http parameter 'off' converts to flags: HTTP/1.0: 1 HTTP/1.1: 0 Keep-Alive OFF.
[1:ml1:Pavello] [INF] [NET] [nov 29 15:36:24] netcam_start: now calling netcam_setup_html()
[1:ml1:Pavello] [INF] [NET] [nov 29 15:36:24] netcam_http_build_url: Netcam has flags: HTTP/1.0: 1 HTTP/1.1: 0 Keep-Alive OFF.
[1:ml1:Pavello] [INF] [NET] [nov 29 15:36:24] netcam_http_request: about to try to connect, time #0
[1:ml1:Pavello] [INF] [NET] [nov 29 15:36:24] netcam_connect: disconnecting netcam since keep-alive not set.
[1:ml1:Pavello] [INF] [NET] [nov 29 15:36:24] netcam_connect: with no keepalive, new socket created fd 7
[1:ml1:Pavello] [INF] [NET] [nov 29 15:36:24] netcam_connect: re-using socket 7 since keepalive is set.
[1:ml1:Pavello] [NTC] [NET] [nov 29 15:36:25] netcam_read_first_header: Found Conn: close header ('Connection: close')
[1:ml1:Pavello] [NTC] [NET] [nov 29 15:36:25] netcam_setup_html: connected, going on to read image.
[1:ml1:Pavello] [INF] [NET] [nov 29 15:36:26] netcam_get_dimensions: JFIF_marker IS PRESENT ret 0
[1:ml1:Pavello] [NTC] [ALL] [nov 29 15:36:26] image_ring_resize: Resizing pre_capture buffer to 1 items
[1:nc2:Pavello] [NTC] [NET] [nov 29 15:36:26] netcam_handler_loop: Camera handler thread [2] started
[1:ml1:Pavello] [WRN] [NET] [nov 29 15:36:26] netcam_next: called with no data in buffer
[1:ml1:Pavello] [NTC] [DBL] [nov 29 15:36:28] dbse_init: Database backend mysql
[1:ml1:Pavello] [NTC] [ALL] [nov 29 15:36:28] image_ring_resize: Resizing pre_capture buffer to 4 items
[1:ml1:Pavello] [INF] [EVT] [nov 29 15:36:58] event_new_video: Source FPS 13
[1:ml1:Pavello] [INF] [ENC] [nov 29 15:36:58] ffmpeg_set_quality: libx264 codec vbr/crf/bit_rate: 25
[1:ml1:Pavello] [NTC] [EVT] [nov 29 15:36:58] event_newfile: File of type 8 saved to: /home/tecnolord/VideoControl/videoVigilancia/Gravacions/Pavello/Pavello_177-01-20181129153657.mkv
[1:ml1:Pavello] [NTC] [ALL] [nov 29 15:36:58] motion_detected: Motion detected - starting event 1
[1:ml1:Pavello] [NTC] [ALL] [nov 29 15:37:58] mlp_actions: End of event 1
[1:ml1:Pavello] [INF] [EVT] [nov 29 15:38:19] event_new_video: Source FPS 14
[1:ml1:Pavello] [INF] [ENC] [nov 29 15:38:19] ffmpeg_set_quality: libx264 codec vbr/crf/bit_rate: 25
[1:ml1:Pavello] [NTC] [EVT] [nov 29 15:38:19] event_newfile: File of type 8 saved to: /home/tecnolord/VideoControl/videoVigilancia/Gravacions/Pavello/Pavello_177-02-20181129153819.mkv
[1:ml1:Pavello] [NTC] [ALL] [nov 29 15:38:19] motion_detected: Motion detected - starting event 2
[1:ml1:Pavello] [WRN] [NET] [nov 29 15:38:21] netcam_init_jpeg: no new pic, no signal rcvd
[1:ml1:Pavello] [INF] [NET] [nov 29 15:38:21] netcam_proc_jpeg: return code 6
[1:ml1:Pavello] [WRN] [NET] [nov 29 15:38:22] netcam_init_jpeg: no new pic, no signal rcvd
[1:ml1:Pavello] [INF] [NET] [nov 29 15:38:22] netcam_proc_jpeg: return code 6
[1:ml1:Pavello] [WRN] [NET] [nov 29 15:38:22] netcam_init_jpeg: no new pic, no signal rcvd
[1:ml1:Pavello] [INF] [NET] [nov 29 15:38:22] netcam_proc_jpeg: return code 6
[1:ml1:Pavello] [WRN] [NET] [nov 29 15:38:23] netcam_init_jpeg: no new pic, no signal rcvd
[1:ml1:Pavello] [INF] [NET] [nov 29 15:38:23] netcam_proc_jpeg: return code 6
tosiara commented 5 years ago

Are you sure you have compiled motion with MySQL support? Can you provide the output of your ./configure

oriolrg commented 5 years ago

Yes. `OS : Linux pthread support: Yes jpeg support: Yes webp support: No V4L2 support: Yes BKTR support: No MMAL support: No ... libraspberrypi-dev package not installed FFmpeg support: Yes ... FFMPEG_CFLAGS: -I/usr/include/x86_64-linux-gnu
... FFMPEG_LIBS: -lavutil-ffmpeg -lavformat-ffmpeg -lavcodec-ffmpeg -lswscale-ffmpeg -lavdevice-ffmpeg
SQLite3 support: No MYSQL support: Yes PostgreSQL support: No

CFLAGS: -g -O2 -D_THREAD_SAFE -I/usr/include/mysql
LIBS: -lm -pthread -ljpeg -lmicrohttpd -lmysqlclient
LDFLAGS:

Install prefix: /usr/local `

tosiara commented 5 years ago

Can you please provide the FULL output of your ./configure?

oriolrg commented 5 years ago
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking for ANSI C header files... (cached) yes
checking for an ANSI C-conforming const... yes
checking for Darwin/BSD... no
checking linux/videodev2.h usability... yes
checking linux/videodev2.h presence... yes
checking for linux/videodev2.h... yes
checking for pthread_setname_np... yes
checking for pthread_getname_np... yes
checking for XSI strerror_r... no
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking Native language support... yes
checking setjmp.h usability... yes
checking setjmp.h presence... yes
checking for setjmp.h... yes
checking jerror.h usability... yes
checking jerror.h presence... yes
checking for jerror.h... yes
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking jpg libraries... yes
checking microhttpd.h usability... yes
checking microhttpd.h presence... yes
checking for microhttpd.h... yes
checking libmicrohttpd libraries... yes
checking for pkg-config... yes
checking for libwebp... not found
checking for libavformat... yes 56.40.101
checking sqlite3.h usability... no
checking sqlite3.h presence... no
checking for sqlite3.h... no
checking for db package config... mysqlclient found
checking for mysql_init in -lmysqlclient... yes
checking for pgsql package config... not found
checking for pgsql headers... not found
checking for pgsql libs... 
checking for PQconnectStart in -lpq... no
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for unistd.h... (cached) yes
checking for stdint.h... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for sys/types.h... (cached) yes
configure: creating ./config.status
config.status: creating camera1-dist.conf
config.status: creating camera2-dist.conf
config.status: creating camera3-dist.conf
config.status: creating camera4-dist.conf
config.status: creating motion-dist.conf
config.status: creating motion.init-FreeBSD.sh
config.status: creating motion.init-Debian
config.status: creating motion.service
config.status: creating motion.spec
config.status: creating Makefile
config.status: creating config.h

   **************************
      Configure status       
      motion 4.2+git20181127-d8377cb
   **************************

OS             :     Linux
pthread support:     Yes
jpeg support:        Yes
webp support:        No
V4L2 support:        Yes
BKTR support:        No
MMAL support:        No
 ... libraspberrypi-dev package not installed
FFmpeg support:      Yes
 ... FFMPEG_CFLAGS: -I/usr/include/x86_64-linux-gnu  
 ... FFMPEG_LIBS: -lavutil-ffmpeg -lavformat-ffmpeg -lavcodec-ffmpeg -lswscale-ffmpeg  -lavdevice-ffmpeg  
SQLite3 support:     No
MYSQL support:       Yes
PostgreSQL support:  No

CFLAGS:  -g -O2 -D_THREAD_SAFE -I/usr/include/mysql   
LIBS: -lm  -pthread -ljpeg -lmicrohttpd  -lmysqlclient  
LDFLAGS:  

Install prefix:       /usr/local
oriolrg commented 5 years ago

I have watched the mysql log, and I think that motion is not trying to connect, since by placing user credentials and incorrect password, it does not register a connection error

tosiara commented 5 years ago

But previously you confirmed that connection is being established: in fact if I try to put incorrect data, and in this case it does return the log error

oriolrg commented 5 years ago

Yes, I did, but I had not checked the mysql error.log

tosiara commented 5 years ago

I have checked using similar config and it worked:

database_type             mysql
database_dbname           motion
database_host             localhost
database_port             3306
database_user             motion
database_password         motion

sql_log_picture           on
sql_log_snapshot          on
sql_log_movie             on
sql_log_timelapse         on
sql_query                 insert into a values(1)
sql_query_start           insert into a values(2)
sql_query_stop            insert into a values(3)
[0:motion] [DBG] [DBL] dbse_global_init: Initializing database
[0:motion] [NTC] [ALL] translate_locale_chg: No native language support
[0:motion] [NTC] [ALL] motion_start_thread: Camera ID: 0 is from ../motion.conf
[0:motion] [NTC] [ALL] motion_start_thread: Camera ID: 0 Camera Name: (null) Service: rtsp:
[0:motion] [NTC] [ALL] motion_start_thread: Stream port 8081
[0:motion] [NTC] [ALL] main: Waiting for threads to finish, pid: 52123
[1:ml1] [NTC] [ALL] motion_init: Camera 0 started: motion detection Enabled
[1:ml1] [NTC] [VID] vid_start: Opening Netcam RTSP
[1:ml1] [INF] [NET] netcam_rtsp_set_parms: Setting up Normal resolution stream.
[1:ml1] [INF] [NET] netcam_url_parse: Using port number 554
[1:ml1] [INF] [NET] netcam_rtsp_set_path: Setting up rtsp via ffmpeg netcam
[1:ml1] [INF] [NET] netcam_rtsp_set_rtsp: Normal resolution: Setting rtsp transport to tcp
[1:ml1] [INF] [NET] netcam_rtsp_open_context: Normal resolution: Opened camera((null))
[1:ml1] [DBG] [NET] netcam_check_buffsize: expanding buffer from [0/0] to [0/61440] bytes.
[1:ml1] [DBG] [NET] Above message repeats 1 times
[1:ml1] [DBG] [NET] netcam_check_buffsize: expanding buffer from [57600/61440] to [57600/118784] bytes.
[1:ml1] [NTC] [NET] netcam_rtsp_connect: Normal resolution: Camera ((null)) connected
[1:ml1] [DBG] [NET] netcam_check_buffsize: expanding buffer from [57600/61440] to [57600/118784] bytes.
[1:ml1] [NTC] [ALL] image_ring_resize: Resizing pre_capture buffer to 1 items
[2:nc2] [NTC] [NET] netcam_rtsp_handler: Normal resolution: Camera handler thread [2] started
[2:nc2] [INF] [NET] netcam_rtsp_open_context: Normal resolution: Opened camera((null))
[2:nc2] [NTC] [NET] netcam_rtsp_connect: Normal resolution: Camera ((null)) connected
[1:ml1] [NTC] [DBL] dbse_init: Database backend mysql
[1:ml1] [NTC] [ALL] image_ring_resize: Resizing pre_capture buffer to 4 items
[1:ml1] [INF] [EVT] event_new_video: Source FPS 5
[1:ml1] [NTC] [ALL] motion_detected: Motion detected - starting event 1
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172914-02.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172914-03.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172914-04.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172915-00.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172915-01.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172915-02.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172915-03.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172915-04.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172916-00.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172916-01.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172916-02.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172916-03.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172916-04.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172917-00.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172917-01.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172917-02.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172917-03.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172917-04.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172918-00.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172918-01.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172918-02.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172918-03.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172918-04.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172919-00.jpg
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172919-01.jpg
^C[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172919-02.jpg
[1:ml1] [NTC] [ALL] mlp_actions: End of event 1
[1:ml1] [NTC] [EVT] event_newfile: File of type 1 saved to: ./20181129172919-03.jpg
[1:ml1] [NTC] [ALL] motion_loop: Thread exiting
[1:ml1] [INF] [ALL] motion_cleanup: Calling vid_close() from motion_cleanup
[1:ml1] [INF] [VID] vid_close: calling netcam_rtsp_cleanup
[1:ml1] [INF] [NET] netcam_rtsp_cleanup: Normal resolution: Shutting down network camera.
[2:nc2] [INF] [NET] netcam_rtsp_read_image: Normal resolution: av_read_frame: Success ,Interrupt: True
[2:nc2] [INF] [NET] netcam_rtsp_handler: Normal resolution: Handler loop finished.
[2:nc2] [INF] [NET] netcam_rtsp_handler: netcam camera handler: finish set, exiting
[1:ml1] [NTC] [NET] netcam_rtsp_cleanup: Normal resolution: Shut down complete.
[0:motion] [NTC] [ALL] main: Threads finished
[0:motion] [NTC] [ALL] main: Motion terminating
[0:motion] [DBG] [ALL] dbse_global_deinit: Closing MYSQL
[0:motion] [DBG] [VID] bktr_mutex_destroy: BKTR is not enabled.
mysql> select * from a;
+------+
| b    |
+------+
|    2 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
|    1 |
+------+
28 rows in set (0.00 sec)

Worked, but I'm still a little concerned why there are no log messages about SQL being executed. I used -d 9 and did not see anything related to successful connection to the database or queries executing

oriolrg commented 5 years ago

I tried to execute a simple insert like the one of your last example on a new table and I am still without exit.

Thank you for your help, I'm still investigating

oriolrg commented 5 years ago

I've solved the Issue uninstalling and compiling a new motion. However, the log of possible problems with the database are missing.

Thank you very much for help !!