From 625cabd5416e5e732a09c4ba475e55bb9ea4b314 Mon Sep 17 00:00:00 2001 From: sc-idevops Date: Sun, 10 Mar 2024 20:29:42 -0400 Subject: [PATCH] safe mode on --- scripts/server_bin/decode_local.sh | 5 +++-- scripts/server_bin/fps_cut_local.sh | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/server_bin/decode_local.sh b/scripts/server_bin/decode_local.sh index fe29ba0..801712b 100755 --- a/scripts/server_bin/decode_local.sh +++ b/scripts/server_bin/decode_local.sh @@ -1,5 +1,6 @@ #!/bin/bash for i in `fdfind -d=1 --extension=mp4`; do - snap run ffmpeg -hide_banner -hwaccel cuda -hwaccel_output_format cuda -i "$i" -c:a copy -c:v h264_nvenc "${i}_30.mp4" && \ - rm --verbose "$i" ; mv --verbose "${i}_30.mp4" "$i" + snap run ffmpeg -hide_banner -hwaccel cuda -hwaccel_output_format cuda -i "$i" -c:a copy -c:v h264_nvenc "${i}_30.mp4" + #safe mode on + #rm --verbose "$i" ; mv --verbose "${i}_30.mp4" "$i" done diff --git a/scripts/server_bin/fps_cut_local.sh b/scripts/server_bin/fps_cut_local.sh index c5c2aca..fc095b5 100755 --- a/scripts/server_bin/fps_cut_local.sh +++ b/scripts/server_bin/fps_cut_local.sh @@ -1,8 +1,8 @@ #!/bin/bash for i in `fdfind -d=1 --extension=mp4`; do if [[ (( $(ffprobe -show_streams "$i" 2>&1 | grep fps | awk '{split($0,a,"fps")}END{print a[1]}' | awk '{print $NF}') > 30 )) ]]; then - snap run ffmpeg -hide_banner -hwaccel cuda -hwaccel_output_format cuda -i "$i" -c:a copy -c:v h264_nvenc -filter:v fps=30 "${i}_30.mp4" && \ - rm --verbose "$i" ; mv --verbose "${i}_30.mp4" "$i" + snap run ffmpeg -hide_banner -hwaccel cuda -hwaccel_output_format cuda -i "$i" -c:a copy -c:v h264_nvenc -filter:v fps=30 "${i}_30.mp4" + # rm --verbose "$i" ; mv --verbose "${i}_30.mp4" "$i" else echo " << no edit for "$i"" fi