Automated pipeline: PowerPoint slides + narration script → narrated MP4 video. Built for Climate-Smart Cattle presentation, BGP3 Workshop South Africa 2026.
# Africa Rising: Climate-Smart Cattle — Narrated Video Pipeline
**Automated pipeline to turn PowerPoint slides + a narration script into a fully narrated MP4 video.**
Developed for the presentation *"Climate-Smart Cattle: Africa Rising Together"*
by **Dr. Setegn Worku Alemu** (on behalf of Prof. Raphael Mrode) | ILRI / CGIAR
Global Methane Genetics Initiative — Africa Chapter
---
## What it does
1. Reads slide images (`slide1.png` … `slide8.png`) from the working directory
2. Parses `script.txt` into per-slide narration text
3. Generates MP3 audio for each slide via a text-to-speech API
4. Combines each slide image + audio into an MP4 segment using **ffmpeg**
5. Concatenates all segments and applies fade-in / fade-out
6. Outputs a single `final_video.mp4` at 1920×1080, H.264 Main Profile, stereo AAC
---
## Repository structure
```
├── create_video.py # Main pipeline script
├── script.txt # Narration script (SLIDE N markers)
├── Africa_Rising_Speech.md # Full speech with segment timings and image prompts
├── slides/
│ ├── Slide1.JPG # Slide images (export from PowerPoint)
│ ├── Slide2.JPG
│ └── ...
└── README.md
```
---
## Requirements
```bash
pip install -r requirements.txt
sudo apt install ffmpeg # Linux
# macOS: brew install ffmpeg
# Windows:
ffmpeg.org
```
---
## Usage
**1. Export your PowerPoint slides as PNG images** named `slide1.png`, `slide2.png`, etc. and place them in the same folder as `create_video.py`.
**2. Set your TTS API key** (see `create_video.py` for the variable name):
```bash
export TTS_API_KEY="your-key-here"
```
**3. Run the pipeline:**
```bash
python3 create_video.py
```
Output: `final_video.mp4` in the same directory.
---
## Script format (`script.txt`)
```
===================================
SLIDE 1 — Your Slide Title
===================================
Your narration text for slide 1...
===================================
SLIDE 2 — Next Slide Title
== …