My Content Creator is a AI web application to quickly generate short videos and analyze youtube videos and channel, powered by Google Gemini.
- Generate video using prompt.
- Prompt based video editor along with manual editor.
- Add image, audio and video along with narration and Google Drive import support.
- Upload video to YouTube and Google Drive.
- Review the YouTube channel or its video using Gemini.
- Generate comments.
- Node.js (>v18.17.0) and npm installed
- Pixabay API key: Get Pixabay API Key
- Google Gemini API key: Get Gemini API Key
- Google Cloud Platform service account and OAuth2 client JSON file:
- Service account with appropriate permissions (YouTube Data API v3, YouTube Analytics API, Google Drive API, Cloud Text-to-Speech API, Cloud Translation API)
- OAuth 2.0 client ID credentials
- Create OAuth 2.0 Client ID
- Important: In the
googleoauth2-client.json
ensure you've added "http://localhost:3000/api/google/auth/callback" to the Authorized redirect URIs section. Yourweb.redirect_uris
field in the credential file should include "http://localhost:3000/api/google/auth/callback". - Refer to /src/secret/README.md for detailed instructions on obtaining and configuring Google credentials.
-
Clone the repository:
git clone https://github.com/ayushpaultirkey/my-content-creator.git cd my-content-creator
-
Configure the .env file:
NODE_ENV="development" PIXABAY_API="PIXABAY_KEY_HERE" GOOGLE_GEMINI_API="GEMINI_API_KEY_HERE" GOOGLE_APPLICATION_CREDENTIALS="src/secret/googlecloud-service.json" GOOGLE_OAUTH2_CLIENT="src/secret/googleoauth2-client.json"
-
Place the credential and service files in the
src/private
folder:src/private/googlecloud-service.json
(from the Service Account section)src/private/googleoauth2-client.json
(from the OAuth 2.0 Client IDs section)
-
Install npm modules:
npm install
-
Install the fonts: Navigate to
/project/.font/static
and install all the fonts. -
Download the ffmpeg builds:
- Run the
npm run download
command to download the ffmpeg builds. The files will be downloaded in the/library
folder. - (Manual option): If the download fails, you can manually download the ffmpeg build from FFmpeg Releases and place it in the
/library
folder:/library/ffmpeg.exe
/library/ffprobe.exe
- Run the
-
Install sharp package:
npm install sharp@latest
-
Starting the application:
npm start
Navigate to http://localhost:3000/
-
Install FFmpeg:
sudo apt update sudo apt install ffmpeg
-
Optional (headless environment): If you don't have a graphical display (e.g., on a server), install these dependencies:
sudo apt-get install libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev build-essential g++ sudo apt-get install libgl1-mesa-dev xvfb libxi-dev libx11-dev
-
Install sharp package:
npm install sharp@0.32.6
-
Start the application:
- With graphical display:
npm start
- Headless environment:
xvfb-run -s "-ac -screen 0 1280x1024x24" npm start
Navigate to http://localhost:3000/
- With graphical display:
-
API and services:
-
The app can run without the following API and services:
- Pixabay API: The fallback assets will be used
- Google Client & Services: Google Drive, Youtube Analytics, TTS etc. wont work.
-
However, the Gemini API Key should be present as it is required for core functionality.
-
-
ffmpeg
not installed:- Make sure that the ffmpeg is installed.
- For windows run the
npm run download
command - For linux use the
sudo apt install ffmpeg
- For windows run the
- Make sure that the ffmpeg is installed.
-
node-canvas
error: If you are using Node.js version>20.16.0
, you might encounter the following error when trying to install modules:Hit response response status error 404 not found canvas-v2.11.2-node-v127-win32-unknown-x64.zip
Solution: Use the older version of nodejs between
v18.17.0
tov20.12.2
-
sharp
version error:- Install the correct version of the
sharp
module for specific platform.- Windows: Run
npm install sharp@latest
- Linux: Run
npm install sharp@0.32.6
- Windows: Run
- Install the correct version of the