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-whisperfor 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c275556636644d61e58c4f42bc42c7801ce172444ed05bc70fe3d27b44af4e2
|
|
| MD5 |
c086eaff8dc3f6e0318ae640fe7b61ce
|
|
| BLAKE2b-256 |
83044a914980c7866d1a55d64fc64294716125c5e7539b8d7acc7fb05f74d12e
|
File details
Details for the file video_summary_a3b2c1-0.1.0-py3-none-any.whl.
File metadata
- Download URL: video_summary_a3b2c1-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75147523b28fefd12fef9c0f184b952747949c86847ed96e429478bf67648079
|
|
| MD5 |
b65a07f0015a2b8740a2edfd648ab8bd
|
|
| BLAKE2b-256 |
5c5ae40bd1d7bf3af2b62a9a1c39c9a9a59efd9a25613ad2a5fcc16f2307cca1
|