From 16cbdc124d448afd1264fa37b12bd8f0f1841fd8 Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Wed, 26 Nov 2025 14:45:30 -0500 Subject: updates --- roles/prerec/templates/reencode.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'roles/prerec/templates/reencode.sh') diff --git a/roles/prerec/templates/reencode.sh b/roles/prerec/templates/reencode.sh index 665fee2..ac5309a 100755 --- a/roles/prerec/templates/reencode.sh +++ b/roles/prerec/templates/reencode.sh @@ -10,6 +10,9 @@ print_only=false limit_resolution={{ res_y }} limit_fps={{ fps }} +output_final="${2:-$(echo $input | sed 's/--original.*/--reencoded.webm/')}" +output_temp="partial--${output_final}" # <-- New temporary name + while getopts :q:c:t:s OPT; do case $OPT in q|+q) @@ -47,7 +50,7 @@ ffmpeg -y -i "$input" $time_limit \ fps='$limit_fps'" \ -c:v libvpx-vp9 -b:v 0 -crf $q -c:a libopus \ -row-mt 1 -tile-columns 2 -tile-rows 2 -cpu-used $cpu \ - -pass 2 -threads $cpu -- "$output" + -pass 2 -threads $cpu -- "$output_temp" EOF )" @@ -55,4 +58,5 @@ if [ $print_only == true ]; then echo "$command" else eval "$command" + mv "$output_temp" "$output_final" fi -- cgit v1.2.3