AI-powered YouTube video assembler. Point it at a folder of clips/photos and a text script, get a 5–10 minute MP4 back.
autotrend ./media/ script.txt -o video.mp4
- segments your script by paragraph into voiceable chunks
- generates TTS audio for each segment (Microsoft Edge TTS — no API key needed)
- assigns your media files round-robin to each segment, trimming or looping as needed
- pads silence between segments automatically if the total would fall under 5 minutes
- assembles everything into a single 1920×1080 MP4 via ffmpeg
- optionally mixes in background music at a low volume
it has a full terminal UI: animated progress bars, media inventory table, segment plan table, per-stage spinners, and a final stats panel.
- python 3.11+
- uv — used to run the script with inline deps
- ffmpeg + ffprobe in PATH
# arch
sudo pacman -S ffmpeg uv
# debian/ubuntu
sudo apt install ffmpeg && pip install uv
# mac
brew install ffmpeg uvpython dependencies are installed automatically by uv on first run:
rich, typer, edge-tts
curl -o ~/.local/bin/autotrend https://raw.githubusercontent.com/numbpill3d/autotrend/main/autotrend
chmod +x ~/.local/bin/autotrendor clone and symlink:
git clone https://github.com/numbpill3d/autotrend
ln -s $PWD/autotrend/autotrend ~/.local/bin/autotrendautotrend [OPTIONS] MEDIA_DIR SCRIPT_FILE
| argument | description |
|---|---|
MEDIA_DIR |
folder containing your video clips and/or images |
SCRIPT_FILE |
plain text file — the narration script |
| flag | default | description |
|---|---|---|
-o, --output |
autotrend_output.mp4 |
output file path |
-v, --voice |
en-US-AriaNeural |
edge-tts voice name |
-m, --music |
— | background music file (any format ffmpeg accepts) |
--music-vol |
0.12 |
background music volume, 0.0–1.0 |
--min-dur |
300 |
minimum target duration in seconds (5 min) |
--max-dur |
600 |
maximum target duration in seconds (10 min) |
--ken-burns |
off | slow zoom effect on images (cinematic, but slower to render) |
--preview |
off | show the segment plan without rendering anything |
--keep-tmp |
off | keep temp files after render (useful for debugging) |
write your narration as plain text. separate scenes/segments with a blank line:
This is the first scene. It will be read aloud and paired with your first media file.
This is the second scene. It gets the next media file, looping back around if you
have fewer files than paragraphs.
Short paragraphs get merged automatically. Very long ones get split at sentence
boundaries so nothing sounds rushed.
the tool targets 5–10 minutes. if your script is shorter, inter-segment silence is added proportionally. if it's longer, you'll get a warning but it'll still render.
# basic
autotrend ./footage/ narration.txt -o my_video.mp4
# specific voice + background music
autotrend ./clips/ script.txt -o out.mp4 \
--voice en-US-GuyNeural \
--music lo-fi.mp3 --music-vol 0.10
# photos with ken burns zoom effect
autotrend ./photos/ script.txt --ken-burns -o cinematic.mp4
# preview the segment plan before committing to a full render
autotrend ./media/ script.txt --preview
# longer target (15 min)
autotrend ./media/ script.txt --min-dur 600 --max-dur 900video: .mp4 .mov .avi .mkv .webm .m4v .flv
image: .jpg .jpeg .png .webp .bmp .tiff .gif
videos are preferred over images when both exist in the folder. all output is normalized to 1920×1080 @ 30fps, letterboxed/pillarboxed if needed.
list all available TTS voices:
edge-tts --list-voicessome good defaults:
| voice | style |
|---|---|
en-US-AriaNeural |
friendly, natural (default) |
en-US-GuyNeural |
male, clear |
en-GB-SoniaNeural |
british female |
en-AU-NatashaNeural |
australian female |
en-US-JennyNeural |
conversational |
MIT