Fortraneries/GravityField/encode.sh
2022-12-03 02:25:37 +01:00

26 lines
449 B
Bash
Executable File

#!/bin/bash
if [ $# -ne 2 ] ; then
echo
echo "need two arguments:"
echo " 1) source dir"
echo " 2) mp4 filename"
exit 1
fi
SDIR="$1"
FNAME="$2"
echo "Encoding from " $SDIR " to " $FNAME
TITLE='---{ experimental gravity field }---'
ffmpeg -nostdin \
-loglevel warning \
-y -r 30 -f image2 -i $SDIR/%05d.pgm \
-metadata artist='---{ tTh }---' \
-metadata title="${TITLE}" \
-c:v libx264 -pix_fmt yuv420p \
$FNAME