{"id":18035555,"url":"https://github.com/printn/youtube-automation-bot","last_synced_at":"2025-09-10T05:14:10.996Z","repository":{"id":258129298,"uuid":"861176555","full_name":"PrintN/Youtube-Automation-Bot","owner":"PrintN","description":"An automated Youtube bot to fully automate the process of finding, creating and uploading Youtube videos.","archived":false,"fork":false,"pushed_at":"2024-10-24T05:10:04.000Z","size":110,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-25T04:24:43.737Z","etag":null,"topics":["automation","bot","easy","freesound-api","moviepy","pixabay-api","video","youtube","youtube-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PrintN.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-22T07:52:38.000Z","updated_at":"2024-10-24T05:10:07.000Z","dependencies_parsed_at":"2024-10-26T10:29:08.809Z","dependency_job_id":null,"html_url":"https://github.com/PrintN/Youtube-Automation-Bot","commit_stats":null,"previous_names":["printn/youtube-automation-bot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrintN%2FYoutube-Automation-Bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrintN%2FYoutube-Automation-Bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrintN%2FYoutube-Automation-Bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrintN%2FYoutube-Automation-Bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PrintN","download_url":"https://codeload.github.com/PrintN/Youtube-Automation-Bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245809548,"owners_count":20676006,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","bot","easy","freesound-api","moviepy","pixabay-api","video","youtube","youtube-api"],"created_at":"2024-10-30T12:08:38.823Z","updated_at":"2025-03-27T08:30:32.673Z","avatar_url":"https://github.com/PrintN.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YouTube Automation Bot\n\nThis Python-based bot automates the creation and upload of YouTube videos by sourcing content from Pixabay and Freesound. It uses GitHub Actions to run daily, creating and uploading fresh videos automatically without manual input. Check out the automated [Youtube channel](https://www.youtube.com/@ReIaxingSleepMusic).\n\n![GitHub License](https://img.shields.io/github/license/PrintN/Youtube-Automation-Bot)\n![GitHub Issues](https://img.shields.io/github/issues-raw/PrintN/Youtube-Automation-Bot)\n![GitHub Fork](https://img.shields.io/github/forks/PrintN/Youtube-Automation-Bot)\n\n## Features\n\n- **Automated Video Search \u0026 Download**: Fetches relevant video clips from Pixabay based on user-defined search queries.\n- **Music Search \u0026 Download**: Downloads music from Freesound with proper attribution for Creative Commons-licensed content.\n- **Video Creation**: Combines video and audio into a final video, customizable for durations like 30, 60, or 90 minutes.\n- **Automated YouTube Upload**: Uses the YouTube Data API to upload the final video directly to a YouTube channel.\n- **Daily Automation**: Can be configured to run automatically with GitHub Actions, generating and uploading a new video every day.\n\n## Prerequisites\n\n- [Python 3.9+](https://www.python.org/downloads/)\n- API keys for [Pixabay](https://pixabay.com/api/docs/) and [Freesound](https://freesound.org/home/login/?next=/apiv2/apply)\n- YouTube Data API access ([YouTube API Setup Guide](https://www.youtube.com/watch?v=aFwZgth790Q))\n\n\n## Setup\n\n\u003cdetails\u003e\n  \u003csummary\u003eSetup (Manual Use)\u003c/summary\u003e\n\nClone the repository to your machine:\n```bash\ngit clone https://github.com/PrintN/Youtube-Automation-Bot\ncd Youtube-Automation-Bot\n```\n\nRun the setup.\n```bash\npython3 setup.py\n```\nThis will: \n1. Install required packages\n2. Ask for Pixabay, Freesound, Google Client ID, and Secret\n3. Open a window for YouTube channel authorization\n4. Reset auto.json and used_content.json\n\n### Usage\nRun main.py manually to generate videos interactively:\n\n```bash\npython main.py\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eSetup (Automated with Github Actions)\u003c/summary\u003e\n  \n#### Start by [forking](https://github.com/PrintN/Youtube-Automation-Bot/fork) this repo.\n\nClone the repository to your machine:\n```bash\ngit clone https://github.com/YOUR-FORKED-REPO\ncd Youtube-Automation-Bot\n```\n\n```bash\npython3 setup.py\n```\nThis will: \n1. Install required packages\n2. Ask for Pixabay, Freesound, Google Client ID, and Secret\n3. Open a window for YouTube channel authorization\n4. Reset auto.json and used_content.json\n\n### Configuring API Keys\n\nTo enable the bot to run daily using GitHub Actions, you'll need to add the following secrets to your GitHub repository:\n\n1. Go to: ```Settings \u003e Secrets and variables \u003e Actions``` in your forked repo.\n2. Click \"New repository secret\" and add the following secrets:\n\n   - **FREESOUND_API_KEY**: Your Freesound API key.\n   - **PIXABAY_API_KEY**: Your Pixabay API key.\n   - **CLIENT_SECRETS_JSON**: Base64-encoded ```client_secrets.json``` file.\n   - **TOKEN_JSON**: Base64-encoded ```token.json``` file.\n\n#### How to Base64 Encode Files:\n- **Linux/macOS**:\n  ```bash\n  base64 client_secrets.json \u003e encoded_client_secrets.txt\n  base64 token.json \u003e encoded_token.txt\n  ```\n- **Windows (Powershell)**  \n  ```poweshell\n  [Convert]::ToBase64String([IO.File]::ReadAllBytes(\"C:\\FULL\\PATH\\TO\\client_secrets.json\")) \u003e encoded_client_secrets.txt\n  [Convert]::ToBase64String([IO.File]::ReadAllBytes(\"C:\\FULL\\PATH\\TO\\token.json\")) \u003e encoded_token.txt\n  ```\nCopy the contents of ```encoded_client_secrets.txt``` and ```encoded_token.txt``` into the value fields for **CLIENT_SECRETS_JSON** and **TOKEN_JSON**.\n\n### Configuring auto.json\nThis file contains video configurations for the bot to run in auto mode. You can create as many videos configuration as you want. Example structure:\n```json\n{\n  \"videos\": [\n      {\n          \"duration_minutes\": 30,\n          \"video_query\": \"forest landscapes\",\n          \"audio_query\": \"forest ambiance\",\n          \"upload_to_youtube\": false,\n          \"video_type\": \"video\"\n      },\n      {\n          \"duration_minutes\": 0.55,\n          \"video_query\": \"mountain sunrise\",\n          \"audio_query\": \"gentle wind\",\n          \"upload_to_youtube\": true,\n          \"video_type\": \"short\"\n      },\n  ]\n}\n```\n### Adjusting the Schedule\nTo change the bot’s schedule, edit ```.github/workflows/daily-video.yaml```:\n```yaml\non:\n  schedule:\n    - cron: 0 5 * * * # 05:00 AM UTC\n```\n\u003c/details\u003e\n\n## Limitations of the Youtube API\n1. **Video Duration Limit**: By default, users are allowed to upload videos with a maximum duration of 15 minutes. If you wish to upload videos that exceed this limit, you will need to verify your account. For more details click [here](https://support.google.com/youtube/answer/71673).\n\n2. **OAuth Consent Screen Configuration**: When setting up your Google Cloud Console project, it is important to configure the OAuth consent screen correctly. You must set it to production and not testing. If the consent screen is in testing mode, the refresh token will only be valid for 7 days, which means your YouTube bot will not function as a fully automated system after that period. Ensure you complete this configuration to maintain a fully automated Youtube channel.\n\n## ⭐ Support the Project\nIf you find this project helpful, please consider giving it a ⭐! Starring the repository helps others discover the project and motivates further development. Thank you for your support!\n\n## Ideas for Your Channel\nHere are some content ideas for an automated YouTube channel you could do by modifying the bot:\n- **Relaxing Sleep/Meditation Videos (Current)**\n- **Motivational Quotes**\n- **Meme Compilations**\n- **Music Lyrics Videos**\n- **Reddit Post Discussions**\n\n## License\nThis project is licensed under the [MIT License](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprintn%2Fyoutube-automation-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprintn%2Fyoutube-automation-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprintn%2Fyoutube-automation-bot/lists"}