Remove files after successul encoding & streaming
This commit is contained in:
1 parent
ccf1d7aee0
commit
df64174631
3 files changed
+8
-7
No files matched your search
@@ -19,6 +19,6 @@ RestreamSG) rtmp=rtmp://singapore.restream.io/live/$key ;;
|
||||
esac
|
||||
|
||||
set -o pipefail # to get ffmpeg's returncode
|
||||
! ffmpeg -re -y -i $in -c:v copy -c:a copy -f flv "$rtmp" |tail -n 20 >"$in.log" &&
|
||||
echo "Error while streaming $1" >>"$log" ||
|
||||
rm "$in.log" # Remove tailfile if no errors
|
||||
ffmpeg -re -y -i "$in" -c:v copy -c:a copy -f flv "$rtmp" |tail -n 20 >"$in.log" &&
|
||||
rm "$in.log" "$in" ||
|
||||
echo "Error while streaming $1" >>"$log"
|
||||
Reference in new issue
Block a user