Motion-Project / motionplus

MotionPlus Home Page: https://motion-project.github.io/
GNU General Public License v3.0
293 stars 38 forks source link

MotionPlus records a zero-length video if movie_passthrough is on #61

Closed buteomont closed 1 year ago

buteomont commented 1 year ago

Did you read the guide?

Yes

What is the base version number of MotionPlus being used?

0.1.x

What was the install method?

Built from source code

What is base architecture?

ARM-64bit

What is the distro being used?

Raspbian

Disto version number

bullseye

Camera/Sound type(s) being used?

Network camera with RTSP

Describe the issue/problem and steps to reproduce

I am having trouble with motionplus recording grainy video from some of my more high resolution cameras. I tried setting _moviepassthrough to on, and this causes a zero-length MP4 to be written to disk instead of the actual movie when an event occurs.

Relevant MotionPlus log output (at log_level 8)

Apr 23 11:13:34 [NTC][ALL][06:ml06:gate] mlp_detected_trigger: Motion detected - starting event 1
Apr 23 11:13:34 [DBG][ENC][06:ml06:gate] movie_passthru_streams_video: video timebase 1/90000 fps 0/0
Apr 23 11:13:34 [DBG][ENC][06:ml06:gate] movie_passthru_streams_audio: audio timebase 1/8000
Apr 23 11:13:34 [INF][ENC][06:ml06:gate] movie_avcodec_log: Could not find tag for codec pcm_alaw in stream #1, codec not currently supported in container
Apr 23 11:13:34 [ERR][ENC][06:ml06:gate] movie_set_outputfile: Could not write movie header Invalid argument
Apr 23 11:13:34 [ERR][ENC][06:ml06:gate] movie_passthru_open: Could not set the output file
Apr 23 11:13:34 [ERR][ENC][06:ml06:gate] movie_open: Could not setup passthrough!
Apr 23 11:13:34 [ERR][EVT][06:ml06:gate] event_movie_start: Error opening ctx_dev for movie output.
Apr 23 11:13:55 [NTC][EVT][06:ml06:gate] event_newfile: File saved to: /var/www/html/cams/gate/2023-04-23/7-01-20230423111333.jpg
Apr 23 11:13:55 [NTC][ALL][06:ml06:gate] mlp_actions_event: End of event 1
Mr-Dave commented 1 year ago

Yea....the invalid parameters for MP4 containers...need to delete the failed file when the camera codecs don't fit into MP4 containers.

You can try the following:

  1. You can try the mpv container for the passthrough with movie_container mkv
  2. You can make it video only with netcam_high_params allowed_media_types=video