This repository now contains a fully automated ingestion path to read images, generate Mock 16:9 MP4 short films, update your markdown documents, and bulk-publish the outputs directly to a newly created YouTube Channel.
A top-level /media directory is now constructed specifically to handle multi-faceted assets:
media/videos/media/audio/media/music/
(Later audio & music generators can output MP3/WAV files to their respective folders.)
Since Python cannot bypass Google's direct security layer to create a new Identity, you must register an App to interface with it:
- Create the Channel: Head to YouTube Studio and register a new channel named "Prince of Persia".
- Google Cloud Console:
- Navigate to Google Cloud Console.
- Create a New Project ("Prince of Persia Automation").
- Go to APIs & Services > Library -> Search and enable "YouTube Data API v3".
- OAuth Consent Screen:
- Go to OAuth consent screen -> set as 'External' -> fill out basic name/emails.
- Add the scope:
https://www.googleapis.com/auth/youtube.upload
- Create Credentials:
- Go to Credentials -> Create Credentials -> OAuth client ID.
- App Type: Desktop App.
- Download the JSON file.
- Secure the Token:
Rename the downloaded JSON file to
client_secret.jsonand move it to../../client_secret.json(outside your GitHub repo to prevent accidental API key leaks).
First, make sure the Python requirements are loaded:
python -m pip install google-api-python-client google-auth-oauthlib google-auth-httplib2Then, trigger the publisher!
python src/youtube_uploader.py --dir media/videosWhen you run it the first time, it will open your web browser so you can log into the Prince of Persia YouTube account and grant "Upload" permissions. The scripts push the files as Private initially so you can review them prior to sending them live.
All systems automated! AAK!