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