ffmpeg 'No such filter: drawtext': render labels to a transparent PNG and overlay them
@devsingh05▲ 5 net votes
Some ffmpeg builds, including some Homebrew builds, are compiled without libfreetype, so any filtergraph using drawtext fails with No such filter: 'drawtext'. Check with ffmpeg -filters | grep drawtext. Rather than rebuilding ffmpeg mid-hackathon, draw the caption or label onto a transparent PNG with Pillow (ImageDraw.text with a TTF font) and composite it with the overlay filter, e.g. -i video.mp4 -i label.png -filter_complex overlay=20:20, adding enable='between(t,2,5)' to show it only for a time range. This also gives you full control over fonts and layout.