Skip to main content

A Python package for creating video descriptions by analyzing and extracting significant frames.

Project description

PyPI version License: MIT Downloads

Frame Story

FrameStory is a Python package designed for extracting and describing significant frames from videos. Leveraging state-of-the-art machine learning models, it can provide detailed descriptions of video content, making it a powerful tool for content analysis, accessibility, and summarization.

Installation

To install FrameStory, you can use pip:

pip install FrameStory

Usage

Using FrameStory is straightforward. Below are examples demonstrating how to extract and describe significant frames from videos with various parameters.

Describing Video by URL

from frame_story.video_describer import VideoDescriber

video_url = "https://example.com/video.mp4"
describer = VideoDescriber(show_progress=True)
descriptions = describer.get_video_descriptions(video_url=video_url)
print(descriptions)

Describing Video from Local Path

video_path = "/path/to/your/video.mp4"
describer = VideoDescriber(show_progress=True, max_tokens=50)
descriptions = describer.get_video_descriptions(video_path=video_path)
print(descriptions)

Customizing Extraction Threshold

The extract_significant_frames method allows you to customize the threshold for what constitutes a "significant" change between frames.

video_url = "https://example.com/video.mp4"
describer = VideoDescriber(threshold=25000)
descriptions = describer.get_video_descriptions(video_url=video_url)
print(descriptions)

These examples demonstrate the versatility of frame_story in processing videos from different sources and with various levels of detail in descriptions.

Features

  • Extraction of significant frames from videos for detailed analysis.
  • Generation of descriptive text for each significant frame using state-of-the-art image captioning models.
  • Support for videos from URLs or local file paths.
  • Customizable settings for progress display, description length, and frame extraction threshold.
  • Easy to integrate into Python projects for content analysis, summarization, and accessibility applications.

Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

License

This project is licensed under the MIT License.

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

FrameStory-0.1.4.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

FrameStory-0.1.4-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file FrameStory-0.1.4.tar.gz.

File metadata

  • Download URL: FrameStory-0.1.4.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.9

File hashes

Hashes for FrameStory-0.1.4.tar.gz
Algorithm Hash digest
SHA256 2f2fb8d7cb146bcf4266512cc4d96798b8870c091af38d8029bd9337e12fc7b6
MD5 23f98b13b541124e4aab35e3e24f6cfd
BLAKE2b-256 dbe087521bd2e46f13300d4f4d54d3415784c26a94d3f092c664b13c02d96972

See more details on using hashes here.

File details

Details for the file FrameStory-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: FrameStory-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.9

File hashes

Hashes for FrameStory-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ba1935cdfa612a4006ef574c9eca42bdbe18d16d8b82b1a4d2b3b5327cc5b7e5
MD5 06549f533d4e42f3de758f368f66850f
BLAKE2b-256 80270f9593aaa100266ac7c182da0eb38bdd7c2a3eccb47f58e1f3d08c9edb4a

See more details on using hashes here.

Supported by

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