Skip to content

Dockerel/highlight-extractor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Highlight Extractor

Highlight-Extractor is a service that extracts highlights by subtitle(scripts), resizing video for short-form(16:9) also adds subtitles to videos using OpenAI and OpenAI's Whisper model for subtitle extraction and FFmpeg for embedding subtitles into the video. The service is implemented with FastAPI to provide a API interface.

Requirements

  • Python 3.8 or greater

GPU

Execution requires the following NVIDIA libraries to be installed:

Installation

  1. Clone the repository.
git clone https://github.com/Dockerel/highlight-extractor.git
cd highlight-extractor
  1. Make virtual environment.
python -m venv .venv
source .venv/bin/activate
  1. Set .env file.
SMTP_ID={YOUR_GOOGLE_SMTP_ID}
SMTP_PW={YOUR_GOOGLE_SMTP_PW}

OPENAI_API_KEY={YOUR_OPENAI_API_KEY}

AWS_ACCESS_KEY_ID={YOUR_AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY={YOUR_AWS_SECRET_ACCESS_KEY}
AWS_BUCKET_NAME={YOUR_AWS_BUCKET_NAME}
  1. Execute with command below

at local

uvicorn app.main:app --host 127.0.0.1 --port 8000

to deploy

uvicorn app.main:app --host 0.0.0.0 --port 8000

API Paths

Path Description
POST /extract-highlights Used to allocate a task for highlight extracting.
GET /task-status/{task_id} Used when checking status of tasks by task id.
GET /select-highlight/{task_id} Used to select favorite extracted highlight.
GET /clear-status Used to clear in-memory total process status.

About

highlight extractor by openai, faster-whisper and ffmpeg

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages