Command-line interface for Sequential Video Processing (SVP) without the GUI.
- Install dependencies:
pip install -r requirements.txt- Configure API keys in
api_keys.jsonor set environment variables:
export DEEPL_API_KEY="your-key"
export CONVERTAPI_KEY="your-key"
export ELEVENLABS_API_KEY="your-key"./svp_cli.py -i INPUT_FOLDER -o OUTPUT_FOLDER -s SOURCE_LANG -t TARGET_LANG(S)-i, --input PATH- Input folder containing PPTX and TXT files-o, --output PATH- Output folder for processed files-s, --source CODE- Source language code (e.g., en, es, fr)-t, --targets CODE [CODE ...]- Target language codes (space-separated) or "all"
-
--mode {full,translate,export}- Processing mode (default: full)full: Complete workflow (translation + export + video generation)translate: Translation phase only (PPTX and TXT files)export: Export phase only (PNG, TTS, video merge)
-
--intro- Add Plan B intro video to generated videos -
--no-skip- Process all files even if output exists (default: skip existing) -
--log PATH- Log file for progress output (useful fortail -f) -
--list-languages- List all available language codes and exit -
-v, --verbose- Enable verbose logging
./svp_cli.py -i ./input -o ./output -s en -t fr es./svp_cli.py -i ./input -o ./output -s en -t all./svp_cli.py -i ./input -o ./output -s en -t de it --mode translate./svp_cli.py -i ./translated -o ./videos -s en -t fr --mode export --intro# Start process in background
./svp_cli.py -i ./input -o ./output -s en -t fr es --log progress.log &
# Monitor progress in real-time
tail -f progress.log./svp_cli.py -i ./input -o ./output -s en -t fr de es it --intro./svp_cli.py -i ./input -o ./output -s en -t fr --no-skipTo see all available language codes:
./svp_cli.py --list-languagesCurrently supported languages include:
- cs (Czech)
- de (German)
- en (English)
- es (Spanish)
- et (Estonian)
- fa (Farsi)
- fi (Finnish)
- fr (French)
- hi (Hindi)
- id (Indonesian)
- it (Italian)
- ja (Japanese)
- ko (Korean)
- nb-no (Norwegian)
- nl (Dutch)
- pl (Polish)
- pt (Portuguese)
- rn (Rundi)
- ro (Romanian)
- ru (Russian)
- si (Sinhala)
- sr-latn (Serbian)
- sv (Swedish)
- sw (Swahili)
- th (Thai)
- tr (Turkish)
- vi (Vietnamese)
- zh-hans (Chinese Simplified)
- zh-hant (Chinese Traditional)
Complete workflow including:
- PPTX translation
- TXT file translation
- PNG export from PPTX
- Text-to-speech generation
- Video creation with PNG slides and TTS audio
Only performs:
- PPTX translation
- TXT file translation
Useful when you want to:
- Review translations before generating videos
- Separate translation and video generation steps
- Save time/API costs if you only need translated documents
Only performs:
- PNG export from translated PPTX
- Text-to-speech from translated TXT
- Video generation
Useful when:
- You already have translated files
- You want to regenerate videos with different settings
- You need to fix video generation issues
The CLI expects input folders with this structure:
input/
├── Course-Name/
│ ├── presentation.pptx
│ └── script.txt
├── Another-Course/
│ ├── presentation.pptx
│ └── script.txt
└── ...
Output will be organized by language:
output/
├── fr/
│ ├── Course-Name/
│ │ ├── presentation.pptx (translated)
│ │ ├── script.txt (translated)
│ │ ├── pngs/ (exported slides)
│ │ ├── audio/ (TTS files)
│ │ └── video.mp4 (final video)
│ └── Another-Course/
│ └── ...
├── es/
│ └── ...
└── ...
For long-running processes, use background execution with logging:
# Start process
nohup ./svp_cli.py -i ./input -o ./output -s en -t all --log progress.log > /dev/null 2>&1 &
# Save process ID
echo $! > svp_process.pid
# Monitor progress
tail -f progress.log
# Check if still running
ps aux | grep $(cat svp_process.pid)
# Stop if needed
kill $(cat svp_process.pid)❌ Missing required API keys for: pptx_translation (DeepL API)
Solution: Configure API keys in api_keys.json or environment variables
❌ Error: Invalid target language: xyz
Solution: Use --list-languages to see valid codes
❌ Error: Input path does not exist: /path/to/input
Solution: Verify the input path exists and is a directory
bash: ./svp_cli.py: Permission denied
Solution: Make the script executable
chmod +x svp_cli.py- Use translation-only mode first to validate translations before generating videos
- Process languages in batches if processing many languages
- Use skip existing (default) to resume interrupted processes
- Monitor system resources when processing multiple large files
- Use separate mode for export if you need to regenerate videos without retranslating
0- Success1- Error (invalid arguments, missing files, API errors, etc.)
- The CLI uses the same core processing logic as the GUI
- Progress messages include timestamps when logging to file
- File handles are flushed immediately for real-time
tail -fmonitoring - Processing can be interrupted with Ctrl+C (graceful shutdown)
- Error logs are saved to the output folder when errors occur