This project demonstrates how to use Google's Gemini AI to analyze video content using Node.js.
Screen.Recording.2024-08-14.at.11.49.23.AM.mov
- Node.js (version 14 or higher recommended)
- FFmpeg (for video conversion)
-
Clone this repository:
git clone https://github.com/buffalodrew/gemini-video-demo.git cd gemini-video-demo
-
Install dependencies:
npm install
-
Create a
.env
file in the project root and add your Gemini API key:GEMINI_API_KEY=your_api_key_here
To run the video analysis:
node process.js -f path/to/your/video.mp4 -p "Your prompt here"
For example:
node process.js -f nyt_review.mp4 -p "Please provide a summary of this video"
If your video is in .mov format, you'll need to convert it to .mp4 before using it with this demo. Here's how to do it using FFmpeg:
-
Install FFmpeg:
- On macOS (using Homebrew):
brew install ffmpeg
- On Windows: Download from FFmpeg's official site
- On Linux: Use your distribution's package manager (e.g.,
sudo apt install ffmpeg
for Ubuntu)
- On macOS (using Homebrew):
-
Convert your video:
ffmpeg -i input.mov output.mp4
Replace
input.mov
with your .mov file name andoutput.mp4
with your desired output file name.
This project is licensed under the ISC License.