A simple Python tool to batch-upload all videos from a folder to your YouTube channel using the YouTube Data API v3.
- Batch upload: scans all video files in a folder and uploads them automatically.
- Custom visibility: choose Public (default) or Private before uploading.
- Automatic organization: each successfully uploaded video is moved to an
upload_success
subfolder. - OAuth authentication: runs in your browser without exposing your password.
- Python 3.7+ installed
- A Google account with a YouTube channel
- A Google Cloud project with the YouTube Data API v3 enabled
- OAuth 2.0 credentials (a
client_secret.json
file)
-
Clone this repository:
git clone https://github.com/GuxtavoLiu/youtube-video-uploader.git cd youtube-video-uploader
-
Create and activate a virtual environment:
python -m venv .venv # Linux / macOS source .venv/bin/activate # Windows PowerShell .venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
- In the Google Cloud Console, create an OAuth Client ID (Application → Desktop) and download the JSON.
- Ensure the YouTube Data API v3 is enabled in the same project.
- Rename the downloaded JSON to
client_secret.json
and place it in the project root.
-
Run the script:
python main.py
-
Enter the folder path containing your videos (e.g.
C:\Users\gusta\Videos\Fortnite\Teste
). -
Select visibility:
1
— Public (default)2
— Private
-
A browser window will open for you to authorize the app with Google.
-
The script will upload each video and then move it into the
upload_success/
folder.
├── client_secret.json # OAuth credentials (gitignored)
├── main.py # Main script
├── requirements.txt # Dependencies
└── README.md # This file
- Fork this repository
- Create a branch (
git checkout -b feature/your-feature
) - Commit your changes
- Open a Pull Request
This project is licensed under the MIT License. See LICENSE for details.
Made with ♥ by G-Liu Code • https://gustavoliu.com