Skip to main content

An extended version of FrameStory, for creating video descriptions.

Project description

PyPI version License: MIT Downloads LinkedIn

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 git+https://github.com/fossiaorg/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

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: framestoryx-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 33bb99c89c6591bc6cc7b650f682b0daf6cd9af48df72639ecc0637dd6d04263
MD5 445e17f4e1ed553898c8c4cafcc64a70
BLAKE2b-256 ad21b0f816bade2093c82c440ad7290fd36cad56f36b2efd0fdbc054df398a51

See more details on using hashes here.

File details

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

File metadata

  • Download URL: framestoryx-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 639bd878e7894c85efbd3832f563eff6fa6129ec07f8d6acb03967705ac28d95
MD5 15e8905053804b8a68eca67cc2e6d405
BLAKE2b-256 a0c36a00b5d6ee18c156fa38a2039abf90a915de14094af9068aa76142f75941

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