A fast, cross-platform command-line utility for generating test media files with customizable parameters. Perfect for testing applications, creating placeholder content, or generating media samples.
No external dependencies required - FFmpeg is embedded directly into the executable!
- π¬ Video generation with animated countdown timer
- π΅ Audio generation with customizable sine wave test tones
- π§ββοΈ Interactive mode - Step-by-step wizard for easy configuration
- π― Multiple formats - MP4, AVI, MOV, MKV, MP3, WAV, AAC, FLAC
- βοΈ Highly configurable - resolution, bitrate, duration, codecs, frequency
- π Cross-platform - Windows, macOS, Linux (Intel & ARM)
- β‘ Fast - Built with Zig for optimal performance
- π¦ Zero dependencies - FFmpeg embedded, no installation required
Download the latest release for your platform:
None! FFmpeg is embedded directly into the executable.
- No external dependencies to install
- No system configuration required
- Works out of the box on all supported platforms
# Launch interactive wizard - guided setup with prompts
./media-gen iPerfect for beginners or when exploring different options. The wizard guides you through each step with helpful prompts and default values.
# Generate a 10-second countdown video
./media-gen video --duration 10 --output countdown.mp4
# Generate a 30-second audio test tone
./media-gen audio --duration 30 --output test-tone.mp3
# Generate custom frequency audio
./media-gen audio --frequency 880 --duration 5 --output tone.wav
# Show help
./media-gen helpIdeal for automation, scripting, or when you know exactly what parameters you need.
-
Use Interactive Mode when:
- You're new to media-gen
- You want to explore different configuration options
- You prefer guided setup with validation
- You need help understanding available parameters
-
Use CLI Mode when:
- You're automating media generation
- You know the exact parameters you need
- You're writing scripts or batch operations
- You prefer direct command execution
Create test videos with animated countdown timers:
# Basic HD video (1920x1080, 30 seconds)
./media-gen video --output my-video.mp4
# Mobile-friendly video
./media-gen video --width 720 --height 1280 --duration 15 --output mobile.mp4
# High-quality video with custom settings
./media-gen video \
--width 1920 --height 1080 \
--duration 60 \
--fps 60 \
--bitrate 5000k \
--codec libx265 \
--output hq-video.mp4
# Different formats
./media-gen video --format mov --output test.mov
./media-gen video --format avi --output test.aviCreate test audio files with sine wave tones:
# Basic audio (44.1kHz, 30 seconds)
./media-gen audio --output my-audio.mp3
# High-quality audio
./media-gen audio \
--sample-rate 48000 \
--bitrate 320k \
--format wav \
--duration 120 \
--output hq-audio.wav
# Professional audio formats
./media-gen audio --sample-rate 96000 --format flac --output pro.flac
./media-gen audio --format aac --output test.aacπ Want more examples? Check out EXAMPLES.md for comprehensive usage scenarios including mobile app testing, web development, social media formats, and batch generation scripts.
| Option | Description | Default | Examples |
|---|---|---|---|
--width |
Video width in pixels | 1920 | 1280, 1920, 3840 |
--height |
Video height in pixels | 1080 | 720, 1080, 2160 |
--duration |
Duration in seconds | 30 | 10, 60, 300 |
--fps |
Frames per second | 30 | 24, 30, 60 |
--bitrate |
Video bitrate | 1000k | 500k, 2000k, 10M |
--format |
Output format | mp4 | mp4, avi, mov, mkv |
--codec |
Video codec | libx264 | libx264, libx265, libvpx-vp9 |
--output |
Output filename | output.mp4 | my-video.mp4 |
| Option | Description | Default | Examples |
|---|---|---|---|
--duration |
Duration in seconds | 30 | 10, 60, 300 |
--sample-rate |
Sample rate in Hz | 44100 | 22050, 48000, 96000 |
--frequency |
Sine wave frequency in Hz | 440 | 220, 880, 1000 |
--bitrate |
Audio bitrate | 128k | 96k, 192k, 320k |
--format |
Output format | mp3 | mp3, wav, aac, flac |
--codec |
Audio codec | libmp3lame | pcm_s16le, aac, flac |
--output |
Output filename | output.mp3 | my-audio.wav |
| Option | Description | Default | Examples |
|---|---|---|---|
--duration |
Duration in seconds | 30 | 10, 60, 300 |
--sample-rate |
Sample rate in Hz | 44100 | 22050, 48000, 96000 |
--bitrate |
Audio bitrate | 128k | 96k, 320k, 1411k |
--format |
Output format | mp3 | mp3, wav, aac, flac |
--codec |
Audio codec | libmp3lame | libmp3lame, pcm_s16le, aac |
--output |
Output filename | output.mp3 | my-audio.mp3 |
# Quick test files for development
./media-gen video --duration 5 --width 640 --height 480 --output dev-test.mp4
./media-gen audio --duration 3 --output dev-test.mp3# Portrait video for mobile
./media-gen video --width 720 --height 1280 --duration 10 --output mobile-portrait.mp4
# Landscape video for mobile
./media-gen video --width 1280 --height 720 --duration 10 --output mobile-landscape.mp4# Web-optimized video
./media-gen video --width 854 --height 480 --bitrate 800k --output web-video.mp4
# Compressed audio for web
./media-gen audio --bitrate 96k --format mp3 --output web-audio.mp3# Various quality levels for testing
./media-gen video --bitrate 500k --output low-quality.mp4
./media-gen video --bitrate 2000k --output medium-quality.mp4
./media-gen video --bitrate 8000k --output high-quality.mp4- Zig 0.15+
- Internet connection (for automatic FFmpeg download)
# Clone the repository
git clone https://github.com/DimazzzZ/media-gen.git
cd media-gen
# Build for your platform (FFmpeg downloaded automatically)
zig build
# Run tests
zig build test
zig build test-integration
# Build for all platforms
./build-all.shNote: FFmpeg binaries are downloaded automatically during the first build. No manual installation required!
# Windows
zig build -Dtarget=x86_64-windows -Doptimize=ReleaseSafe
# macOS
zig build -Dtarget=x86_64-macos -Doptimize=ReleaseSafe
zig build -Dtarget=aarch64-macos -Doptimize=ReleaseSafe
# Linux
zig build -Dtarget=x86_64-linux -Doptimize=ReleaseSafeWe welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Test your changes:
zig build test - Validate workflows:
./scripts/validate-workflows.sh - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
# Install dependencies
# (FFmpeg installation varies by platform - see Requirements section)
# Run development build
zig build
# Run all tests
zig build test
# Validate CI/CD configuration
./scripts/validate-workflows.sh- MP4 (H.264, H.265) - Most compatible
- AVI (H.264) - Legacy support
- MOV (H.264, H.265) - Apple ecosystem
- MKV (H.264, H.265, VP9) - Open standard
- MP3 (LAME) - Universal compatibility
- WAV (PCM) - Uncompressed, high quality
- AAC - Modern, efficient compression
- FLAC - Lossless compression
8000, 11025, 22050, 44100, 48000, 96000 Hz and more
FFmpeg not found
# Check if FFmpeg is installed
ffmpeg -version
# Install FFmpeg if missing (see Requirements section)Permission denied
# Make the binary executable (Linux/macOS)
chmod +x media-genLarge file sizes
# Reduce bitrate for smaller files
./media-gen video --bitrate 500k --output smaller.mp4
./media-gen audio --bitrate 96k --output smaller.mp3- π Check this README for usage examples
- Browse EXAMPLES.md for comprehensive scenarios
- Report bugs
- Request features
- π¬ Start a discussion
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Zig for performance and reliability
- Powered by FFmpeg for media processing
- Inspired by the need for simple, reliable test media generation
Made with β€οΈ for developers who need reliable test media files