Last active
March 16, 2025 13:08
-
-
Save onebytegone/a5c6dfc676d6767a510b22e16dd02058 to your computer and use it in GitHub Desktop.
Overlay FPO and timecode (FFmpeg)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Usage: ./add-overlay-text.sh input.mp4 "For Review" | |
| set -e | |
| SOURCE_FILE=$1 | |
| OUTPUT_FILE="${SOURCE_FILE%.*}_overlay.${SOURCE_FILE##*.}" | |
| OVERLAY_TEXT=$2 | |
| ffmpeg -i "${SOURCE_FILE}" \ | |
| -vf "drawtext=text='${OVERLAY_TEXT}':fontcolor=white:fontsize=(h/5):box=1:boxcolor=black@0.5:boxborderw=5:x=(w-text_w)/2:y=(h-text_h)/2,drawtext=timecode='00\:00\:00\:00':fontcolor=white:fontsize=(h/30):rate=24:fontsize=(h/20):box=1:boxcolor=black@0.5:x=(w-text_w)-(w/75):y=(h-text_h)-(w/75)" \ | |
| -codec:a copy \ | |
| "${OUTPUT_FILE}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment