#!/bin/sh
#
# https://superuser.com/questions/624567/how-to-create-a-video-from-images-using-ffmpeg
# 
# cat *.jpg | ffmpeg -f image2pipe -r 1 -vcodec mjpeg -i - -vcodec libx264 out.mp4

# For Android see https://stackoverflow.com/questions/14171826/converting-video-for-android-using-ffmpeg
#    -->  -movflags +faststart
# ffmpeg -r 24 -pattern_type glob -i '20*.jpg' -c:v libx264 -movflags +faststart out.mp4

set -x 

# This was used more or less successfully!!
#ffmpeg -r 24 -pattern_type glob -i '20*.jpg' -c:a libvorbis output.webm

# https://matt.guide/how-to-create-open-source-time-lapse-videos/
ffmpeg -framerate 30 -r 30 -pattern_type glob -i '20*.jpg' -s:v 1280x720 -c:v libx264 -b:v 500k -profile:v baseline -preset veryslow -pix_fmt yuv420p output_30fps_timelaps.mp4

#  Das geht so nicht!!
# ffmpeg -r 24 -pattern_type glob -i '20*.jpg' -c:v libx264 output.webm

# Das soll transition machen - hilft aber nicht ...
# ffmpeg -vf "tblend=average,framestep=2,setpts=0.50*PTS" -r 24 -pattern_type glob -i '20*.jpg' -c:a libvorbis output.webm
