Transform ideas into full-length videos using AI-powered automation with manual testing capabilities at every step.
- Text Generation: Use HERMES-4-70B LLM to generate scripts and narratives
- Image Generation: Create visual assets from text descriptions
- Video Generation: Generate video clips from images and narration
- Video Merging: Combine multiple clips into long-form content
- Manual Testing: Test each component independently
- Full Automation: Run complete pipeline from idea to final video
# Clone the repository
git clone <repository-url>
cd contentor
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Install FFmpeg (required for video processing)
# Ubuntu/Debian:
sudo apt-get install ffmpeg
# macOS:
brew install ffmpeg
# Windows: Download from https://ffmpeg.org/download.html# Copy example configuration
cp config/settings.example.json config/settings.json
# Edit config and add your HERMES API key
nano config/settings.jsonOr use the CLI to initialize:
python -m src.cli initpython -m src.cli test-text --idea "The history of space exploration"python -m src.cli test-image --prompt "Astronaut floating in space with Earth in background"python -m src.cli test-video \
--image output/images/scene_001.png \
--narration "Humans have always dreamed of exploring the stars" \
--duration 10python -m src.cli test-merge \
--videos "output/videos/clip_001.mp4,output/videos/clip_002.mp4,output/videos/clip_003.mp4"python -m src.cli test-full --idea "The future of artificial intelligence"python -m src.cli test-full \
--idea "The future of artificial intelligence" \
--manual-checkpointsThis project is designed to let you test each stage of the pipeline independently:
Generate a script from your idea using HERMES-4-70B:
python -m src.cli test-text \
--idea "Climate change solutions" \
--style documentary \
--num-scenes 5Output: output/text/script.json
Generate images from the script (or custom prompts):
# Will use the script from Stage 1
python -m src.cli test-image \
--prompt "Solar panels on modern buildings, sustainable city"Output: output/images/image.png
Create video clips from images:
python -m src.cli test-video \
--image output/images/scene_001.png \
--narration "Solar energy is transforming our cities" \
--duration 8Output: output/videos/clip.mp4
Combine clips into final long-form video:
python -m src.cli test-merge \
--videos "output/videos/clip_001.mp4,output/videos/clip_002.mp4" \
--output-name final_videoOutput: output/final/final_video.mp4
Edit config/settings.json:
{
"llm": {
"model": "Hermes-4-70B",
"api_key": "sk-your-key-here",
"default_max_tokens": 2048
},
"image": {
"provider": "placeholder",
"api_key": ""
},
"video": {
"provider": "ffmpeg"
}
}The HERMES-4-70B API example from NousResearch:
import http.client
import json
conn = http.client.HTTPSConnection("inference-api.nousresearch.com")
payload = json.dumps({
"model": "Hermes-4-70B",
"messages": [
{
"role": "system",
"content": "You are a helpful AI assistant."
},
{
"role": "user",
"content": "Hello!"
}
],
"max_tokens": 256
})
headers = {
'Authorization': "Bearer sk-your-api-key",
'Content-Type': "application/json"
}
conn.request("POST", "/v1/chat/completions", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))contentor/
├── src/
│ ├── llm/ # HERMES LLM integration
│ ├── image/ # Image generation
│ ├── video/ # Video generation
│ ├── merger/ # Video merging
│ ├── pipeline/ # Full automation pipeline
│ ├── config/ # Configuration management
│ └── cli/ # CLI commands
├── output/ # Generated content
├── config/ # Configuration files
├── examples/ # Example scripts
└── tests/ # Test scripts
python -m src.cli statuspython -m src.cli inittest-text- Generate script from ideatest-image- Generate single imagetest-video- Generate single video cliptest-merge- Merge multiple videostest-full- Run complete pipeline
python -m src.cli --help
python -m src.cli test-full --helpSee the examples/ directory for complete usage examples:
simple_text.py- Text generation onlysimple_video.py- Create single videofull_automation.py- Complete automation
python -m src.cli test-full \
--idea "Your idea" \
--style tutorial \
--num-scenes 10Supported styles:
documentarytutorialnarrativeeducational
python -m src.cli test-merge \
--videos "clip1.mp4,clip2.mp4,clip3.mp4" \
--transition fadeSupported transitions:
fade- Crossfade between clipsdissolve- Dissolve transition
# Verify FFmpeg installation
ffmpeg -version
# If not installed, install it:
# Ubuntu/Debian:
sudo apt-get install ffmpeg
# macOS:
brew install ffmpegMake sure your HERMES API key is configured:
- Edit
config/settings.json - Or set environment variable:
export HERMES_API_KEY=sk-your-key
Ensure you're running from the project root:
# From contentor/ directory:
python -m src.cli test-text --idea "Your idea"All generated content is saved in the output/ directory:
output/text/- Generated scripts and prompts (JSON)output/images/- Generated images (PNG)output/videos/- Generated video clips (MP4)output/final/- Final merged videos (MP4)
pytest tests/black src/mypy src/The system is designed with modularity in mind:
- HERMES Client - Handles all LLM API calls
- Text Generator - Creates scripts and content
- Image Generator - Generates visual assets
- Video Generator - Creates video clips
- Video Merger - Combines clips into long videos
- Pipeline Orchestrator - Coordinates the full workflow
Each module can be used independently or as part of the complete pipeline.
- Python 3.10+
- FFmpeg (for video processing)
- HERMES API key (from NousResearch)
- 2GB+ free disk space for output files
[Your License Here]
Contributions are welcome! Please read the contribution guidelines first.
For issues or questions:
- Check the documentation in
PROJECT_PLAN.mdandPYTHON_IMPLEMENTATION_GUIDE.md - Review logs in
contentor.log - Open an issue on GitHub
- Web UI for easier testing
- Additional image providers (Stability AI, DALL-E)
- Additional video providers (Runway, Pika)
- Advanced subtitle support
- Template system for common video types
- Batch processing
- Cloud deployment options