#!/bin/bash
echo "--------------------------------"
echo "Video Picture Stitcher V1.0"
echo "requ. ffmpeg"
echo "--------------------------------"
echo "What is the name of your input movie (with suffix:mov/mp4/mkv but without spaces)?"
read theSource
echo "How should the output named?"
read theTarget
echo "Please wait .."
ffmpeg -hide_banner -loglevel error -i ./SourceMovie/$theSource -r 0.009 -s 640x360 -f image2 ./Stills/$theTarget-%03d.jpeg
ls -lR ./Stills/$theTarget* | wc -l
echo "Files created."
echo "... Stitching."
ffmpeg -framerate 10 -pattern_type glob -i "./Stills/$theTarget*.jpeg" ./Stitched/$theTarget.mp4
echo ".... Finished."