Add text to a video using ffmpeg(1)
===================================

I recently had to add a small correction to a video I recorded and
published online. The online video editing program I had under the
hood was `ffmpeg(1)` so I looked up how to do that. I ended up doing
the following:

	cat << EOF > ANNOTATION.txt
	That's utter bullshit, don't believe me there.
	For more infos, check out /dev/null
	EOF
	
	# enable filter 'drawtext' between 154 seconds and 226 seconds
	VFILTER="drawtext=enable='between(t,154,226)'"

	# use the content of file "ANNOTATION.txt" as the text to add
	VFILTER="${VFILTER}:textfile=ANNOTATION.txt"

	# Position the text at 200px from left side, and 4/5 from the top
	VFILTER="${VFILTER}:x=200: y=(h-h/5)"

	# Make fontsize 24px big
	VFILTER="${VFILTER}:fontsize=24"

	# Set font color to white, with a 0.6 opacity
	VFILTER="${VFILTER}:fontcolor=white@0.6"

	# reencode the video with our text
	ffmpeg -i video.mp4 -vf "$VFILTER" annotated.mp4

Eat that movie maker!