This project generates countdown videos with FFmpeg. The primary tool is the Go CLI in main.go, which builds the FFmpeg filter graph from presets and command-line flags.
Watch the demo: CountdownNow on YouTube
The video includes:
- Static radial gradient background, or a custom image/video background
- Large
MM:SScountdown timer - Shrinking bottom progress bar
- Optional logo overlay with configurable position
- Final outro where the timer/logo fade and the title/subtitle appear
- Hardware encoder attempts when available, with automatic
libx264fallback - Responsive layout sizing for landscape, vertical, square, ultrawide, 4K, and custom dimensions
- Themes, outro modes, progress styles, preview frames, and optional audio
Install a full FFmpeg build before running CountdownNow.
macOS:
brew install ffmpeg-fullWindows and Linux users should install a full FFmpeg package from their package manager or from the official FFmpeg builds. After installing FFmpeg, verify the runtime with:
./countdownnow --checkDownload the release archive for your platform from the latest GitHub Release, extract it, and run the binary.
Run the default 5-minute landscape countdown:
./countdownnow./countdownnow --version
./countdownnow --helpTo run an unsigned or unnotarized macOS download, remove the quarantine attribute after extracting the archive:
xattr -dr com.apple.quarantine ./countdownnow-macos-universal-unsigned
./countdownnow-macos-universal-unsigned/countdownnow --helpDefault output:
countdown_300s.mp4
Use short renders while tuning layout:
./countdownnow --duration 0.5 --output /tmp/countdown-test.mp4 --encoder softwarePrint the generated FFmpeg command without rendering:
./countdownnow --duration 0.5 --dry-runCheck the runtime FFmpeg installation before rendering:
./countdownnow --checkThe check verifies the FFmpeg executable, required video/audio filters, libx264, listed hardware encoders, and a tiny drawtext render.
Generate one preview frame without rendering a video:
./countdownnow --preview preview.png --preview-time 120Use a custom image or video background:
./countdownnow --background background.png
./countdownnow --background background.mp4
./countdownnow --background background.mp4 --width 1920 --height 1080 --background-fit cover
./countdownnow --background poster.png --width 1080 --height 1920 --background-fit containWhen --background is provided without --width and --height, the output video uses the background's first video stream dimensions. If you provide dimensions, pass both --width and --height; those values override the background size.
Image backgrounds are looped for the full countdown. Video backgrounds are looped and trimmed to --duration.
Background fit modes:
cover: fill the output canvas and crop overflow. This is the default.contain: show the whole background with black padding when aspect ratios differ.stretch: resize exactly to the output size, even if that distorts the background.
Landscape, 1280x720:
./countdownnow --preset landscapeVertical, 1080x1920:
./countdownnow --preset vertical --output vertical-countdown.mp4Square, 1080x1080:
./countdownnow --preset square --output square-countdown.mp4Ultrawide, 2560x1080:
./countdownnow --preset ultrawide --output ultrawide-countdown.mp44K landscape, 3840x2160:
./countdownnow --preset 4k --output countdown-4k.mp4You can also override dimensions directly. The timer, logo, progress bar, title, subtitle, margins, and bitrate scale from the selected canvas size:
./countdownnow --width 1920 --height 1080 --output custom.mp4
./countdownnow --width 1080 --height 1350 --output social-4x5.mp4
./countdownnow --width 2160 --height 3840 --output vertical-4k.mp4
./countdownnow --width 3440 --height 1440 --output wide-monitor.mp4Set duration:
./countdownnow --duration 600By default, --outro-seconds is part of the duration. To add the outro after
the countdown, keep the timer duration unchanged and extend the final video:
./countdownnow --duration 10 --outro-seconds 6 --outro-over-durationSet title:
./countdownnow --title "Sunday Gathering"Set outro subtitle:
./countdownnow --subtitle "We are glad you are here."Use a custom font file for all text:
./countdownnow --font ./fonts/Passion_One/PassionOne-Bold.ttfAdvanced font overrides:
./countdownnow --font-title ./title.ttf --font-subtitle ./subtitle.ttf
./countdownnow --font-timer ./timer.ttfDisable the final title and subtitle:
./countdownnow --title none --subtitle noneThe timer and logo still fade out during the outro.
Set a color theme:
./countdownnow --theme midnight
./countdownnow --theme warm
./countdownnow --theme sunrise
./countdownnow --theme minimalOverride the timer font color:
./countdownnow --timer-color "#ffcc00"
./countdownnow --timer-color whiteSet the outro reveal style:
./countdownnow --outro slide
./countdownnow --outro fade
./countdownnow --outro typewriter
./countdownnow --outro noneSet the progress indicator:
./countdownnow --progress bottom-bar
./countdownnow --progress nonebottom-bar is the default shrinking bar. It runs through the countdown and finishes just before the end so the final moment is clean. Use none to hide the progress indicator.
Add extra padding for screens that crop edges:
./countdownnow --safe-area 80Default logo path is auto-detected from:
logo.png
default.png
Round Icon Design.png
If no local logo file is available, the Go binary uses its embedded logo.png.
Use a specific logo:
./countdownnow --logo logo.pngDisable the logo:
./countdownnow --logo none
./countdownnow --logo-position noneSet logo position:
./countdownnow --logo-position top-right
./countdownnow --logo-position top-left
./countdownnow --logo-position bottom-right
./countdownnow --logo-position bottom-left
./countdownnow --logo-position centerResize or adjust margins:
./countdownnow --logo-width 160 --logo-margin-x 30 --logo-margin-y 40The app warns when ffprobe reports a low-resolution logo or a logo pixel format that may not include transparency.
Add background audio:
./countdownnow --audio worship-pad.mp3 --audio-volume 0.35Fade background audio during the outro:
./countdownnow --audio worship-pad.mp3 --fade-audioMix in a short sound effect near the end:
./countdownnow --end-sound chime.wavDefault mode is auto:
./countdownnow --encoder autoAuto mode tries hardware encoders first for the current OS, then falls back to software:
- macOS:
h264_videotoolbox, thenlibx264 - Windows:
h264_nvenc,h264_qsv,h264_amf, thenlibx264 - Linux:
h264_nvenc,h264_qsv, thenlibx264
Force software:
./countdownnow --encoder softwareUse a specific FFmpeg encoder:
./countdownnow --encoder h264_nvencSet hardware bitrate:
./countdownnow --bitrate 8MSet software quality:
./countdownnow --encoder software --crf 20 --preset-x264 veryfastBuild from source:
make build
./countdownnowThe Makefile builds with -trimpath -buildvcs=false and -ldflags="-s -w" so the binary omits local source paths, VCS metadata, and debug symbols.
Build metadata is injected at build time. If HEAD is on a git tag, that tag is used as the version; otherwise the short commit SHA is used.