Catch last outputlines of ffmpeg
This commit is contained in:
parent
b3f304b9af
commit
127daec5a6
6
encode
6
encode
@ -55,9 +55,9 @@ start=$(date +'%Y-%m-%d at %H:%M:%S') error=0
|
||||
## Single pass
|
||||
#ffmpeg -y -i "$file" -c:v libx264 -x264opts no-scenecut -b:v 6M -force_key_frames 'expr:gte(t,n_forced*2)' -c:a copy -tune zerolatency -f mp4 "$video" ||
|
||||
# Double pass
|
||||
cd $(mktemp -d) # for the pass-1 logfile
|
||||
ffmpeg -y -i "$file" -c:v libx264 -x264opts no-scenecut -b:v 6M -maxrate 6M -bufsize 12M -force_key_frames 'expr:gte(t,n_forced*2)' -movflags faststart -c:a copy -tune zerolatency -pass 1 -passlogfile "$file" -f mp4 "$video" &&
|
||||
ffmpeg -y -i "$file" -c:v libx264 -x264opts no-scenecut -b:v 6M -maxrate 6M -bufsize 12M -force_key_frames 'expr:gte(t,n_forced*2)' -movflags faststart -c:a copy -tune zerolatency -pass 2 -passlogfile "$file" -f mp4 "$video" ||
|
||||
set -o pipefail # to get ffmpeg's returncode
|
||||
ffmpeg -y -i "$file" -c:v libx264 -x264opts no-scenecut -b:v 6M -maxrate 6M -bufsize 12M -force_key_frames 'expr:gte(t,n_forced*2)' -movflags faststart -c:a copy -tune zerolatency -pass 1 -passlogfile "$file" -f mp4 "$video" 2>&1 |tail >"$file.1log" &&
|
||||
ffmpeg -y -i "$file" -c:v libx264 -x264opts no-scenecut -b:v 6M -maxrate 6M -bufsize 12M -force_key_frames 'expr:gte(t,n_forced*2)' -movflags faststart -c:a copy -tune zerolatency -pass 2 -passlogfile "$file" -f mp4 "$video" 2>&1 |tail >"$file.2log" ||
|
||||
error=1
|
||||
|
||||
# Remove logfiles
|
||||
|
||||
Loading…
Reference in New Issue
Block a user