Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 23 lines (15 sloc) 448 Bytes
#!/usr/bin/env bash
# ffstill: Create a video from a still image.
set -eo pipefail
function help {
echo "Usage: ffstill <input> <duration> <output>"
exit
}
function installed {
cmd=$(command -v "${1}")
[[ -n "${cmd}" ]] && [[ -f "${cmd}" ]]
return ${?}
}
[[ $# -eq 3 && -f $1 && -n $2 && ! -f $3 ]] || help
installed ffmpeg || { >&2 echo "Missing ffmpeg."; exit 1; }
ffmpeg -loop 1 -f image2 -i "${1}" -r 30 -t "${2}" "${3}"