Unix for Artists: Fun with FFMPEG is a workshop hosted by the Echo Park Film Center.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
unix4artists/im/title.sh

42 lines
837 B

#!/bin/bash -e
#####################################################
#
# This script will create a 15 second title with a
# 5 second fade in and a 5 second fade out
#
# Usage: bash im/title.sh <title text> <output video>
#
#####################################################
TEXT="${1}"
OUTPUT="${2}"
# Check if output file extension is .mov
if [[ "${OUTPUT}" != *".mov" ]]; then
echo "Please use an .mov extension on your output file argument"
exit 1
fi
convert -size 1280x720 \
-background black \
-fill white \
-gravity Center \
-weight 700 \
-pointsize 200 \
label:"${TEXT}" \
title.png
ffmpeg -loop 1 \
-framerate 24 \
-f image2 \
-i title.png \
-s 1280x720 \
-vf "fade=t=in:st=0:d=5,fade=t=out:st=10:d=5" \
-c:v prores_ks \
-profile:v 3 \
-t 15 \
"${OUTPUT}"
# Clean up by removing the image
rm title.png