Skip to content

Commit

Permalink
Update timelapse.sh: check for return code 137
Browse files Browse the repository at this point in the history
Fixes #4028 

For some reason, ffmpeg can be killed but we don't get a "Killed" message, but the return code is 137.  Check for that.
  • Loading branch information
EricClaeys authored Dec 12, 2024
1 parent b26345e commit 619e929
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/timelapse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,6 @@ X="$( ffmpeg -y -f image2 \
${EXTRA} \
"${OUTPUT_FILE}" 2>&1 )"
RET=$?

# The "deprecated..." message is useless and only confuses users, so hide it.
X="$( echo "${X}" | grep -E -v "deprecated pixel format used|Processed " )"
[[ -n ${X} ]] && echo "${X}" >> "${TMP}" # a warning/error message
Expand All @@ -327,6 +326,10 @@ if [[ ${RET} -ne -0 ]]; then
if X="$( echo "${TMP}" | grep -E -i "Killed ffmpeg|malloc of size" )" ; then
indent --spaces "${X}"
echo -e "See the 'Troubleshooting -> Timelapse' documentation page for a fix.\n"
elif [[ ${RET} -eq 137 ]]; then
# Sometimes the process is killed but we don't get a Killed message.
indent --spaces "Killed ffmpeg\n${X}"
echo -e "See the 'Troubleshooting -> Timelapse' documentation page for a fix.\n"
fi

indent --spaces "Output: $( < "${TMP}" )"
Expand Down

0 comments on commit 619e929

Please sign in to comment.