Skip to main content

A pipeline for extracting summaries from videos using audio and visual context.

Project description

Video Summary

A Python package for extracting comprehensive summaries from videos using both audio (transcription) and visual (keyframe description) context.

Features

  • Audio Transcription: Uses faster-whisper for efficient and accurate transcription.
  • Visual Context: Extracts keyframes from important segments and describes them using GPT-4o Vision.
  • Intelligent Synthesis: Combines audio and visual descriptions into a final, coherent summary.
  • Modular Design: Easy to integrate into any Python project.

Installation

pip install video_summary

Note: Requires ffmpeg to be installed on your system.

Quick Start

import asyncio
from video_summary import VideoSummaryPipeline

async def main():
    # Initialize the pipeline
    pipeline = VideoSummaryPipeline()

    # Run on a video file
    summary = await pipeline.run("path/to/your/video.mp4")

    print("Video Summary:")
    print(summary)

if __name__ == "__main__":
    asyncio.run(main())

Configuration

The package relies on OpenAI or Azure OpenAI for LLM-based analysis. Set the following environment variables:

  • OPENAI_API_KEY: Your OpenAI API key.
  • Optional (for Azure): AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT, AZURE_DEPLOYMENT_NAME.

Requirements

  • Python 3.9+
  • ffmpeg
  • OpenCV
  • faster-whisper
  • LangChain

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

video_summary_a3b2c1-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

video_summary_a3b2c1-0.1.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file video_summary_a3b2c1-0.1.0.tar.gz.

File metadata

  • Download URL: video_summary_a3b2c1-0.1.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for video_summary_a3b2c1-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3c275556636644d61e58c4f42bc42c7801ce172444ed05bc70fe3d27b44af4e2
MD5 c086eaff8dc3f6e0318ae640fe7b61ce
BLAKE2b-256 83044a914980c7866d1a55d64fc64294716125c5e7539b8d7acc7fb05f74d12e

See more details on using hashes here.

File details

Details for the file video_summary_a3b2c1-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for video_summary_a3b2c1-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 75147523b28fefd12fef9c0f184b952747949c86847ed96e429478bf67648079
MD5 b65a07f0015a2b8740a2edfd648ab8bd
BLAKE2b-256 5c5ae40bd1d7bf3af2b62a9a1c39c9a9a59efd9a25613ad2a5fcc16f2307cca1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page