fixes for video scripts

master
gutmet 2023-01-01 17:53:22 +01:00
parent aa41f5cc98
commit ebb00fda95
3 changed files with 5 additions and 5 deletions

View File

@ -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"

View File

@ -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"

View File

@ -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"