Script to generate QR code video
This commit is contained in:
parent
51573eebd6
commit
721f856512
|
@ -0,0 +1,25 @@
|
|||
#/bin/bash
|
||||
|
||||
W=800
|
||||
H=600
|
||||
|
||||
TMP=$(mktemp -d)
|
||||
|
||||
ffmpeg -ss 203 -i "${1}" -r 8 -t 10 -s 19x14 "${TMP}/frame_%06d.png"
|
||||
|
||||
QR=$(mktemp -d)
|
||||
|
||||
source env/bin/activate
|
||||
|
||||
for FILE in "${TMP}/"*; do
|
||||
FILENAME=$(basename "${FILE}")
|
||||
echo "${FILENAME}..."
|
||||
bash generate.sh "${FILE}" "${QR}/${FILENAME}"
|
||||
done
|
||||
|
||||
deactivate
|
||||
|
||||
ffmpeg -y -framerate 8 -pattern_type glob -i "${QR}/frame_"'*.png' -c:v libx264 -r 24 -pix_fmt yuv420p -vf "scale=${W}:${H}:force_original_aspect_ratio=decrease,pad=${W}:${H}:-1:-1:color=white" "${2}"
|
||||
|
||||
rm -rf "${QR}"
|
||||
rm -rf "${TMP}"
|
Loading…
Reference in New Issue