Add an invert option to the image_seq script
This commit is contained in:
parent
a436c97fe6
commit
d6a3c4ac00
11
image_seq.sh
11
image_seq.sh
|
@ -1,15 +1,24 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
MULTIPLE=2
|
||||||
|
RATE=`echo "scale=0;24/${MULTIPLE}" | bc`
|
||||||
|
|
||||||
INPUT="${1}"
|
INPUT="${1}"
|
||||||
OUTPUT="${2}"
|
OUTPUT="${2}"
|
||||||
|
INVERT="${3}"
|
||||||
|
|
||||||
WIDTH=323
|
WIDTH=323
|
||||||
HEIGHT=242
|
HEIGHT=242
|
||||||
|
|
||||||
|
if [[ "${INVERT}" != "" ]]; then
|
||||||
|
INVERT="-vf negate"
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir -p "${OUTPUT}"
|
mkdir -p "${OUTPUT}"
|
||||||
|
|
||||||
ffmpeg -re -i "${INPUT}" \
|
ffmpeg -re -i "${INPUT}" \
|
||||||
-f image2 \
|
-f image2 \
|
||||||
-r 12 \
|
-r ${RATE} \
|
||||||
|
"${INVERT}" \
|
||||||
-vf crop=in_h/3*4:in_h,scale=$WIDTH:$HEIGHT,setsar=1:1 \
|
-vf crop=in_h/3*4:in_h,scale=$WIDTH:$HEIGHT,setsar=1:1 \
|
||||||
"${OUTPUT}/image_%06d.png"
|
"${OUTPUT}/image_%06d.png"
|
Loading…
Reference in New Issue