add args parsing

This commit is contained in:
tth 2022-04-04 11:34:50 +02:00
parent 913452bc81
commit c45658e181

View File

@ -1,15 +1,25 @@
#!/bin/bash #!/bin/bash
DDIR="frames/pick3d" if [ $# -ne 2 ] ; then
echo
echo "need two arguments:"
echo " source dir"
echo " mp4 filename"
exit 1
fi
echo "Encoding from " $DDIR SDIR="$1"
FNAME="$2"
echo "Encoding from " $SDIR " to " $FNAME
TITLE='---{ experimental }---'
ffmpeg -nostdin \ ffmpeg -nostdin \
-loglevel warning \ -loglevel warning \
-y -r 25 -f image2 -i $DDIR/%05d.png \ -y -r 25 -f image2 -i $SDIR/%05d.png \
-metadata artist='---[ tTh ]---' \ -metadata artist='---{ tTh }---' \
-metadata title='---[ experiment ]---' \ -metadata title="${TITLE}" \
-c:v libx264 -pix_fmt yuv420p \ -c:v libx264 -pix_fmt yuv420p \
clifford-evolv-0.mp4 $FNAME