Git Product home page Git Product logo

kevinwck / ai-video Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ruvnet/ai-video

0.0 0.0 0.0 262 KB

a web application that captures media streams from various sources such as a webcam, desktop, or specific applications. It captures frames at intervals and uses AI to analyze and summarize the frames, providing insights using GPT-4.

License: MIT License

JavaScript 34.79% Python 32.35% HTML 32.86%

ai-video's Introduction

GPT-4o Media Stream Capture and Analysis

Project Overview

This project provides a web application that captures media streams from various sources such as a webcam, desktop, or specific applications. It captures frames at intervals and uses AI to analyze and summarize the frames, providing insights using GPT-4.

GPT-4o Media Stream Capture and Analysis

Demo Link

Key Features

  • Media Stream Capture: Capture video streams from a webcam, screen, or specific applications.
  • Frame Analysis: Use OpenAI's GPT-4 to analyze captured frames for text, objects, context, and other details.
  • Customizable Prompts: Customize the prompt used for frame analysis.
  • API Integration: Integrate with OpenAI's API for frame analysis.

Project Structure

  • app.py: The main server-side application code using Quart.
  • templates/index.html: The HTML template for the web application.
  • static/script.js: The client-side JavaScript for handling media streams and interaction with the backend.

API Endpoints

  • GET /: Serves the main web application.
  • POST /process_frame: Processes a captured frame and returns the analysis result.

POST /process_frame

  • Request Body:
    {
        "image": "data:image/jpeg;base64,<base64-encoded-image>",
        "prompt": "Analyze this frame",
        "api_key": "<OpenAI API Key>"
    }
  • Response:
    {
        "response": "<Analysis result in markdown format>"
    }

Potential Uses

  • Remote Monitoring: Capture and analyze video streams for remote monitoring applications.
  • Educational Purposes: Use AI to analyze and summarize educational video content.
  • Content Creation: Automate the analysis and summarization of video content for creators.

Customization

  • Prompts: Customize the analysis prompt via the settings panel in the web application.
  • Refresh Rate: Adjust the frame capture interval through the settings panel.
  • API Key: Configure the OpenAI API key via the settings panel.

Deployment

  1. Clone the Repository:

    git clone https://github.com/ruvnet/ai-video.git
    cd ai-video
  2. Install Dependencies:

    pip install -r requirements.txt
  3. Set Environment Variables:

    export OPENAI_API_KEY=<your_openai_api_key>
  4. Run the Application:

    python app.py
  5. Access the Application: Open your web browser and navigate to http://localhost:5000.

requirements.txt

quart
opencv-python-headless
httpx
numpy

API Endpoints

Contributing

Feel free to fork the repository and submit pull requests. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

ai-video's People

Contributors

ruvnet avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.