Skip to content

Allexik/TithingVideoMaker

Repository files navigation

Tithing Video Maker

Tool that renders an animated tithing video over a provided loopable background video. You can run it in CLI mode or in a simple windowed UI mode.

What it builds

The output video has two animated parts:

  1. Verse part:

    • Text (centered):
      Нехай кожен дає, як серце йому призволяє, не в смутку й не з примусу, бо Бог любить того, хто з радістю дає!
    • Reference below it: 2 Коринтян 9:7
  2. Money part:

    • Left: animated donut chart (collected / target), percentage inside, month label above, numbers below.
    • Optional overhead amount (>100%) is highlighted with an extra red outer arc.
    • Right: QR image + Donate ❤ below.

All animations are automatically scaled to the exact background video duration.

Install

poetry install

Or with pip:

pip install moviepy numpy Pillow pymupdf

MoviePy typically uses bundled imageio-ffmpeg, so a system FFmpeg install is usually not required. If your environment cannot use the bundled binary, install FFmpeg and make it available on PATH.

Build Windows EXE

Install the build tool into the Poetry environment:

poetry run python -m pip install pyinstaller

Then build both packaged launchers:

powershell -ExecutionPolicy Bypass -File .\build_exe.ps1 -Clean

Artifacts:

  • CLI build: dist/TithingVideoMaker/TithingVideoMaker.exe
  • UI build: dist/TithingVideoMakerUI/TithingVideoMakerUI.exe

The build keeps app-owned folders like assets/ and backgrounds/ beside the executable, while PyInstaller runtime files stay under _internal/. The executables also bundle the imageio-ffmpeg runtime, so a separate FFmpeg install is usually not required.

Usage (CLI)

python main.py \
  --target 50000 \
  --collected 32750 \
  --month 1 \
  --qr "assets/qr.svg" \
  --output "output/tithing_january.mp4"

Short flags are also supported: -t -c -m -b -o -q -f.

Arguments

  • --target (required): monthly target amount
  • --collected (required): collected amount
  • --month (required): month number in range 1..12
  • --background (optional): path to background video (backgrounds/background.mp4 by default)
  • --qr (optional): path to QR image (assets/qr.svg by default), file must exist
  • --output (optional): output mp4 path (output/tithing_video.mp4 by default)
  • --fps (optional): output frame rate, default 60
  • --threads (optional): ffmpeg worker threads, default is a balanced automatic selection
  • --codec (optional): ffmpeg video codec, default auto which prefers h264_nvenc when it is actually usable
  • --preset (optional): ffmpeg encoder preset, default medium
  • --ui (optional): launch windowed form mode instead of CLI args

Performance Tips

  • Lower --fps to reduce CPU load from per-frame Python/Pillow rendering.
  • Increase encoding speed by using a faster preset, for example --preset veryfast.
  • By default the app probes the active ffmpeg runtime and switches to h264_nvenc automatically when NVIDIA NVENC is available.
  • GPU acceleration in this project is focused on the final encode stage. Background decode and overlay composition still pass through Python/Pillow, so CPU-side frame generation remains important.

Usage (UI)

python main.py --ui

In UI mode, enter the same values (target, collected, month, background, qr, output, fps) and click Render.

Quick Launch (Windows)

Double-click launch_ui.bat in the project root to open UI directly. The launcher prefers poetry run and falls back to plain python if Poetry is not available.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors