fixes for video scripts
This commit is contained in:
parent
aa41f5cc98
commit
ebb00fda95
|
@ -11,4 +11,4 @@ outfile="$dir/$filename""CutShrunk.mp4"
|
|||
|
||||
echo "$outfile"
|
||||
|
||||
ffmpeg -y -ss "$2" -to "$3" -i "$fullpath" -s ega "$outfile"
|
||||
ffmpeg -y -ss "$2" -to "$3" -i "$fullpath" -s vga "$outfile"
|
||||
|
|
|
@ -11,4 +11,4 @@ outfile="$dir/$filename""Shrunk.mp4"
|
|||
|
||||
echo "$outfile"
|
||||
|
||||
ffmpeg -y -i "$fullpath" -s ega "$outfile"
|
||||
ffmpeg -y -i "$fullpath" -s vga "$outfile"
|
||||
|
|
|
@ -16,7 +16,7 @@ outext=".mp4"
|
|||
splitduration="$2"
|
||||
probecmd="ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1"
|
||||
|
||||
duration=`$probecmd $fullpath`
|
||||
duration=`$probecmd "$fullpath"`
|
||||
n=`echo $duration $splitduration | awk '{print int($1/$2)+1}'`
|
||||
|
||||
i=0
|
||||
|
@ -24,11 +24,11 @@ while [ $i -le $n ]; do
|
|||
from=$(($i*$splitduration))
|
||||
to=$(($from+$splitduration))
|
||||
outfile="$outprefix$i$outext"
|
||||
ffmpeg -y -ss "$from" -to "$to" -i "$fullpath" -s ega "$outfile"
|
||||
ffmpeg -y -ss "$from" -to "$to" -i "$fullpath" -s vga "$outfile"
|
||||
i=$(($i+1))
|
||||
done
|
||||
|
||||
lastduration=`$probecmd $outfile`
|
||||
lastduration=`$probecmd "$outfile"`
|
||||
|
||||
if [ "$lastduration" == "0.000000" ]; then
|
||||
rm "$outfile"
|
||||
|
|
Loading…
Reference in New Issue
Block a user