add debug

This commit is contained in:
Antonio J. Delgado 2023-03-20 23:26:20 +02:00
parent 5b0b755331
commit 89bc0bbf52

View file

@ -235,6 +235,10 @@ if [ -n "${ntfy_server}" ]; then
if [ -n "${file}" ]; then if [ -n "${file}" ]; then
temp_file="$(mktemp /tmp/tmp.XXXXX.mkv)" temp_file="$(mktemp /tmp/tmp.XXXXX.mkv)"
$(which ffmpeg) -filter_complex "[0:v] fps=12,scale=480:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" -i "${file}" "${temp_file}" $(which ffmpeg) -filter_complex "[0:v] fps=12,scale=480:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse" -i "${file}" "${temp_file}"
return_code=$?
if [ ${return_code} != 0 ]; then
message "Error ${return_code} processing video file '${file}'"
fi
ntfy_data="{ \"topic\": \"motion_detection\", \"message\": \"Event ${event_type} on host ${motion_host} camera ${camera_name}\", \"filename\": \"${temp_file}\" }" ntfy_data="{ \"topic\": \"motion_detection\", \"message\": \"Event ${event_type} on host ${motion_host} camera ${camera_name}\", \"filename\": \"${temp_file}\" }"
curl -s "${ntfy_server}" -T "${temp_file}" -u "${ntfy_user}:${ntfy_password}" -d "${ntfy_data}" curl -s "${ntfy_server}" -T "${temp_file}" -u "${ntfy_user}:${ntfy_password}" -d "${ntfy_data}"
return_code=$? return_code=$?