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.2.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.2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: framestoryx-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 8cca39384d68d9f70172a7b77d0b51fc4e00ed8a986c45e3542a3650d65c8135
MD5 4052ded82f13d13d1b3bbd3e73f8580a
BLAKE2b-256 ffa628950b576b0b2d80f403f95ffb18ebc6e25e4461f5d2dc7e59c5decaf89d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: framestoryx-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e7aecaa43aff4e5a64c1b35f9e9fe5f6fa418583d239f69c42dc5c5922b30ecd
MD5 cd5cc45ad0295a0b833cc21caf752efd
BLAKE2b-256 53d5a8d019bfd2cd8a8ec9f145dcdfae61bc7c820b2948c62ebfe9c6db0571ca

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