CUDA and GPU Setup
Issue: CUDA Libraries Not Found
If you see errors likelibcudnn.so.8: cannot open shared object file, the NVIDIA CUDA libraries aren’t in your system’s library path.
Verify CUDA Installation
Check if CUDA libraries are installed in your virtual environment:This should return multiple paths containing CUDA libraries.
Issue: No GPU Acceleration
If transcription is unexpectedly slow, verify GPU is being used:Expected Output
Expected Output
- With GPU:
CUDA available: True - CPU-only:
CUDA available: False
False, reinstall PyTorch with CUDA support:Issue: Wrong CUDA Version
If you get compatibility errors, check your CUDA version:ImageMagick Policy Issues
Issue: No Subtitles Appearing on Video
If the video generates successfully but subtitles are missing, this is usually an ImageMagick security policy issue.Check Current Rights
If the output shows
rights="none", ImageMagick is blocking file operations needed for subtitles.This issue is specific to Linux systems. macOS and Windows ImageMagick installations typically don’t have this restriction.
Alternative: Manual Policy Edit
If the command above doesn’t work:- Ubuntu/Debian
- Windows
Edit Change to:
/etc/ImageMagick-6/policy.xml (or /etc/ImageMagick-7/policy.xml):Find:Face Detection Failures
Issue: Face-Centered Crop Not Working
The application prints✗ No face detected. Using half-width with motion tracking for screen recording even though there are faces in the video.
Common Causes
Common Causes
- Faces too small: Default
minSize=(30, 30)may miss distant or small faces - Faces not visible in first 30 frames: Detection only samples the beginning
- Poor lighting or unusual angles: Affects detection accuracy
- Low video resolution: 480p and below have less reliable face detection
Solution: Adjust Detection Parameters
EditComponents/FaceCrop.py at line 40:
Components/FaceCrop.py:40
Issue: Wrong Face Selected
If multiple people are in frame and the wrong person is centered: The code selects the largest face (line 43):Transcription Issues
Issue: No Transcriptions Found
If you seeNo transcriptions found after the audio extraction step:
Verify Audio Extraction
Check if the audio file was created:If the file exists but is very small (less than 100KB), the video may not contain audio.
Check Audio in Source
Verify the source video has an audio track:Look for an
Audio: line in the output. If missing, the video has no audio track.Whisper requires approximately 1-2GB of VRAM (GPU mode) or 4-8GB RAM (CPU mode) depending on the model size.
Issue: Transcription is Very Slow
Expected speeds:- GPU (CUDA): ~5-10 seconds per minute of audio
- CPU: ~30-60 seconds per minute of audio
- GPU Mode
- CPU Mode
- Verify GPU is being used (see CUDA and GPU Setup)
- Check GPU memory:
nvidia-smi - Close other GPU-intensive applications
- Consider using a smaller Whisper model if VRAM is limited
OpenAI API Errors
Issue: Failed to Get Highlight from LLM
If you seeERROR: Failed to get highlight from LLM, this indicates the highlight selection failed.
Common Causes
Common Causes
- Invalid API Key: Check your
.envfile - Rate Limiting: Too many requests to OpenAI API
- Network Issues: Connectivity problems
- Insufficient Credits: OpenAI account has no remaining credits
- Malformed Transcription: Very short videos or corrupted transcription data
Solution: Verify API Configuration
Check Account Status
Log into platform.openai.com and verify:
- Account has remaining credits
- No rate limit warnings
- API key is active
Issue: Rate Limiting Errors
If processing multiple videos, you may hit OpenAI rate limits:- Add delays between videos in batch processing:
- Upgrade to a higher tier OpenAI account
- Use a different model (e.g.,
gpt-3.5-turbohas higher limits)
Concurrent Execution Conflicts
Issue: File Conflicts When Running Multiple Instances
Older versions created files likeaudio.wav that conflicted. Current version uses session IDs.
As of the latest version, each run gets a unique session ID (8-character UUID). Temporary files are named:
audio_{session_id}.wavtemp_clip_{session_id}.mp4temp_cropped_{session_id}.mp4temp_subtitled_{session_id}.mp4
Verification
To verify session ID support:Video Quality Issues
Issue: Blurry or Low-Quality Output
If the final video quality is poor:-
Check source resolution: The output quality cannot exceed the input
-
Increase bitrate in
Components/Subtitles.pyandComponents/FaceCrop.py: -
Use slower preset for better compression:
Issue: Large Output File Sizes
If output files are too large:-
Lower bitrate:
-
Use faster preset (less efficient compression):
A 2-minute 1080p vertical video typically ranges from 20-50MB depending on bitrate and content complexity.
Getting Additional Help
Collect Debugging Information
When reporting issues, include:Alternative Solutions
If Self-Hosting Issues Persist
If Self-Hosting Issues Persist
Consider using the AI Clipping API which offers:
- No installation or dependency management
- Faster processing with optimized infrastructure
- Better clip selection algorithms
- Professional support
Community Resources
- GitHub Issues: github.com/SamurAIGPT/AI-Youtube-Shorts-Generator/issues
- Documentation: Check the README.md for latest updates
- Related Projects: See the README for similar tools and alternatives
