From 7f7341a84176beb4516a6801e16e2eb36557c2c8 Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Sat, 9 May 2026 08:34:49 +0200 Subject: feat(core): verify output integrity before replacing original After ffmpeg exits successfully, run ffprobe against the temporary output file to confirm it is a valid, playable media file before replacing the original. If the probe fails the temporary file is removed and the encode is treated as a runtime failure, leaving the original untouched. This guards against cases where ffmpeg exits 0 but has written a truncated or corrupt container (e.g. due to a disk-full condition mid-write, a codec bug, or a preset producing an unreadable stream). The check is enabled by default and can be disabled via --no-verify-output or [encoding] verify_output = false in config.toml for large batch jobs on trusted encoders where the extra ffprobe round-trip is undesirable. The --continue flag is honoured: a failed integrity check counts as a runtime failure for the purposes of deciding whether to proceed to the next file. Docs, man page, bash completion, and README updated accordingly. --- transcode.sh.bash-completion | 2 ++ 1 file changed, 2 insertions(+) (limited to 'transcode.sh.bash-completion') diff --git a/transcode.sh.bash-completion b/transcode.sh.bash-completion index 558cf09..9fc4701 100644 --- a/transcode.sh.bash-completion +++ b/transcode.sh.bash-completion @@ -120,6 +120,8 @@ _transcode_sh() { local longopts=' --continue --no-continue + --verify-output + --no-verify-output --config-file --config-file= --encode-file -- cgit v1.3.1