overwrite and no pause

This commit is contained in:
Antonio J. Delgado 2023-03-20 23:42:42 +02:00
parent 3ae497d27b
commit d4b9cc3ee2

View file

@ -233,9 +233,8 @@ if [ -n "${ntfy_server}" ]; then
ntfy_password="$(cat "${ntfy_password_file}")" ntfy_password="$(cat "${ntfy_password_file}")"
message "Sending event to ntfy server '${ntfy_server}/motion_detection' ..." message "Sending event to ntfy server '${ntfy_server}/motion_detection' ..."
if [ -n "${file}" ]; then if [ -n "${file}" ]; then
sleep 3
temp_file="$(mktemp /tmp/tmp.XXXXX.mkv)" temp_file="$(mktemp /tmp/tmp.XXXXX.mkv)"
result=$(/usr/bin/ffmpeg -filter_complex '[0:v] fps=12,scale=480:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse' -i "${file}" "${temp_file}" 2>&1) result=$(/usr/bin/ffmpeg -y -filter_complex '[0:v] fps=12,scale=480:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse' -i "${file}" "${temp_file}" 2>&1)
return_code=$? return_code=$?
if [ ${return_code} != 0 ]; then if [ ${return_code} != 0 ]; then
message "Error ${return_code} processing video file '${file}'. ${result}" message "Error ${return_code} processing video file '${file}'. ${result}"