AI Video & Audio Synthesis Series
This article is based on hands-on experience from the MiBee NVR open-source 45-second promo video project. You will learn how to generate video footage by code (Remotion), produce AI voiceovers (edge-tts), synthesize BGM offline (numpy), and mux everything into a final video with ffmpeg. All steps are ready to follow.
What This Technology Does
A multilingual promo project consists of three independent production stages, finally muxed by ffmpeg:
| Stage | Tool | Output |
|---|---|---|
| Footage | Remotion (React-based video) | Silent MP4 |
| Voiceover | edge-tts (Microsoft free TTS) | MP3 per clip |
| BGM | numpy offline synthesis | WAV file |
| Muxing | ffmpeg filter_complex | Final MP4 (video + voice + BGM) |
The overall pipeline looks like this:
edge-tts in Practice
This is Part 2 of the series, focusing on Text-to-Speech (TTS) — using edge-tts (Microsoft Azure’s free neural TTS interface) to batch-generate multilingual, multi-voice voiceover files. All code comes from a real project (MiBee NVR 45-second promo) and is ready to reuse.
Installation
edge-tts is a Python async library. Install it inside a virtual environment:
| |
numpy is not a dependency of edge-tts, but it will be needed for BGM synthesis (Part 3 of this series), so installing it here saves a step.
Offline BGM Synthesis with numpy
The third challenge is background music. This project uses numpy to synthesize a 45-second ethereal BGM on the fly — zero copyright risk, fully controllable style.
Why Not a Music Library
Stock music libraries have three problems:
- Copyright ambiguity: Free tracks come with varying licenses; commercial use may be risky.
- Style mismatch: Finding a 45-second ethereal track that doesn’t compete with voiceover and can be trimmed to any length is nearly impossible.
- No batch tweaking: Need to adjust volume, change reverb, or switch keys? A fixed recording gives you no control.
Code generation flips this: tweak a few parameters, re-run, and you get a new version instantly.
Overview
This is the final installment of the series. The previous three parts covered generating footage with Remotion, batch voiceover with edge-tts, and offline BGM synthesis with numpy. This part brings everything together: using ffmpeg filter_complex to mux the silent video, 7 voice clips, and one BGM into the final export — along with the end-to-end workflow, a pitfall cookbook, and the underlying principles.
After reading, you will understand:
- Why
-c:v copyis much faster and lossless compared to re-encoding - How to arrange multiple voice clips on a sequential timeline to avoid overlap
- The mathematical meaning of each filter in
filter_complex - How to batch-produce 6 language variants with one command
ffmpeg Muxing
Overall Approach
The muxing stage has a simple job: pack three things into one MP4.