Skip to main content

Download YouTube videos and burn Netflix-style subtitles automatically

Project description

SubPlz - Subtitle Pipeline for Everyone

🎬 Automatically download YouTube videos and burn Netflix-style subtitles into them!

PyPI version Python 3.8+ License: MIT

✨ Features

  • 🚀 One-command processing - Just provide a YouTube URL or local video
  • 🎯 Netflix-style subtitles - Professional yellow text with black background
  • 🤖 AI-powered transcription - Uses OpenAI Whisper for accurate subtitles
  • 🎥 Multiple formats - Supports YouTube URLs and local video files
  • 🔧 Smart dependency handling - Guides you through installing missing dependencies
  • 🧹 Automatic cleanup - Removes temporary files after processing

📦 Installation

pip install subtitle-for-everyone

📋 System Requirements

Required Dependencies

  • Python 3.8+
  • FFmpeg - For video processing
    • Windows: Download from ffmpeg.org
    • macOS: brew install ffmpeg
    • Linux: sudo apt install ffmpeg

Python Dependencies (Installed Automatically)

  • yt-dlp - YouTube video downloading
  • openai-whisper - AI subtitle generation
  • torch - Machine learning backend
  • ffmpeg-python - Video processing
  • tqdm - Progress bars

🚀 Quick Start

Process YouTube Videos

# Single YouTube video
subplz https://www.youtube.com/watch?v=VIDEO_ID

# The command will:
# 1. Download the video
# 2. Generate subtitles using AI
# 3. Burn Netflix-style subtitles into the video
# 4. Save to 'processed_videos' folder

Process Local Videos

# Local video file
subplz /path/to/your/video.mp4
subplz "C:\\Users\\Name\\Videos\\myvideo.mp4"

Custom Output Directory

subplz https://www.youtube.com/watch?v=VIDEO_ID -o my_output_folder

🎨 Netflix-Style Subtitles

SubPlz creates professional subtitles that look just like Netflix:

  • Yellow text (#FFFF00) for visibility
  • Black background box with semi-transparency
  • Arial Bold font at size 22
  • Bottom center positioning with proper margins
  • Thick black outline for readability on any background

📁 Output

  • Processed videos are saved with _with_subtitles suffix
  • Original video quality is preserved
  • Subtitles are permanently burned into the video
  • Temporary files are automatically cleaned up

🛠️ Dependency Troubleshooting

If you get dependency errors, SubPlz will guide you:

Missing FFmpeg

❌ Missing dependencies: ffmpeg

📋 Installation Instructions:
🔸 To install FFmpeg:
   Windows: Download from https://ffmpeg.org/download.html
   macOS: brew install ffmpeg  
   Linux: sudo apt install ffmpeg
   Then add FFmpeg to your system PATH

Missing yt-dlp

❌ Missing dependencies: yt-dlp

📋 Installation Instructions:  
🔸 To install yt-dlp:
   pip install yt-dlp

🔧 Advanced Configuration

SubPlz uses sensible defaults, but you can customize behavior by modifying the config:

# In your Python code
from subplz.config import NETFLIX_SUBTITLE_STYLE

# Customize subtitle appearance
NETFLIX_SUBTITLE_STYLE['fontsize'] = 24  # Bigger text
NETFLIX_SUBTITLE_STYLE['primary_colour'] = "&Hffffff"  # White text

📖 Examples

Basic Usage

# Download and add subtitles to a YouTube video
subplz "https://www.youtube.com/watch?v=dQw4w9WgXcQ"

Batch Processing Script

import subprocess

urls = [
    "https://www.youtube.com/watch?v=VIDEO1",
    "https://www.youtube.com/watch?v=VIDEO2", 
    "https://www.youtube.com/watch?v=VIDEO3"
]

for url in urls:
    subprocess.run(["subplz", url])

Local Video Processing

# Add subtitles to local videos
subplz "/Users/name/Movies/lecture.mp4"
subplz "C:\\Downloads\\presentation.mp4"  

🐛 Troubleshooting

Common Issues

  1. "Command not found: subplz"

    pip install --upgrade subtitle-for-everyone
    # Or try: python -m subplz
    
  2. "FFmpeg not found"

    • Install FFmpeg and add to system PATH
    • Restart terminal after installation
  3. Out of memory errors

    • Use smaller Whisper model: modify WHISPER_MODEL = "tiny" in config
  4. Video download failures

    • Some videos may be region-blocked or private
    • Try different video URLs

📝 License

MIT License - see LICENSE file for details.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📞 Support

🙏 Acknowledgments


Made with ❤️ by Sid & Kan

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

subtitle_for_everyone-1.0.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

subtitle_for_everyone-1.0.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file subtitle_for_everyone-1.0.0.tar.gz.

File metadata

  • Download URL: subtitle_for_everyone-1.0.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.0

File hashes

Hashes for subtitle_for_everyone-1.0.0.tar.gz
Algorithm Hash digest
SHA256 fd860fb369f0491de766f129b5cf0e0261bafac4e765288345b43bbccb9e74c0
MD5 347333b2b4849fff6f346cc829dac18c
BLAKE2b-256 5e3778c9a1b7c724b4d7ca2bc6ae4b194e72577212a590ac02b531c12e30facc

See more details on using hashes here.

File details

Details for the file subtitle_for_everyone-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for subtitle_for_everyone-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0919603b54e7cfe5b1c01599bd3ef5b837c779564d79e10aa80ddcca8e2b7b68
MD5 f5ffaf5f4e4888b8ceae9b04d012dbda
BLAKE2b-256 fbaf415d1a37176b721879a80f1f689c4f7a602de75801831e2bc5a01725b4c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page