Skip to content

nghiack7/youtube-upload-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎬 YouTube Upload Tool

A complete cross-platform YouTube upload/download solution with both CLI and Desktop GUI applications.

Platform Python License

✨ Features

πŸ–₯️ Desktop Application

  • Beautiful modern GUI with PyQt6
  • Upload videos with full metadata (title, description, tags, category, privacy, thumbnail)
  • Download any YouTube video
  • Manage your uploaded videos
  • Real-time progress tracking
  • Cross-platform (macOS & Windows)

πŸ’» CLI Tool

  • Upload videos from terminal
  • Download videos from YouTube
  • List your channel videos
  • Batch processing support
  • Perfect for automation and scripts

πŸš€ Quick Start

Desktop App (Recommended)

macOS:

cd desktop-app
./install.sh
./youtube-uploader

Windows:

cd desktop-app
install.bat
youtube-uploader.bat

CLI Tool

cd cli-tool
./youtube --auth  # First time authentication
./youtube --upload video.mp4 --title "My Video"

πŸ“– Setup (One-Time)

Step 1: Create OAuth Credentials

  1. Go to Google Cloud Console
  2. Create a new project
  3. Enable "YouTube Data API v3":
    • APIs & Services β†’ Library β†’ Search "YouTube Data API v3" β†’ Enable
  4. Create OAuth 2.0 credentials:
    • APIs & Services β†’ Credentials β†’ Create Credentials β†’ OAuth client ID
    • Application type: Desktop app
    • Click "Create" and download the JSON file

Step 2: Save Credentials

macOS: Save as ~/.youtube_uploader/client_secrets.json
Windows: Save as C:\Users\YourName\.youtube_uploader\client_secrets.json

Or use the Browse button in the desktop app's Settings tab!

Step 3: Authenticate

Desktop App: Settings tab β†’ "Authenticate with YouTube"
CLI: ./youtube --auth

πŸ“ Project Structure

youtube-upload-tool/
β”œβ”€β”€ cli-tool/                 # Command-line tool
β”‚   β”œβ”€β”€ youtube              # Wrapper script
β”‚   β”œβ”€β”€ youtube-upload.py    # Main Python script
β”‚   β”œβ”€β”€ YOUTUBE_SETUP.md     # Setup guide
β”‚   β”œβ”€β”€ QUICKREF.md          # Quick reference
β”‚   └── venv/                # Python virtual environment
β”‚
β”œβ”€β”€ desktop-app/              # Desktop GUI application
β”‚   β”œβ”€β”€ youtube_uploader.py  # Main app
β”‚   β”œβ”€β”€ install.sh           # macOS installer
β”‚   β”œβ”€β”€ install.bat          # Windows installer
β”‚   β”œβ”€β”€ youtube-uploader     # macOS launcher
β”‚   β”œβ”€β”€ README.md            # Desktop app docs
β”‚   β”œβ”€β”€ QUICKSTART.md        # Quick start guide
β”‚   β”œβ”€β”€ DESKTOP_APP.md      # Detailed guide
β”‚   └── venv/                # Python virtual environment
β”‚
└── README.md                 # This file

🎯 Usage Examples

Desktop App

Upload a video:

  1. Open the app
  2. Go to πŸ“€ Upload tab
  3. Browse and select video file
  4. Enter title, description, tags
  5. Click "πŸš€ Upload to YouTube"

Download a video:

  1. Go to πŸ“₯ Download tab
  2. Paste YouTube URL
  3. Click "πŸ“₯ Download Video"

Manage videos:

  1. Go to πŸ“‹ Manage tab
  2. Click "πŸ“‹ Load My Videos"
  3. Select and open videos

CLI Tool

Upload with metadata:

./youtube --upload video.mp4 \
  --title "My Video Title" \
  --description "Video description..." \
  --tags "tag1,tag2,tag3" \
  --category 22 \
  --privacy public \
  --thumbnail thumbnail.jpg

Download a video:

./youtube --download "https://youtube.com/watch?v=VIDEO_ID" --output ./videos

List recent videos:

./youtube --list --limit 10

πŸ“Š Categories

Available YouTube categories:

  • 22 = People & Blogs (default)
  • 1 = Film & Animation
  • 2 = Autos & Vehicles
  • 10 = Music
  • 15 = Pets & Animals
  • 17 = Sports
  • 20 = Gaming
  • 23 = Comedy
  • 24 = Entertainment
  • 25 = News & Politics
  • 26 = Howto & Style
  • 27 = Education
  • 28 = Science & Technology

πŸ” Privacy Options

  • public - Visible to everyone
  • unlisted - Only people with link can view
  • private - Only you can view

πŸ“¦ Dependencies

All dependencies are automatically installed by the installers:

  • PyQt6 - GUI framework
  • google-api-python-client - YouTube API
  • google-auth-oauthlib - OAuth authentication
  • google-auth-httplib2 - HTTP transport
  • yt-dlp - Video downloader

πŸ”§ System Requirements

  • Python: 3.8 or higher
  • Operating System: macOS 10.14+ or Windows 10+
  • Internet: Required for uploads/downloads
  • Disk Space: ~100 MB for dependencies

πŸ“š Documentation

  • Desktop App: desktop-app/README.md
  • Quick Start: desktop-app/QUICKSTART.md
  • Detailed Guide: desktop-app/DESKTOP_APP.md
  • CLI Setup: cli-tool/YOUTUBE_SETUP.md
  • CLI Reference: cli-tool/QUICKREF.md

🎨 Screenshots

The desktop app features:

  • πŸ“€ Upload tab with metadata forms
  • πŸ“₯ Download tab
  • πŸ“‹ Manage tab for your videos
  • βš™οΈ Settings tab for authentication

πŸ” Security

  • Uses OAuth 2.0 for secure authentication
  • No API keys stored in code
  • Credentials encrypted in token.json
  • Respects Google's security policies

πŸ†˜ Troubleshooting

"Not authenticated" error

  • Go to Settings tab (desktop) or run ./youtube --auth (CLI)
  • Follow browser prompts

"client_secrets.json not found"

  • Create OAuth credentials (see Setup above)
  • Save file to config directory
  • Or use Browse button in Settings

Upload fails

  • Check internet connection
  • Verify video format (MP4 recommended)
  • Ensure title is not empty
  • Check authentication status

πŸ“ License

MIT License - Free to use for personal and commercial projects.

🀝 Contributing

Contributions are welcome! Feel free to submit issues or pull requests.

πŸ“ž Support

For detailed instructions, check the documentation in the respective folders.


Made with ❀️ for content creators everywhere.

πŸš€ Start uploading today!

About

Complete cross-platform YouTube upload/download solution with CLI and Desktop GUI

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors