Automated glitch-style short-form video generation powered by FFmpeg, Bash, and GitHub Actions.
AutoVideoGen is a CLI-based video generation tool that transforms stock footage into heavily stylized, glitch-inspired videos synchronized with audio. The project is designed to automate the production of vertical short-form videos suitable for platforms such as YouTube Shorts.
The entire workflow can run locally or automatically through GitHub Actions, producing generated videos as downloadable workflow artifacts.
- 🎥 Randomly selects stock footage
- 🎵 Randomly selects audio tracks
- ⚡ Heavy glitch effects
- 🌈 RGB channel shifting
- 🌪 Random camera shake
- 🔍 Beat punch zooms
- 🌫 Noise overlays
- 🎨 Color grading
- 👻 Ghost frame blending
- 🔥 Fractal style overlays
- ⚫ Random black screen flashes
- 📱 Automatic vertical formatting (1080x1920)
- 🖥 Interactive CLI
- ⚙ GitHub Actions automation
- 📦 Workflow artifact generation
AutoVideoGen/
│
├── audio/
│ ├── song1.mp3
│ ├── song2.mp3
│ └── ...
│
├── videos/
│ ├── clip1.mp4
│ ├── clip2.mp4
│ └── ...
│
├── output/
│ └── Generated videos
│
├── scripts/
│ ├── autovideogen_cli.sh
│ └── glitch_generate.sh
│
├── .github/
│ └── workflows/
│ └── daily-autovideogen.yml
│
└── README.md
Contains the stock footage library.
Every execution randomly selects one clip.
Example:
videos/
beach.mp4
city.mp4
cyberpunk.mp4
mountains.mp4
Contains music or audio tracks.
Each generated video randomly selects one audio file.
Supported formats:
- mp3
- wav
- m4a
- mp4
Generated videos are written here.
Example:
output/
glitched_171235234.mp4
glitched_171235999.mp4
glitched_171236521.mp4
Responsible for creating a single video.
Pipeline:
- Randomly selects a video
- Randomly selects audio
- Loops the source footage
- Crops to vertical
- Applies glitch effects
- Synchronizes to audio
- Renders final MP4
Effects currently include:
- RGB Shift
- Noise
- Hard Light
- Difference Blend
- Overlay Blend
- Color Distortion
- Random Shake
- Random Zoom
- Ghost Frames
- Fractal Overlay
- Random Black Flashes
Produces one completed YouTube Short.
Provides the interactive interface.
Displays:
- ASCII splash screen
- CLI prompts
- Progress
- Generation status
- Total render time
Example:
How many videos? [5]:
Press Enter:
Creates 5 videos
Or specify:
25
Creates 25 videos.
Default:
./scripts/autovideogen_cli.shGenerates:
5 videos
Specify amount:
./scripts/autovideogen_cli.sh 20Generates:
20 videos
Included workflow:
.github/workflows/daily-autovideogen.yml
Example schedule:
Every day
6:00 AM
Workflow automatically:
- Checks out repository
- Installs FFmpeg
- Runs CLI
- Generates videos
- Uploads output folder as workflow artifacts
No manual intervention required.
Every scheduled execution produces downloadable artifacts.
Example:
Actions
Daily AutoVideoGen
Artifacts
autovideogen-output.zip
Download the archive to retrieve every generated MP4.
- Bash
- FFmpeg
- Python 3
MacOS:
brew install ffmpegUbuntu:
sudo apt install ffmpegStock Videos
│
▼
Random Selection
│
▼
Audio Selection
│
▼
Crop Vertical
│
▼
Glitch Effects
│
▼
Shake
│
▼
Zoom
│
▼
RGB Shift
│
▼
Noise
│
▼
Black Flashes
│
▼
Export MP4
│
▼
Output Folder
6:00 AM
↓
GitHub Actions
↓
Generate 10 Videos
↓
Upload Artifacts
↓
Download Videos
↓
Upload to YouTube Shorts
-
Populate the
videos/folder with royalty-free or original footage. -
Populate the
audio/folder with music or sound effects. -
Run:
./scripts/autovideogen_cli.shor schedule execution through GitHub Actions.
-
Download the generated videos.
-
Review the results.
-
Publish to YouTube Shorts or other vertical video platforms.
Future enhancements may include:
- Beat detection
- AI-generated captions
- Automatic subtitles
- Transition packs
- VHS effects
- CRT simulation
- Datamoshing
- Lens distortion
- Motion blur
- Particle systems
- Video packs
- Preset profiles
- Batch rendering
- Multi-threaded generation
- Automatic YouTube uploads
- Thumbnail generation
- Metadata generation
- AI title generation
- AI description generation
- AI hashtag generation
This project is intended for experimentation, creative media generation, and learning FFmpeg-based video processing pipelines.
Please ensure that all source footage, music, and generated content complies with applicable copyright laws and the terms of service of any platform where the videos are published.