video-clip-describer
Installation
pip install video-clip-describer
Usage
import asyncio
from video_clip_describer import VisionAgent
agent = VisionAgent(
"~/Videos/test.mp4",
api_base_url="https://my-litellm-proxy.local/v1",
api_key="sk-apikey",
vision_model="claude-3-5-sonnet",
refine_model="gemini-1.5-flash",
stack_grid=True,
stack_grid_size=(3, 3),
resize_video=(1024, 768),
hashing_max_frames=200,
hash_size=8,
debug=True,
debug_dir="./debug",
)
description = asyncio.run(agent.run())
print(description)
CLI
$ video2text path/to/video.mp4
$ video2text --help
Usage: video2text [OPTIONS] VIDEO_FILE
╭─ Arguments ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ * video_file FILENAME The video file to process. [required] │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --resize <width>x<height> Resize frames before sending to GPT-V. [default: 1024x768] │
│ --stack-grid Put video frames in a grid before sending to GPT-V. │
│ --stack-grid-size <cols>x<rows> Grid size to stack frames in. [default: 3x3] │
│ --context Context to add to prompt. [default: None] │
│ --api-base-url OpenAI API compatible base URL. [env var: OPENAI_BASE_URL] [default: https://api.openai.com/v1] │
│ --api-key OpenAI API key. [env var: OPENAI_API_KEY] │
│ --model LLM model to use (overrides --vision-model and --refine-model). [default: None] │
│ --vision-model LLM model to use for vision. [default: claude-3-5-sonnet] │
│ --refine-model LLM model to use for refinement. [default: gemini-1.5-flash] │
│ --no-compress Don't remove similar frames before sending to GPT-V. │
│ --max-frames Max number of frames to allow before decreasing hashing length. [default: 200] │
│ --debug Enable debugging. │
│ --debug-dir PATH Directory to output debug frames to if --debug is enabled. [default: ./debug] │
│ -v Enable verbose output. Repeat for increased verbosity. │
│ --test Don't send requests to LLM. │
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or customize the installation. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Metadata
Release files for video-clip-describer 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| video_clip_describer-0.4.0.tar.gz | 8.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| video_clip_describer-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.5 kB
Release files / video_clip_describer-0.4.0.tar.gz
| Download URL | video_clip_describer-0.4.0.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
047e21bf40ac1ad9b13c0600418edf64d706310a731ccf6e21c7589d815b71ad
|
|
BLAKE2b-256 checksum How to use checksums |
f956962e4fadd8ebf3482e538b9947194f6f2422a686f9578c48a0bdf719289b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.7
|
Release files / video_clip_describer-0.4.0-py3-none-any.whl
| Download URL | video_clip_describer-0.4.0-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c950194873b89f763f412c3dbb3c54fc185221a9bf36db7fc731744a49b847fe
|
|
BLAKE2b-256 checksum How to use checksums |
90b081bf44e83bdc832b39f7631e43d64995ca7a13cd38dab1f147476be7553e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.7
|
Security for video-clip-describer 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.