AI-Shorts-Creator  by NisaarAgharia

Python tool for automated video highlight extraction

created 2 years ago
715 stars

Top 49.1% on sourcepulse

GitHubView on GitHub
Project Summary

AI-Shorts-Creator is a Python tool designed to automatically extract and crop engaging segments from videos, targeting content creators and podcasters. It leverages GPT-4 to analyze video transcripts, identify viral moments, and uses FFmpeg and OpenCV for precise cropping and face detection, aiming to streamline video editing and enhance viewer experience.

How It Works

The tool downloads YouTube videos via pytube, then processes their transcripts using the youtube-transcript-api and OpenAI's GPT-4. It analyzes the transcript to pinpoint exciting segments, then uses OpenCV for face detection within the video frames. Finally, FFmpeg is employed to crop the video around detected faces, with potential for further refinement based on talking detection.

Quick Start & Requirements

  • Install dependencies: pip install -r requirements.txt
  • Install FFmpeg for your OS and ensure it's in your PATH.
  • Set your OpenAI API key in the script.
  • Modify video_id in auto_cropper.py with the target YouTube video.
  • Run: python auto_cropper.py
  • Requires Python 3.x, pytube, opencv-python, openai, youtube-transcript-api.

Highlighted Details

  • Automates highlight extraction from videos using GPT-4 analysis of transcripts.
  • Employs face detection via OpenCV for precise cropping around speakers.
  • Integrates FFmpeg for video manipulation and cropping.
  • Aims to identify "viral and exciting moments" and "talking behavior."

Maintenance & Community

The project is marked as "WIP" (Work In Progress) and notes potential bugs. No specific community links or contributor information are provided in the README.

Licensing & Compatibility

The README does not specify a license. Compatibility for commercial use or closed-source linking is not mentioned.

Limitations & Caveats

The project is explicitly marked as "WIP" with potential bugs. The README states that GPT-4 and transcript analysis functionality are simulated and require a valid OpenAI API key and working GPT-4 model to be fully functional.

Health Check
Last commit

1 year ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
24 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.