Motion-Project / motion

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

Since I updated from version 4.3.2 to 4.5.1 I'm getting the error "ffmpeg_set_outputfile: Permission denied" #1761

Closed random3456345 closed 5 months ago

random3456345 commented 5 months ago

Did you read the guide?

Yes

What is the base version number of Motion being used?

4.5.x

What was the install method?

Installed via package tool

What is base architecture?

ARM-64bit

What is the distro being used?

Raspbian

Disto version number

Bookworm

Camera type(s) being used?

Network camera with RTSP

Describe the issue/problem and steps to reproduce

Since I updated from version 4.3.2 to 4.5.1 I'm getting the error "ffmpeg_set_outputfile: Permission denied" . Motion is running as the user motion (as shown by the command sudo ps -U motion -u motion u) and motion has ownership and full permission of the target_dir. I even tried with motion's own home directory: /var/lib/motion

A secondary problem is that movement is almost never triggered, even with threshold 300 instead of 3000.

Looking at the logs I notice motion attempts to save videos in /mnt/element/ instead of /var/lib/motion/.

Motion log output at log_level 8

[0:motion] [NTC] [ALL] [Mar 25 13:17:37] motion_startup: Motion 4.5.1 Started
[0:motion] [NTC] [ALL] [Mar 25 13:17:37] motion_startup: Using default log type (ALL)
[0:motion] [NTC] [ALL] [Mar 25 13:17:37] motion_startup: Using log type (ALL) log level (DBG)
[0:motion] [INF] [ALL] [Mar 25 13:17:37] conf_output_parms: Writing configuration parameters from all files (1):
[0:motion] [INF] [ALL] [Mar 25 13:17:37] Thread 0 - Config file: /etc/motion/motion.conf
[0:motion] [INF] [ALL] [Mar 25 13:17:37] daemon                    off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] setup_mode                off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] pid_file                  
[0:motion] [INF] [ALL] [Mar 25 13:17:37] log_file                  /var/log/motion/motion.log
[0:motion] [INF] [ALL] [Mar 25 13:17:37] log_level                 8
[0:motion] [INF] [ALL] [Mar 25 13:17:37] log_type                  ALL
[0:motion] [INF] [ALL] [Mar 25 13:17:37] quiet                     on
[0:motion] [INF] [ALL] [Mar 25 13:17:37] native_language           on
[0:motion] [INF] [ALL] [Mar 25 13:17:37] watchdog_tmo              30
[0:motion] [INF] [ALL] [Mar 25 13:17:37] watchdog_kill             10
[0:motion] [INF] [ALL] [Mar 25 13:17:37] camera_name               Facade
[0:motion] [INF] [ALL] [Mar 25 13:17:37] camera_id                 0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] target_dir                /var/lib/motion/
[0:motion] [INF] [ALL] [Mar 25 13:17:37] video_device              /dev/video0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] video_params              
[0:motion] [INF] [ALL] [Mar 25 13:17:37] auto_brightness           0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] tuner_device              
[0:motion] [INF] [ALL] [Mar 25 13:17:37] roundrobin_frames         1
[0:motion] [INF] [ALL] [Mar 25 13:17:37] roundrobin_skip           1
[0:motion] [INF] [ALL] [Mar 25 13:17:37] roundrobin_switchfilter   off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] netcam_url                <redacted>
[0:motion] [INF] [ALL] [Mar 25 13:17:37] netcam_params             
[0:motion] [INF] [ALL] [Mar 25 13:17:37] netcam_high_url           
[0:motion] [INF] [ALL] [Mar 25 13:17:37] netcam_high_params        
[0:motion] [INF] [ALL] [Mar 25 13:17:37] netcam_userpass           <redacted>
[0:motion] [INF] [ALL] [Mar 25 13:17:37] mmalcam_name              
[0:motion] [INF] [ALL] [Mar 25 13:17:37] mmalcam_params            
[0:motion] [INF] [ALL] [Mar 25 13:17:37] width                     640
[0:motion] [INF] [ALL] [Mar 25 13:17:37] height                    480
[0:motion] [INF] [ALL] [Mar 25 13:17:37] framerate                 29
[0:motion] [INF] [ALL] [Mar 25 13:17:37] minimum_frame_time        0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] rotate                    0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] flip_axis                 none
[0:motion] [INF] [ALL] [Mar 25 13:17:37] locate_motion_mode        off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] locate_motion_style       box
[0:motion] [INF] [ALL] [Mar 25 13:17:37] text_left                 
[0:motion] [INF] [ALL] [Mar 25 13:17:37] text_right                %Y-%m-%d\n%T-%q
[0:motion] [INF] [ALL] [Mar 25 13:17:37] text_changes              off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] text_scale                1
[0:motion] [INF] [ALL] [Mar 25 13:17:37] text_event                %Y%m%d%H%M%S
[0:motion] [INF] [ALL] [Mar 25 13:17:37] emulate_motion            off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] pause                     off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] threshold                 300
[0:motion] [INF] [ALL] [Mar 25 13:17:37] threshold_maximum         0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] threshold_tune            off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] noise_level               200
[0:motion] [INF] [ALL] [Mar 25 13:17:37] noise_tune                on
[0:motion] [INF] [ALL] [Mar 25 13:17:37] despeckle_filter          EedDl
[0:motion] [INF] [ALL] [Mar 25 13:17:37] area_detect               
[0:motion] [INF] [ALL] [Mar 25 13:17:37] mask_file                 
[0:motion] [INF] [ALL] [Mar 25 13:17:37] mask_privacy              
[0:motion] [INF] [ALL] [Mar 25 13:17:37] smart_mask_speed          0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] lightswitch_percent       50
[0:motion] [INF] [ALL] [Mar 25 13:17:37] lightswitch_frames        5
[0:motion] [INF] [ALL] [Mar 25 13:17:37] minimum_motion_frames     1
[0:motion] [INF] [ALL] [Mar 25 13:17:37] event_gap                 180
[0:motion] [INF] [ALL] [Mar 25 13:17:37] pre_capture               200
[0:motion] [INF] [ALL] [Mar 25 13:17:37] post_capture              900
[0:motion] [INF] [ALL] [Mar 25 13:17:37] on_event_start            
[0:motion] [INF] [ALL] [Mar 25 13:17:37] on_event_end              
[0:motion] [INF] [ALL] [Mar 25 13:17:37] on_picture_save           
[0:motion] [INF] [ALL] [Mar 25 13:17:37] on_area_detected          
[0:motion] [INF] [ALL] [Mar 25 13:17:37] on_motion_detected        
[0:motion] [INF] [ALL] [Mar 25 13:17:37] on_movie_start            
[0:motion] [INF] [ALL] [Mar 25 13:17:37] on_movie_end              
[0:motion] [INF] [ALL] [Mar 25 13:17:37] on_camera_lost            
[0:motion] [INF] [ALL] [Mar 25 13:17:37] on_camera_found           
[0:motion] [INF] [ALL] [Mar 25 13:17:37] picture_output            off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] picture_output_motion     off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] picture_type              jpeg
[0:motion] [INF] [ALL] [Mar 25 13:17:37] picture_quality           75
[0:motion] [INF] [ALL] [Mar 25 13:17:37] picture_exif              
[0:motion] [INF] [ALL] [Mar 25 13:17:37] picture_filename          %v-%Y%m%d%H%M%S-%q
[0:motion] [INF] [ALL] [Mar 25 13:17:37] snapshot_interval         0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] snapshot_filename         %v-%Y%m%d%H%M%S-snapshot
[0:motion] [INF] [ALL] [Mar 25 13:17:37] movie_output              on
[0:motion] [INF] [ALL] [Mar 25 13:17:37] movie_output_motion       off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] movie_max_time            360
[0:motion] [INF] [ALL] [Mar 25 13:17:37] movie_bps                 400000
[0:motion] [INF] [ALL] [Mar 25 13:17:37] movie_quality             50
[0:motion] [INF] [ALL] [Mar 25 13:17:37] movie_codec               mkv
[0:motion] [INF] [ALL] [Mar 25 13:17:37] movie_duplicate_frames    off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] movie_passthrough         off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] movie_filename            Facade_%t%v_%Y-%m-%d_%H-%M-%S
[0:motion] [INF] [ALL] [Mar 25 13:17:37] movie_extpipe_use         off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] movie_extpipe             
[0:motion] [INF] [ALL] [Mar 25 13:17:37] timelapse_interval        0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] timelapse_mode            daily
[0:motion] [INF] [ALL] [Mar 25 13:17:37] timelapse_fps             30
[0:motion] [INF] [ALL] [Mar 25 13:17:37] timelapse_codec           mpg
[0:motion] [INF] [ALL] [Mar 25 13:17:37] timelapse_filename        %Y%m%d-timelapse
[0:motion] [INF] [ALL] [Mar 25 13:17:37] video_pipe                
[0:motion] [INF] [ALL] [Mar 25 13:17:37] video_pipe_motion         
[0:motion] [INF] [ALL] [Mar 25 13:17:37] webcontrol_port           8080
[0:motion] [INF] [ALL] [Mar 25 13:17:37] webcontrol_ipv6           off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] webcontrol_localhost      off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] webcontrol_parms          0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] webcontrol_interface      0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] webcontrol_auth_method    0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] webcontrol_authentication 
[0:motion] [INF] [ALL] [Mar 25 13:17:37] webcontrol_tls            off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] webcontrol_cert           
[0:motion] [INF] [ALL] [Mar 25 13:17:37] webcontrol_key            
[0:motion] [INF] [ALL] [Mar 25 13:17:37] webcontrol_header_params  
[0:motion] [INF] [ALL] [Mar 25 13:17:37] webcontrol_lock_minutes   5
[0:motion] [INF] [ALL] [Mar 25 13:17:37] webcontrol_lock_attempts  5
[0:motion] [INF] [ALL] [Mar 25 13:17:37] webcontrol_lock_max_ips   25
[0:motion] [INF] [ALL] [Mar 25 13:17:37] stream_port               8081
[0:motion] [INF] [ALL] [Mar 25 13:17:37] stream_localhost          off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] stream_auth_method        0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] stream_authentication     
[0:motion] [INF] [ALL] [Mar 25 13:17:37] stream_tls                off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] stream_header_params      
[0:motion] [INF] [ALL] [Mar 25 13:17:37] stream_preview_scale      25
[0:motion] [INF] [ALL] [Mar 25 13:17:37] stream_preview_newline    off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] stream_preview_method     0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] stream_quality            50
[0:motion] [INF] [ALL] [Mar 25 13:17:37] stream_grey               off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] stream_motion             off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] stream_maxrate            1
[0:motion] [INF] [ALL] [Mar 25 13:17:37] stream_limit              0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] database_type             
[0:motion] [INF] [ALL] [Mar 25 13:17:37] database_dbname           
[0:motion] [INF] [ALL] [Mar 25 13:17:37] database_host             localhost
[0:motion] [INF] [ALL] [Mar 25 13:17:37] database_port             0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] database_user             
[0:motion] [INF] [ALL] [Mar 25 13:17:37] database_password         
[0:motion] [INF] [ALL] [Mar 25 13:17:37] database_busy_timeout     0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] sql_log_picture           off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] sql_log_snapshot          off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] sql_log_movie             off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] sql_log_timelapse         off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] sql_query_start           
[0:motion] [INF] [ALL] [Mar 25 13:17:37] sql_query_stop            
[0:motion] [INF] [ALL] [Mar 25 13:17:37] sql_query                 
[0:motion] [INF] [ALL] [Mar 25 13:17:37] track_type                0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] track_auto                off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] track_port                
[0:motion] [INF] [ALL] [Mar 25 13:17:37] track_motorx              0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] track_motorx_reverse      off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] track_motory              0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] track_motory_reverse      off
[0:motion] [INF] [ALL] [Mar 25 13:17:37] track_maxx                0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] track_minx                0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] track_maxy                0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] track_miny                0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] track_homex               128
[0:motion] [INF] [ALL] [Mar 25 13:17:37] track_homey               128
[0:motion] [INF] [ALL] [Mar 25 13:17:37] track_iomojo_id           0
[0:motion] [INF] [ALL] [Mar 25 13:17:37] track_step_angle_x        10
[0:motion] [INF] [ALL] [Mar 25 13:17:37] track_step_angle_y        10
[0:motion] [INF] [ALL] [Mar 25 13:17:37] track_move_wait           10
[0:motion] [INF] [ALL] [Mar 25 13:17:37] track_speed               255
[0:motion] [INF] [ALL] [Mar 25 13:17:37] track_stepsize            40
[0:motion] [INF] [ALL] [Mar 25 13:17:37] track_generic_move        
[0:motion] [INF] [ALL] [Mar 25 13:17:37] camera                    
[0:motion] [INF] [ALL] [Mar 25 13:17:37] camera_dir                
[0:motion] [DBG] [ALL] [Mar 25 13:17:37] motion_ntc: v4l2   : available
[0:motion] [DBG] [ALL] [Mar 25 13:17:37] motion_ntc: bktr   : not available
[0:motion] [DBG] [ALL] [Mar 25 13:17:37] motion_ntc: webp   : not available
[0:motion] [DBG] [ALL] [Mar 25 13:17:37] motion_ntc: mmal   : not available
[0:motion] [DBG] [ALL] [Mar 25 13:17:37] motion_ntc: ffmpeg : available
[0:motion] [DBG] [DBL] [Mar 25 13:17:37] motion_ntc: mysql  : available
[0:motion] [DBG] [DBL] [Mar 25 13:17:37] motion_ntc: MariaDB: available
[0:motion] [DBG] [DBL] [Mar 25 13:17:37] motion_ntc: sqlite3: available
[0:motion] [DBG] [DBL] [Mar 25 13:17:37] motion_ntc: pgsql  : available
[0:motion] [DBG] [DBL] [Mar 25 13:17:37] motion_ntc: nls    : available
[0:motion] [NTC] [STR] [Mar 25 13:17:37] webu_start_strm: Starting all camera streams on port 8081
[0:motion] [DBG] [STR] [Mar 25 13:17:37] webu_mhd_features_basic: Basic authentication: available
[0:motion] [DBG] [STR] [Mar 25 13:17:37] webu_mhd_features_digest: Digest authentication: available
[0:motion] [DBG] [STR] [Mar 25 13:17:37] webu_mhd_features_ipv6: IPV6: available
[0:motion] [DBG] [STR] [Mar 25 13:17:37] webu_mhd_features_tls: SSL/TLS: available
[0:motion] [NTC] [STR] [Mar 25 13:17:37] webu_start_strm: Unable to start stream for camera 0
[0:motion] [NTC] [STR] [Mar 25 13:17:37] webu_start_ctrl: Starting webcontrol on port 8080
[0:motion] [DBG] [STR] [Mar 25 13:17:37] webu_mhd_features_basic: Basic authentication: available
[0:motion] [DBG] [STR] [Mar 25 13:17:37] webu_mhd_features_digest: Digest authentication: available
[0:motion] [DBG] [STR] [Mar 25 13:17:37] webu_mhd_features_ipv6: IPV6: available
[0:motion] [DBG] [STR] [Mar 25 13:17:37] webu_mhd_features_tls: SSL/TLS: available
[0:motion] [NTC] [STR] [Mar 25 13:17:37] webu_start_ctrl: Unable to start MHD
[0:motion] [NTC] [ENC] [Mar 25 13:17:37] ffmpeg_global_init: ffmpeg libavcodec version 59.37.100 libavformat version 59.27.100
[0:motion] [DBG] [DBL] [Mar 25 13:17:37] dbse_global_init: Initializing database
[0:motion] [NTC] [ALL] [Mar 25 13:17:37] translate_init: Language: English
[0:motion] [NTC] [ALL] [Mar 25 13:17:37] motion_start_thread: Camera ID: 0 is from /etc/motion/motion.conf
[0:motion] [NTC] [ALL] [Mar 25 13:17:37] motion_start_thread: Camera ID: 0 Camera Name: Facade Service: rtsp:
[0:motion] [NTC] [ALL] [Mar 25 13:17:37] main: Waiting for threads to finish, pid: 14521
[1:ml1:Facade] [NTC] [ALL] [Mar 25 13:17:37] motion_init: Camera 0 started: motion detection Enabled
[1:ml1:Facade] [NTC] [VID] [Mar 25 13:17:37] vid_start: Opening Netcam RTSP
[1:ml1:Facade] [INF] [NET] [Mar 25 13:17:37] netcam_rtsp_set_parms: Setting up norm stream.
[1:ml1:Facade] [DBG] [ALL] [Mar 25 13:17:37] util_parms_add: Parsed: >decoder< >NULL<
[1:ml1:Facade] [INF] [NET] [Mar 25 13:17:37] netcam_rtsp_set_path: Setting up rtsp via netcam
[1:ml1:Facade] [INF] [NET] [Mar 25 13:17:37] netcam_rtsp_set_options: norm: Setting rtsp/rtmp
[1:ml1:Facade] [DBG] [ALL] [Mar 25 13:17:37] util_parms_add: Parsed: >rtsp_transport< >tcp<
[1:ml1:Facade] [DBG] [ALL] [Mar 25 13:17:37] util_parms_add: Parsed: >allowed_media_types< >video<
[1:ml1:Facade] [INF] [NET] [Mar 25 13:17:37] netcam_rtsp_set_options: norm: option: rtsp_transport = tcp
[1:ml1:Facade] [INF] [NET] [Mar 25 13:17:37] netcam_rtsp_set_options: norm: option: allowed_media_types = video
[1:ml1:Facade] [INF] [NET] [Mar 25 13:17:38] netcam_rtsp_open_context: norm: Opened camera(Facade)
[1:av0:Facade] [INF] [NET] [Mar 25 13:17:44] netcam_hwdecoders: norm: HW Devices: 
[1:av0:Facade] [INF] [NET] [Mar 25 13:17:44] netcam_hwdecoders: norm: vdpau (not implemented)
[1:av0:Facade] [INF] [NET] [Mar 25 13:17:44] netcam_hwdecoders: norm: cuda (available)
[1:av0:Facade] [INF] [NET] [Mar 25 13:17:44] netcam_hwdecoders: norm: vaapi (available)
[1:av0:Facade] [INF] [NET] [Mar 25 13:17:44] netcam_hwdecoders: norm: drm (not implemented)
[1:av0:Facade] [INF] [NET] [Mar 25 13:17:44] netcam_hwdecoders: norm: opencl (not implemented)
[1:av0:Facade] [INF] [NET] [Mar 25 13:17:44] netcam_hwdecoders: norm: vulkan (not implemented)
[1:av0:Facade] [INF] [NET] [Mar 25 13:17:44] netcam_init_swdecoder: norm: Initializing decoder
[1:av0:Facade] [INF] [NET] [Mar 25 13:17:44] netcam_rtsp_open_codec: norm: Decoder opened
[1:ml1:Facade] [DBG] [NET] [Mar 25 13:17:44] netcam_check_buffsize: expanding buffer from [0/0] to [0/462848] bytes.
[1:ml1:Facade] [INF] [NET] Above message repeats 1 times
[1:ml1:Facade] [INF] [NET] [Mar 25 13:17:44] netcam_rtsp_read_image: norm: capture_rate not specified in netcam_params. Using 11
[1:ml1:Facade] [DBG] [NET] [Mar 25 13:17:44] netcam_check_buffsize: expanding buffer from [460800/462848] to [460800/921600] bytes.
[1:ml1:Facade] [NTC] [ALL] Above message repeats 1 times
[1:ml1:Facade] [NTC] [ALL] [Mar 25 13:17:44] image_ring_resize: Resizing pre_capture buffer to 1 items
[2:nc2:Facade] [NTC] [NET] Above message repeats 1 times
[2:nc2:Facade] [NTC] [NET] [Mar 25 13:17:44] netcam_rtsp_handler: norm: Camera handler thread [2] started
[2:nc2:Facade] [INF] [NET] [Mar 25 13:17:44] netcam_rtsp_set_options: norm: Setting rtsp/rtmp
[2:nc2:Facade] [INF] [NET] [Mar 25 13:17:45] netcam_rtsp_open_context: norm: Opened camera(Facade)
[2:av2:Facade] [INF] [NET] [Mar 25 13:17:48] netcam_init_swdecoder: norm: Initializing decoder
[2:av2:Facade] [INF] [NET] [Mar 25 13:17:48] netcam_rtsp_open_codec: norm: Decoder opened
[2:nc2:Facade] [NTC] [NET] [Mar 25 13:17:48] netcam_rtsp_connect: norm: Camera (Facade) connected
[2:nc2:Facade] [INF] [NET] [Mar 25 13:17:48] netcam_rtsp_connect: norm: Netcam capture_rate is 11.
[2:nc2:Facade] [INF] [NET] [Mar 25 13:17:48] netcam_rtsp_connect: norm: Camera source is 10 FPS
[1:ml1:Facade] [NTC] [ALL] [Mar 25 13:17:48] image_ring_resize: Resizing pre_capture buffer to 201 items
[1:ml1:Facade] [ERR] [ENC] [Mar 25 13:23:16] ffmpeg_set_outputfile: Permission denied. /mnt/element/Facade_002_2024-03-25_13-23-16.mkv: Permission denied
[1:ml1:Facade] [ERR] [ENC] [Mar 25 13:23:16] ffmpeg_open: Could not set the stream
[1:ml1:Facade] [ERR] [EVT] [Mar 25 13:23:16] event_ffmpeg_newfile: Error opening context for movie output.
[1:ml1:Facade] [NTC] [ALL] [Mar 25 13:24:41] motion_loop: Thread exiting
[1:ml1:Facade] [INF] [VID] [Mar 25 13:24:41] vid_close: calling netcam_rtsp_cleanup
[1:ml1:Facade] [INF] [NET] [Mar 25 13:24:41] netcam_rtsp_cleanup: norm: Shutting down network camera.
[2:nc2:Facade] [INF] [NET] [Mar 25 13:24:41] netcam_rtsp_handler: norm: Handler loop finished.
[2:nc2:Facade] [INF] [NET] [Mar 25 13:24:42] netcam_rtsp_handler: netcam camera handler: finish set, exiting
[1:ml1:Facade] [NTC] [NET] [Mar 25 13:24:43] netcam_rtsp_cleanup: Normal resolution: Shut down complete.
[0:motion] [NTC] [ALL] [Mar 25 13:24:44] main: Threads finished
[0:motion] [NTC] [ALL] [Mar 25 13:24:44] main: Motion terminating
[0:motion] [NTC] [ALL] [Mar 25 13:24:44] motion_remove_pid: Closing logfile (/var/log/motion/motion.log).
tosiara commented 5 months ago

how do you start motion? is /mnt/element/ current workdir? is there another instance o motion running? Unable to start MHD

random3456345 commented 5 months ago

how do you start motion? is /mnt/element/ current workdir? is there another instance o motion running? Unable to start MHD

I usually use systemctl start/stop motion or service motion start/stop but I also used the motion command. I thought systemctl stop would stop motion but the ps command says other motion instances are still running. Let me stop them and try again. /mnt/element/ is the directory I normally use. workdir is presently /var/lib/motion/ as shown in the log above.

random3456345 commented 5 months ago

So far motion does not detect any movement. It's definitely not normal. The last line in the log is "netcam_rtsp_connect: norm: Camera source is 10 FPS"

tosiara commented 5 months ago

Kill all running motions, verify it is not running using ps, comment out logging in your config, then run "motion -c myconfig.conf -d 9 -n" and copy here the output from the console

random3456345 commented 5 months ago

Kill all running motions, verify it is not running using ps, comment out logging in your config, then run "motion -c myconfig.conf -d 9 -n" and copy here the output from the console

To edit my last comment, there are videos that were written in /var/lib/motion/ when I was not looking, so at least I know it can work. Right now I have reverted to my original /mnt/element/ workdir. As you can see, nothing was captured while a lot of movement happened.

[0:motion] [NTC] [ALL] conf_load: Processing thread 0 - config file /etc/motion/motion.conf [0:motion] [NTC] [ALL] motion_startup: Logging to syslog [0:motion] [NTC] [ALL] motion_startup: Motion 4.5.1 Started [0:motion] [NTC] [ALL] motion_startup: Using default log type (ALL) [0:motion] [NTC] [ALL] motion_startup: Using log type (ALL) log level (ALL) [0:motion] [INF] [ALL] conf_output_parms: Writing configuration parameters from all files (1): [0:motion] [INF] [ALL] Thread 0 - Config file: /etc/motion/motion.conf [0:motion] [INF] [ALL] daemon off [0:motion] [INF] [ALL] setup_mode off [0:motion] [INF] [ALL] pid_file
[0:motion] [INF] [ALL] log_file
[0:motion] [INF] [ALL] log_level 9 [0:motion] [INF] [ALL] log_type ALL [0:motion] [INF] [ALL] quiet on [0:motion] [INF] [ALL] native_language on [0:motion] [INF] [ALL] watchdog_tmo 30 [0:motion] [INF] [ALL] watchdog_kill 10 [0:motion] [INF] [ALL] camera_name Facade [0:motion] [INF] [ALL] camera_id 0 [0:motion] [INF] [ALL] target_dir /mnt/element [0:motion] [INF] [ALL] video_device /dev/video0 [0:motion] [INF] [ALL] video_params
[0:motion] [INF] [ALL] auto_brightness 0 [0:motion] [INF] [ALL] tuner_device
[0:motion] [INF] [ALL] roundrobin_frames 1 [0:motion] [INF] [ALL] roundrobin_skip 1 [0:motion] [INF] [ALL] roundrobin_switchfilter off [0:motion] [INF] [ALL] netcam_url [0:motion] [INF] [ALL] netcam_params
[0:motion] [INF] [ALL] netcam_high_url
[0:motion] [INF] [ALL] netcam_high_params
[0:motion] [INF] [ALL] netcam_userpass [0:motion] [INF] [ALL] mmalcam_name
[0:motion] [INF] [ALL] mmalcam_params
[0:motion] [INF] [ALL] width 640 [0:motion] [INF] [ALL] height 480 [0:motion] [INF] [ALL] framerate 10 [0:motion] [INF] [ALL] minimum_frame_time 0 [0:motion] [INF] [ALL] rotate 0 [0:motion] [INF] [ALL] flip_axis none [0:motion] [INF] [ALL] locate_motion_mode off [0:motion] [INF] [ALL] locate_motion_style box [0:motion] [INF] [ALL] text_left
[0:motion] [INF] [ALL] text_right %Y-%m-%d\n%T-%q [0:motion] [INF] [ALL] text_changes off [0:motion] [INF] [ALL] text_scale 1 [0:motion] [INF] [ALL] text_event %Y%m%d%H%M%S [0:motion] [INF] [ALL] emulate_motion off [0:motion] [INF] [ALL] pause off [0:motion] [INF] [ALL] threshold 300 [0:motion] [INF] [ALL] threshold_maximum 0 [0:motion] [INF] [ALL] threshold_tune off [0:motion] [INF] [ALL] noise_level 200 [0:motion] [INF] [ALL] noise_tune on [0:motion] [INF] [ALL] despeckle_filter EedDl [0:motion] [INF] [ALL] area_detect
[0:motion] [INF] [ALL] mask_file
[0:motion] [INF] [ALL] mask_privacy
[0:motion] [INF] [ALL] smart_mask_speed 0 [0:motion] [INF] [ALL] lightswitch_percent 50 [0:motion] [INF] [ALL] lightswitch_frames 5 [0:motion] [INF] [ALL] minimum_motion_frames 1 [0:motion] [INF] [ALL] event_gap 180 [0:motion] [INF] [ALL] pre_capture 200 [0:motion] [INF] [ALL] post_capture 900 [0:motion] [INF] [ALL] on_event_start
[0:motion] [INF] [ALL] on_event_end
[0:motion] [INF] [ALL] on_picture_save
[0:motion] [INF] [ALL] on_area_detected
[0:motion] [INF] [ALL] on_motion_detected
[0:motion] [INF] [ALL] on_movie_start
[0:motion] [INF] [ALL] on_movie_end
[0:motion] [INF] [ALL] on_camera_lost
[0:motion] [INF] [ALL] on_camera_found
[0:motion] [INF] [ALL] picture_output off [0:motion] [INF] [ALL] picture_output_motion off [0:motion] [INF] [ALL] picture_type jpeg [0:motion] [INF] [ALL] picture_quality 75 [0:motion] [INF] [ALL] picture_exif
[0:motion] [INF] [ALL] picture_filename %v-%Y%m%d%H%M%S-%q [0:motion] [INF] [ALL] snapshot_interval 0 [0:motion] [INF] [ALL] snapshot_filename %v-%Y%m%d%H%M%S-snapshot [0:motion] [INF] [ALL] movie_output on [0:motion] [INF] [ALL] movie_output_motion off [0:motion] [INF] [ALL] movie_max_time 360 [0:motion] [INF] [ALL] movie_bps 400000 [0:motion] [INF] [ALL] movie_quality 50 [0:motion] [INF] [ALL] movie_codec mkv [0:motion] [INF] [ALL] movie_duplicate_frames off [0:motion] [INF] [ALL] movie_passthrough off [0:motion] [INF] [ALL] moviefilename Facade%t%v%Y-%m-%d%H-%M-%S [0:motion] [INF] [ALL] movie_extpipe_use off [0:motion] [INF] [ALL] movie_extpipe
[0:motion] [INF] [ALL] timelapse_interval 0 [0:motion] [INF] [ALL] timelapse_mode daily [0:motion] [INF] [ALL] timelapse_fps 30 [0:motion] [INF] [ALL] timelapse_codec mpg [0:motion] [INF] [ALL] timelapse_filename %Y%m%d-timelapse [0:motion] [INF] [ALL] video_pipe
[0:motion] [INF] [ALL] video_pipe_motion
[0:motion] [INF] [ALL] webcontrol_port 8080 [0:motion] [INF] [ALL] webcontrol_ipv6 off [0:motion] [INF] [ALL] webcontrol_localhost off [0:motion] [INF] [ALL] webcontrol_parms 0 [0:motion] [INF] [ALL] webcontrol_interface 0 [0:motion] [INF] [ALL] webcontrol_auth_method 0 [0:motion] [INF] [ALL] webcontrol_authentication [0:motion] [INF] [ALL] webcontrol_tls off [0:motion] [INF] [ALL] webcontrol_cert
[0:motion] [INF] [ALL] webcontrol_key
[0:motion] [INF] [ALL] webcontrol_header_params
[0:motion] [INF] [ALL] webcontrol_lock_minutes 5 [0:motion] [INF] [ALL] webcontrol_lock_attempts 5 [0:motion] [INF] [ALL] webcontrol_lock_max_ips 25 [0:motion] [INF] [ALL] stream_port 8081 [0:motion] [INF] [ALL] stream_localhost off [0:motion] [INF] [ALL] stream_auth_method 0 [0:motion] [INF] [ALL] stream_authentication
[0:motion] [INF] [ALL] stream_tls off [0:motion] [INF] [ALL] stream_header_params
[0:motion] [INF] [ALL] stream_preview_scale 25 [0:motion] [INF] [ALL] stream_preview_newline off [0:motion] [INF] [ALL] stream_preview_method 0 [0:motion] [INF] [ALL] stream_quality 50 [0:motion] [INF] [ALL] stream_grey off [0:motion] [INF] [ALL] stream_motion off [0:motion] [INF] [ALL] stream_maxrate 1 [0:motion] [INF] [ALL] stream_limit 0 [0:motion] [INF] [ALL] database_type
[0:motion] [INF] [ALL] database_dbname
[0:motion] [INF] [ALL] database_host localhost [0:motion] [INF] [ALL] database_port 0 [0:motion] [INF] [ALL] database_user
[0:motion] [INF] [ALL] database_password
[0:motion] [INF] [ALL] database_busy_timeout 0 [0:motion] [INF] [ALL] sql_log_picture off [0:motion] [INF] [ALL] sql_log_snapshot off [0:motion] [INF] [ALL] sql_log_movie off [0:motion] [INF] [ALL] sql_log_timelapse off [0:motion] [INF] [ALL] sql_query_start
[0:motion] [INF] [ALL] sql_query_stop
[0:motion] [INF] [ALL] sql_query
[0:motion] [INF] [ALL] track_type 0 [0:motion] [INF] [ALL] track_auto off [0:motion] [INF] [ALL] track_port
[0:motion] [INF] [ALL] track_motorx 0 [0:motion] [INF] [ALL] track_motorx_reverse off [0:motion] [INF] [ALL] track_motory 0 [0:motion] [INF] [ALL] track_motory_reverse off [0:motion] [INF] [ALL] track_maxx 0 [0:motion] [INF] [ALL] track_minx 0 [0:motion] [INF] [ALL] track_maxy 0 [0:motion] [INF] [ALL] track_miny 0 [0:motion] [INF] [ALL] track_homex 128 [0:motion] [INF] [ALL] track_homey 128 [0:motion] [INF] [ALL] track_iomojo_id 0 [0:motion] [INF] [ALL] track_step_angle_x 10 [0:motion] [INF] [ALL] track_step_angle_y 10 [0:motion] [INF] [ALL] track_move_wait 10 [0:motion] [INF] [ALL] track_speed 255 [0:motion] [INF] [ALL] track_stepsize 40 [0:motion] [INF] [ALL] track_generic_move
[0:motion] [INF] [ALL] camera
[0:motion] [INF] [ALL] camera_dir
[0:motion] [DBG] [ALL] motion_ntc: v4l2 : available [0:motion] [DBG] [ALL] motion_ntc: bktr : not available [0:motion] [DBG] [ALL] motion_ntc: webp : not available [0:motion] [DBG] [ALL] motion_ntc: mmal : not available [0:motion] [DBG] [ALL] motion_ntc: ffmpeg : available [0:motion] [DBG] [DBL] motion_ntc: mysql : available [0:motion] [DBG] [DBL] motion_ntc: MariaDB: available [0:motion] [DBG] [DBL] motion_ntc: sqlite3: available [0:motion] [DBG] [DBL] motion_ntc: pgsql : available [0:motion] [DBG] [DBL] motion_ntc: nls : available [0:motion] [NTC] [STR] webu_start_strm: Starting all camera streams on port 8081 [0:motion] [DBG] [STR] webu_mhd_features_basic: Basic authentication: available [0:motion] [DBG] [STR] webu_mhd_features_digest: Digest authentication: available [0:motion] [DBG] [STR] webu_mhd_features_ipv6: IPV6: available [0:motion] [DBG] [STR] webu_mhd_features_tls: SSL/TLS: available [0:motion] [NTC] [STR] webu_strm_ntc: Started camera 0 stream on port 8081 [0:motion] [NTC] [STR] webu_start_ctrl: Starting webcontrol on port 8080 [0:motion] [DBG] [STR] webu_mhd_features_basic: Basic authentication: available [0:motion] [DBG] [STR] webu_mhd_features_digest: Digest authentication: available [0:motion] [DBG] [STR] webu_mhd_features_ipv6: IPV6: available [0:motion] [DBG] [STR] webu_mhd_features_tls: SSL/TLS: available [0:motion] [NTC] [STR] webu_start_ctrl: Started webcontrol on port 8080 [0:motion] [NTC] [ENC] ffmpeg_global_init: ffmpeg libavcodec version 59.37.100 libavformat version 59.27.100 [0:motion] [DBG] [DBL] dbse_global_init: Initializing database [0:motion] [NTC] [ALL] translate_init: Language: English [0:motion] [NTC] [ALL] motion_start_thread: Camera ID: 0 is from /etc/motion/motion.conf [0:motion] [NTC] [ALL] motion_start_thread: Camera ID: 0 Camera Name: Facade Service: rtsp: [0:motion] [NTC] [ALL] main: Waiting for threads to finish, pid: 29038 [1:ml1:Facade] [NTC] [ALL] motion_init: Camera 0 started: motion detection Enabled [1:ml1:Facade] [NTC] [VID] vid_start: Opening Netcam RTSP [1:ml1:Facade] [INF] [NET] netcam_rtsp_set_parms: Setting up norm stream. [1:ml1:Facade] [DBG] [ALL] util_parms_add: Parsed: >decoder< >NULL< [1:ml1:Facade] [INF] [NET] netcam_rtsp_set_path: Setting up rtsp via netcam [1:ml1:Facade] [INF] [NET] netcam_rtsp_set_options: norm: Setting rtsp/rtmp [1:ml1:Facade] [DBG] [ALL] util_parms_add: Parsed: >rtsp_transport< >tcp< [1:ml1:Facade] [DBG] [ALL] util_parms_add: Parsed: >allowed_media_types< >video< [1:ml1:Facade] [INF] [NET] netcam_rtsp_set_options: norm: option: rtsp_transport = tcp [1:ml1:Facade] [INF] [NET] netcam_rtsp_set_options: norm: option: allowed_media_types = video [1:ml1:Facade] [INF] [NET] netcam_rtsp_open_context: norm: Opened camera(Facade) [1:av0:Facade] [INF] [NET] netcam_hwdecoders: norm: HW Devices: [1:av0:Facade] [INF] [NET] netcam_hwdecoders: norm: vdpau (not implemented) [1:av0:Facade] [INF] [NET] netcam_hwdecoders: norm: cuda (available) [1:av0:Facade] [INF] [NET] netcam_hwdecoders: norm: vaapi (available) [1:av0:Facade] [INF] [NET] netcam_hwdecoders: norm: drm (not implemented) [1:av0:Facade] [INF] [NET] netcam_hwdecoders: norm: opencl (not implemented) [1:av0:Facade] [INF] [NET] netcam_hwdecoders: norm: vulkan (not implemented) [1:av0:Facade] [INF] [NET] netcam_init_swdecoder: norm: Initializing decoder [1:av0:Facade] [INF] [NET] netcam_rtsp_open_codec: norm: Decoder opened [1:ml1:Facade] [DBG] [NET] netcam_check_buffsize: expanding buffer from [0/0] to [0/462848] bytes. [1:ml1:Facade] [INF] [NET] Above message repeats 1 times [1:ml1:Facade] [INF] [NET] netcam_rtsp_read_image: norm: capture_rate not specified in netcam_params. Using 11 [1:ml1:Facade] [DBG] [NET] netcam_check_buffsize: expanding buffer from [460800/462848] to [460800/921600] bytes. [1:ml1:Facade] [NTC] [ALL] Above message repeats 1 times [1:ml1:Facade] [NTC] [ALL] image_ring_resize: Resizing pre_capture buffer to 1 items [2:nc2:Facade] [NTC] [NET] netcam_rtsp_handler: norm: Camera handler thread [2] started [2:nc2:Facade] [INF] [NET] netcam_rtsp_set_options: norm: Setting rtsp/rtmp [2:nc2:Facade] [INF] [NET] netcam_rtsp_open_context: norm: Opened camera(Facade) [2:av2:Facade] [INF] [NET] netcam_init_swdecoder: norm: Initializing decoder [2:av2:Facade] [INF] [NET] netcam_rtsp_open_codec: norm: Decoder opened [2:nc2:Facade] [NTC] [NET] netcam_rtsp_connect: norm: Camera (Facade) connected [2:nc2:Facade] [INF] [NET] netcam_rtsp_connect: norm: Netcam capture_rate is 11. [2:nc2:Facade] [INF] [NET] netcam_rtsp_connect: norm: Camera source is 10 FPS [1:ml1:Facade] [NTC] [ALL] image_ring_resize: Resizing pre_capture buffer to 201 items

random3456345 commented 5 months ago

I forgot to mention the upgrade from 4.3.2 to 4.5.1 happened when I upgraded my distribution from bullseye to bookworm.

random3456345 commented 5 months ago

I managed to trigger a capture by moving my hand right in front of the camera. Now the time appears twice in the saved video. Why? The new time overlay located in the upper left corner has "precap" and "postcap" underneath it and "trigger" alternatively when there is movement.

The permission issue is resolved. Now it's just a matter of understanding why my previous settings don't work anymore and removing the second time overlay.