Skip to main content

FactReel 🎬✅

Fact-checked faceless short videos, on autopilot. YouTube Shorts · TikTok · Reels, from a list of verified facts, with free AI services and a fallback for everything.

CI PyPI Python License: MIT

English · Español

FactReel demo: vertical video with word-by-word subtitles

Most "AI shorts generators" let a language model make things up. FactReel doesn't. You write the facts (with sources) once; the AI only turns them into a punchy script, and every script goes through guards that reject invented numbers, repeated ideas, unlabelled rumours and anything a second fact-checking pass can't find in your facts. Then it narrates it, draws the images, burns karaoke subtitles and renders a vertical MP4 ready to upload.

It grew out of a real channel that publishes a Short every day unattended, so it is built to never stop on a bad day: if the voice service, the image API or the script AI is down, the next option in the chain takes over.

Features

  • 🛡️ Anti-hallucination script writer: number whitelist, repetition check, rumour labelling, a temperature-0 fact-check pass, and a facts-only fallback that is always correct.
  • 🗣️ Voice fallback chain: Microsoft Edge neural voices (free, no key) → ElevenLabs → Cloudflare Aura → your OS's offline voice. factreel doctor tells you when a service is down and when it is back.
  • 🖼️ Image fallback chain: Cloudflare Workers AI FLUX → NVIDIA NIM FLUX → your own generator (local GPU, ComfyUI…) → archive of previous images → procedural background that always works offline.
  • 💬 Word-by-word subtitles with the spoken word highlighted, synced from the TTS engine or Whisper.
  • 🎞️ Smooth Ken Burns zoom without jitter (sub-pixel rendering), cross-fades on scene changes, voice normalised to -14 LUFS, optional background music with automatic credits.
  • 🌍 Spanish and English first-class (prompts, month names, countdowns). More languages = one dict.
  • 💸 Free by default: runs with zero API keys; every paid service is optional and budget-capped.
  • 🔌 Any OpenAI-compatible LLM: NVIDIA NIM, OpenRouter, Groq, OpenAI, Ollama, LM Studio, OmniRoute…
  • 📤 Optional YouTube upload with the "altered or synthetic content" flag set for you.
  • ✅ Verifies every render (resolution, audio, no black screen) before it reaches the upload queue.

Quick start

You need Python 3.10+ and FFmpeg on your PATH.

pip install factreel
factreel init my-channel --lang en      # or --lang es
cd my-channel
factreel doctor                         # checks FFmpeg, keys and every voice
factreel make                           # -> output/20261020_180000_venus_day.mp4 (+ .json/.txt metadata)

That's it: with no keys at all you get a video with the free Edge voice, the facts read as they are and offline backgrounds. Add free keys to .env to unlock the AI script and AI images:

Key What it unlocks Cost
NVIDIA_API_KEY (build.nvidia.com) AI script + fact check, FLUX images free credits
CLOUDFLARE_ACCOUNT_ID + CLOUDFLARE_API_TOKEN FLUX images, backup voice, exact subtitle timing (Whisper) 10,000 free neurons/day, capped
ELEVENLABS_API_KEY premium voice optional

How it works

flowchart LR
    F[facts.json<br/>verified facts + sources] --> T[topic rotation<br/>queue.txt / least used]
    T --> S[AI script]
    S --> G{guards<br/>numbers · repeats<br/>rumours · fact check}
    G -- rejected --> S
    G -- gives up --> FB[facts-only script]
    G -- ok --> V[voice chain]
    FB --> V
    V --> SUB[karaoke subtitles]
    V --> I[image chain]
    SUB --> R[FFmpeg render + verify]
    I --> R
    R --> O[output/*.mp4 + metadata] --> U[YouTube upload]

Your facts

{
  "topics": [
    {
      "id": "venus_day",
      "angle": "a day on Venus is longer than its year",
      "facts": [
        "Venus takes about 243 Earth days to spin once on its axis.",
        "Venus takes about 225 Earth days to orbit the Sun."
      ],
      "sources": ["https://science.nasa.gov/venus/venus-facts/"],
      "hashtags": ["#venus"],
      "weight": 2
    }
  ]
}

Prefix unconfirmed news with RUMOR: and the script will be forced to say so. Put topic ids in queue.txt to choose what goes out next; otherwise the least used topic is picked (weight > 1 = more often).

Commands

Command What it does
factreel init DIR --lang es new channel folder from a template
factreel make [-t TOPIC] [-n 3] generate videos into output/
factreel make --offline --voice dummy instant preview: no AI, silent voice, offline images
factreel topics topics and how many times each was used
factreel doctor [--voices --log] check everything; --log is perfect for a scheduled task
factreel upload [--privacy unlisted] upload pending videos to YouTube (pip install "factreel[youtube]")
factreel run make + upload, for a daily scheduled task

Documentation

Responsible use

FactReel declares AI-generated media when uploading, never invents facts on its own, and labels rumours. Please keep it that way: cite your sources, respect trademarks and music licences, and don't use it to mass-produce misleading content. Platforms penalise low-effort spam; good facts make good videos.

Contributing

Contributions are very welcome, especially new languages, voice/image providers and platform uploaders. See CONTRIBUTING.md and the roadmap for good first issues.

License

MIT © Jorge Lamelas

Metadata

Release files for factreel 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for factreel 0.1.0
File Size Uploaded Provenance Actions
factreel-0.1.0.tar.gz 1.6 MB With provenance Details for factreel-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for factreel 0.1.0
File Interpreter ABI Platform Actions
factreel-0.1.0-py3-none-any.whl Python 3 none any Details for factreel-0.1.0-py3-none-any.whl

Total release size: 1.6 MB

Release files / factreel-0.1.0.tar.gz

Download URL factreel-0.1.0.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
b51e3843c6a5fe04696988af598c3b95add8ece1d950f25f25d7edf49a91dcba
BLAKE2b-256 checksum
How to use checksums
69ee207de2ac1a7b79167c4d2ebfdb64c4f7846d4de199de66a15fa738b51f89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Release files / factreel-0.1.0-py3-none-any.whl

Download URL factreel-0.1.0-py3-none-any.whl
Size 60.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e247d1aa7d5838a06d5aa4dd9b9bea057906a7943f38a66b0116cee46b8d4d06
BLAKE2b-256 checksum
How to use checksums
cc9ff963b98f9315aeff1c48e28001ab62f6cc4a8bb5ab6138a3dff5bbead76c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

Security for factreel 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for factreel-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page