To rename the images so the name corresponds to its capture date, invoke the following command. This step is useful for both guaranteeing that the final movie is in the correct order and that duplicate images are removed.
exiftool '-filename<CreateDate' -d "%Y:%m:%d %H:%M:%S.%%le" -r .
command ls -1tr *jpg | sort >| gopro.txt
The following script generates a timelapse using mencoder.
#!/bin/bash
if [[ $# != 2 ]]; then
echo "Usage $0 <files.txt> <fps>" 2>&1
exit 1
fi
FILES=$1
FPS=$2
mencoder -nosound -ovc lavc -lavcopts \
vcodec=mpeg4:mbd=2:trell:autoaspect:vqscale=3 \
-vf scale=1920:1080 -mf type=jpeg:fps=$FPS \
mf://@$FILES -o gopro.mp4
To create the timelapse, invoke the script above as follows:
./timelapse gopro.txt 25