Coder Social home page Coder Social logo

juststeveking / subvert Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aschmelyun/subvert

3.0 1.0 0.0 1.15 MB

Generate subtitles, summaries, and chapters from videos in seconds

Home Page: https://subvert.dev

License: MIT License

Shell 0.88% JavaScript 1.86% PHP 80.43% CSS 0.05% Vue 16.04% Blade 0.23% Dockerfile 0.50%

subvert's Introduction

Subvert

Docker Semver Docker Pulls

Generate subtitles, chapters, and summaries of videos in seconds with the help of OpenAI.

๐Ÿšง This is very much a work-in-progress, please create issues for bugs if they appear ๐Ÿšง

Demo gif of Subvert converting a video

Getting started

You'll need:

Subvert is self-contained in a single Docker image and can be started with a one-line command:

docker run -it -p 80:8080 -e OPENAI_API_KEY=sk-123abc aschmelyun/subvert

This will boot up a server running the application and make it available to your machine at http://localhost.

How it works

After selecting a video file to process, you have the option of choosing whether you also want to generate chapters and a summary.

Your video is sent to an API where the audio is extracted from it using FFMpeg, and then sent to OpenAI's Whisper model for transcription into the common vtt format.

If you chose to select chapters or a summary, that transcript is then sent to a ChatGPT model for processing into concise chapters of the length you wanted, and a brief summary that would fit in something like a YouTube description.

Configuration

You can adjust a few parameters in the container by passing in environment variables with your command using additional -e flags. Here are the current ones you can add:

  • OPENAI_API_KEY (required) - Sets the key responsible for communication with OpenAI's APIs. No default.
  • UPLOAD_MAX_FILESIZE - Changes PHP's UPLOAD_MAX_FILESIZE setting. Default: 256M
  • MEMORY_LIMIT - Changes PHP's MEMORY_LIMIT setting. Default: 512M

Starting from source

Alternative, if you have PHP 8.1+ and npm installed on your local machine, you can boot the application up directly from the source code instead.

First, check out this repo to your desired location. Then, navigate to the src directory and run:

./startup.sh

Alternatively, you can run the commands inside of the startup.sh script individually for the same result.

Deploying

Because this project is contained in a single Dockerfile, it can be deployed immediately to any server provisioned with Docker. Alternatively, the Subvert Docker image can be ran on cloud instances via AWS, Azure, GCP, Fly.io, etc.

Note: This image currently only exposes the insecure :80 http port.

License

The MIT License (MIT). Please see License File

subvert's People

Contributors

aschmelyun avatar juststeveking avatar

Stargazers

Andrew avatar Mahavishnu P avatar Daryl Ferrer Legion avatar

Watchers

 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.