Skip to main content

An extended version of FrameStory, for creating video descriptions.

Project description

PyPI version License: MIT Downloads

framestory

framestoryx is a successor to FrameStory for better compatibility with modern Python tooling. 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 framestoryx, you can use pip:

pip install framestoryx

Usage

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

Describing Video by URL

from framestoryx.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

We welcome contributions, be it issues or feature requests.

Feel free to check the issues page and adhere to our contributing guidelines before submitting a pull request.

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

framestoryx-0.1.1.tar.gz (66.3 kB view details)

Uploaded Source

Built Distribution

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

framestoryx-0.1.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file framestoryx-0.1.1.tar.gz.

File metadata

  • Download URL: framestoryx-0.1.1.tar.gz
  • Upload date:
  • Size: 66.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Artix Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for framestoryx-0.1.1.tar.gz
Algorithm Hash digest
SHA256 14a54bca99fdb071bdfce8e44b263d97ded8257e640114f341f95e4e4d09e566
MD5 63e91bd477fd365018867dffdfebef5c
BLAKE2b-256 f3e75b954318cbe969c3a54713a409b403507aad717b78b7755191fff9b230c2

See more details on using hashes here.

File details

Details for the file framestoryx-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: framestoryx-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Artix Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for framestoryx-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 840641cb2c9662d62c45e6f647b702231e4892de45361b43801ea5bcb26c95f4
MD5 8eaa6af8cfad9a4390cdf70c56d61514
BLAKE2b-256 c2fc9ab4639007b8e2bb62ef490027981938c4353cc9d24b26237529788e5b20

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