Catch ffmpeg output in stream
This commit is contained in:
1 parent
d5443e9eaf
commit
c073d1790f
3 files changed
+3
-1
No files matched your search
@@ -20,7 +20,7 @@ esac
|
||||
|
||||
# Stream, log it, and remove all files if successful
|
||||
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" &&
|
||||
ffmpeg -re -y -i "$in" -c:v copy -c:a copy -f flv "$rtmp" 2>&1 |tail -n 20 >"$in.log" &&
|
||||
rm "$in.log" "$in" "${in%.mp4}" ||
|
||||
echo "Error while streaming $1" >>"$log"
|
||||
|
||||
|
||||
Reference in new issue
Block a user